axis-java-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ruchi...@apache.org
Subject svn commit: r372804 - in /webservices/axis2/trunk/java/modules/security/src/org/apache/ws/security/policy/parser: ./ processors/
Date Fri, 27 Jan 2006 10:12:54 GMT
Author: ruchithf
Date: Fri Jan 27 02:12:41 2006
New Revision: 372804

URL: http://svn.apache.org/viewcvs?rev=372804&view=rev
Log:
Changed the security policy parser to recognize supporting tokens as top level policy assertoins,
since end point policy subject assertions can include supporting tokens as well


Modified:
    webservices/axis2/trunk/java/modules/security/src/org/apache/ws/security/policy/parser/WSSPolicyProcessor.java
    webservices/axis2/trunk/java/modules/security/src/org/apache/ws/security/policy/parser/processors/EndorsingSupportingTokensProcessor.java
    webservices/axis2/trunk/java/modules/security/src/org/apache/ws/security/policy/parser/processors/SignedEndorsingSupportingTokensProcessor.java
    webservices/axis2/trunk/java/modules/security/src/org/apache/ws/security/policy/parser/processors/SignedSupportingTokensProcessor.java
    webservices/axis2/trunk/java/modules/security/src/org/apache/ws/security/policy/parser/processors/SupportingTokensProcessor.java

Modified: webservices/axis2/trunk/java/modules/security/src/org/apache/ws/security/policy/parser/WSSPolicyProcessor.java
URL: http://svn.apache.org/viewcvs/webservices/axis2/trunk/java/modules/security/src/org/apache/ws/security/policy/parser/WSSPolicyProcessor.java?rev=372804&r1=372803&r2=372804&view=diff
==============================================================================
--- webservices/axis2/trunk/java/modules/security/src/org/apache/ws/security/policy/parser/WSSPolicyProcessor.java
(original)
+++ webservices/axis2/trunk/java/modules/security/src/org/apache/ws/security/policy/parser/WSSPolicyProcessor.java
Fri Jan 27 02:12:41 2006
@@ -37,7 +37,11 @@
 import org.apache.ws.security.policy.model.RootPolicyEngineData;
 import org.apache.ws.security.policy.parser.processors.AsymmetricBindingProcessor;
 import org.apache.ws.security.policy.parser.processors.EncryptedPartsElementsProcessor;
+import org.apache.ws.security.policy.parser.processors.EndorsingSupportingTokensProcessor;
+import org.apache.ws.security.policy.parser.processors.SignedEndorsingSupportingTokensProcessor;
 import org.apache.ws.security.policy.parser.processors.SignedPartsElementsProcessor;
+import org.apache.ws.security.policy.parser.processors.SignedSupportingTokensProcessor;
+import org.apache.ws.security.policy.parser.processors.SupportingTokensProcessor;
 import org.apache.ws.security.policy.parser.processors.SymmetricBindingProcessor;
 import org.apache.ws.security.policy.parser.processors.Wss10Processor;
 import org.apache.ws.security.policy.parser.processors.Wss11Processor;
@@ -102,6 +106,22 @@
 
         spt = SecurityPolicy.wss11.copy();
         spt.setProcessTokenMethod(new Wss11Processor());
+        topLevel.setChildToken(spt);
+        
+        spt = SecurityPolicy.supportingTokens.copy();
+        spt.setProcessTokenMethod(new SupportingTokensProcessor());
+        topLevel.setChildToken(spt);
+        
+        spt = SecurityPolicy.endorsingSupportingTokens.copy();
+        spt.setProcessTokenMethod(new EndorsingSupportingTokensProcessor());
+        topLevel.setChildToken(spt);       
+        
+        spt = SecurityPolicy.signedSupportingTokens.copy();
+        spt.setProcessTokenMethod(new SignedSupportingTokensProcessor());
+        topLevel.setChildToken(spt);
+        
+        spt = SecurityPolicy.signedEndorsingSupportingTokens.copy();
+        spt.setProcessTokenMethod(new SignedEndorsingSupportingTokensProcessor());
         topLevel.setChildToken(spt);
         
         /*

Modified: webservices/axis2/trunk/java/modules/security/src/org/apache/ws/security/policy/parser/processors/EndorsingSupportingTokensProcessor.java
URL: http://svn.apache.org/viewcvs/webservices/axis2/trunk/java/modules/security/src/org/apache/ws/security/policy/parser/processors/EndorsingSupportingTokensProcessor.java?rev=372804&r1=372803&r2=372804&view=diff
==============================================================================
--- webservices/axis2/trunk/java/modules/security/src/org/apache/ws/security/policy/parser/processors/EndorsingSupportingTokensProcessor.java
(original)
+++ webservices/axis2/trunk/java/modules/security/src/org/apache/ws/security/policy/parser/processors/EndorsingSupportingTokensProcessor.java
Fri Jan 27 02:12:41 2006
@@ -17,6 +17,7 @@
 
 import org.apache.commons.logging.Log;
 import org.apache.commons.logging.LogFactory;
+import org.apache.ws.security.policy.model.PolicyEngineData;
 import org.apache.ws.security.policy.parser.SecurityPolicy;
 import org.apache.ws.security.policy.parser.SecurityPolicyToken;
 import org.apache.ws.security.policy.parser.SecurityProcessorContext;
@@ -91,6 +92,11 @@
 			if (!initializedEndorsingSupportingTokens) {
 				try {
 					initializeEndorsingSupportingTokens(spt);
+                    PolicyEngineData ped = spc.readCurrentPolicyEngineData();
+                    if(ped != null) {
+                        //This ped must be a Binding
+                        //TODO: Support Supporting tokens in bindings
+                    }
 					initializedEndorsingSupportingTokens = true;
 				} catch (NoSuchMethodException e) {
                     log.error(e.getMessage(), e);

Modified: webservices/axis2/trunk/java/modules/security/src/org/apache/ws/security/policy/parser/processors/SignedEndorsingSupportingTokensProcessor.java
URL: http://svn.apache.org/viewcvs/webservices/axis2/trunk/java/modules/security/src/org/apache/ws/security/policy/parser/processors/SignedEndorsingSupportingTokensProcessor.java?rev=372804&r1=372803&r2=372804&view=diff
==============================================================================
--- webservices/axis2/trunk/java/modules/security/src/org/apache/ws/security/policy/parser/processors/SignedEndorsingSupportingTokensProcessor.java
(original)
+++ webservices/axis2/trunk/java/modules/security/src/org/apache/ws/security/policy/parser/processors/SignedEndorsingSupportingTokensProcessor.java
Fri Jan 27 02:12:41 2006
@@ -17,6 +17,7 @@
 
 import org.apache.commons.logging.Log;
 import org.apache.commons.logging.LogFactory;
+import org.apache.ws.security.policy.model.PolicyEngineData;
 import org.apache.ws.security.policy.parser.SecurityPolicy;
 import org.apache.ws.security.policy.parser.SecurityPolicyToken;
 import org.apache.ws.security.policy.parser.SecurityProcessorContext;
@@ -91,6 +92,11 @@
 			if (!initializedSignedEndorsingSupportingTokens) {
 				try {
 					initializeSignedEndorsingSupportingTokens(spt);
+                    PolicyEngineData ped = spc.readCurrentPolicyEngineData();
+                    if(ped != null) {
+                        //This ped must be a Binding
+                        //TODO: Support Supporting tokens in bindings
+                    }
 					initializedSignedEndorsingSupportingTokens = true;
 				} catch (NoSuchMethodException e) {
                     log.error(e.getMessage(), e);

Modified: webservices/axis2/trunk/java/modules/security/src/org/apache/ws/security/policy/parser/processors/SignedSupportingTokensProcessor.java
URL: http://svn.apache.org/viewcvs/webservices/axis2/trunk/java/modules/security/src/org/apache/ws/security/policy/parser/processors/SignedSupportingTokensProcessor.java?rev=372804&r1=372803&r2=372804&view=diff
==============================================================================
--- webservices/axis2/trunk/java/modules/security/src/org/apache/ws/security/policy/parser/processors/SignedSupportingTokensProcessor.java
(original)
+++ webservices/axis2/trunk/java/modules/security/src/org/apache/ws/security/policy/parser/processors/SignedSupportingTokensProcessor.java
Fri Jan 27 02:12:41 2006
@@ -17,6 +17,7 @@
 
 import org.apache.commons.logging.Log;
 import org.apache.commons.logging.LogFactory;
+import org.apache.ws.security.policy.model.PolicyEngineData;
 import org.apache.ws.security.policy.parser.SecurityPolicy;
 import org.apache.ws.security.policy.parser.SecurityPolicyToken;
 import org.apache.ws.security.policy.parser.SecurityProcessorContext;
@@ -91,6 +92,11 @@
 			if (!initializedSignedSupportingTokens) {
 				try {
 					initializeSignedSupportingTokens(spt);
+                    PolicyEngineData ped = spc.readCurrentPolicyEngineData();
+                    if(ped != null) {
+                        //This ped must be a Binding
+                        //TODO: Support Supporting tokens in bindings
+                    }
 					initializedSignedSupportingTokens = true;
 				} catch (NoSuchMethodException e) {
                     log.error(e.getMessage(), e);

Modified: webservices/axis2/trunk/java/modules/security/src/org/apache/ws/security/policy/parser/processors/SupportingTokensProcessor.java
URL: http://svn.apache.org/viewcvs/webservices/axis2/trunk/java/modules/security/src/org/apache/ws/security/policy/parser/processors/SupportingTokensProcessor.java?rev=372804&r1=372803&r2=372804&view=diff
==============================================================================
--- webservices/axis2/trunk/java/modules/security/src/org/apache/ws/security/policy/parser/processors/SupportingTokensProcessor.java
(original)
+++ webservices/axis2/trunk/java/modules/security/src/org/apache/ws/security/policy/parser/processors/SupportingTokensProcessor.java
Fri Jan 27 02:12:41 2006
@@ -17,6 +17,7 @@
 
 import org.apache.commons.logging.Log;
 import org.apache.commons.logging.LogFactory;
+import org.apache.ws.security.policy.model.PolicyEngineData;
 import org.apache.ws.security.policy.parser.SecurityPolicy;
 import org.apache.ws.security.policy.parser.SecurityPolicyToken;
 import org.apache.ws.security.policy.parser.SecurityProcessorContext;
@@ -91,6 +92,12 @@
 			if (!initializedSupportingTokens) {
 				try {
 					initializeSupportingTokens(spt);
+                    PolicyEngineData ped = spc.readCurrentPolicyEngineData();
+                    if(ped != null) {
+                        //This ped must be a Binding
+                        //TODO: Support Supporting tokens in bindings
+                    }
+                    spc.readPreviousPolicyEngineData();
 					initializedSupportingTokens = true;
 				} catch (NoSuchMethodException e) {
                     log.error(e.getMessage(), e);



Mime
View raw message