Author: azeez
Date: Thu Jan 17 07:18:38 2008
New Revision: 12422
Log:
Removing policies on service removal
POX Sec handler should work only for HTTPS requests
Modified:
trunk/wsas/java/modules/core/conf/hibernate/wso2wsas.hbm.xml
trunk/wsas/java/modules/core/src/org/wso2/wsas/persistence/dataobject/ServiceDO.java
trunk/wsas/java/modules/core/src/org/wso2/wsas/security/pox/POXSecurityHandler.java
Modified: trunk/wsas/java/modules/core/conf/hibernate/wso2wsas.hbm.xml
==============================================================================
--- trunk/wsas/java/modules/core/conf/hibernate/wso2wsas.hbm.xml
(original)
+++ trunk/wsas/java/modules/core/conf/hibernate/wso2wsas.hbm.xml Thu Jan
17 07:18:38 2008
@@ -477,7 +477,7 @@
<property name="policy" column="c_policy" not-null="true" type="text"
length="1000000"/>
<property name="type" column="c_type" not-null="true"/>
- <many-to-one name="service" column="c_service_id" not-null="true"/>
+ <many-to-one name="service" column="c_service_id" not-null="false"/>
</class>
<!-- #################################################### -->
Modified:
trunk/wsas/java/modules/core/src/org/wso2/wsas/persistence/dataobject/ServiceDO.java
==============================================================================
---
trunk/wsas/java/modules/core/src/org/wso2/wsas/persistence/dataobject/ServiceDO.java
(original)
+++
trunk/wsas/java/modules/core/src/org/wso2/wsas/persistence/dataobject/ServiceDO.java
Thu Jan 17 07:18:38 2008
@@ -378,11 +378,20 @@
}
}
+ public void removeAllPolicies() {
+ for (Iterator iter = policies.iterator(); iter.hasNext();) {
+ ServicePolicyDO spDO = (ServicePolicyDO) iter.next();
+ spDO.setService(null);
+ }
+ this.policies.clear();
+ }
+
public void removeAllRelationships() {
removeAllRoles();
removeAllTransports();
removeAllTrustedCertStores();
removeAllUsers();
+ removeAllPolicies();
removeSecurityScenario();
}
Modified:
trunk/wsas/java/modules/core/src/org/wso2/wsas/security/pox/POXSecurityHandler.java
==============================================================================
---
trunk/wsas/java/modules/core/src/org/wso2/wsas/security/pox/POXSecurityHandler.java
(original)
+++
trunk/wsas/java/modules/core/src/org/wso2/wsas/security/pox/POXSecurityHandler.java
Thu Jan 17 07:18:38 2008
@@ -77,7 +77,7 @@
public InvocationResponse invoke(MessageContext msgCtx) throws AxisFault {
//If this is not a REST/POX message simply return
- if (!msgCtx.isDoingREST() ||
!msgCtx.getIncomingTransportName().equals("https")) { // This handler will
interecept REST requests only arriving via HTTPS
+ if (!msgCtx.isDoingREST() ||
!msgCtx.getIncomingTransportName().equals("https")) { // This handler will
intercept REST requests only arriving via HTTPS
return InvocationResponse.CONTINUE;
}
_______________________________________________
Wsas-java-dev mailing list
[email protected]
http://wso2.org/cgi-bin/mailman/listinfo/wsas-java-dev