You are viewing a plain text version of this content. The canonical link for it is here.
Posted to axis-cvs@ws.apache.org by ru...@apache.org on 2006/01/26 06:14:14 UTC
svn commit: r372445 - in /webservices/axis2/trunk/java/modules:
integration/test/org/apache/axis2/security/
security/src/org/apache/axis2/security/util/
security/src/org/apache/ws/security/policy/parser/
security/src/org/apache/ws/security/policy/parse...
Author: ruchithf
Date: Wed Jan 25 21:13:43 2006
New Revision: 372445
URL: http://svn.apache.org/viewcvs?rev=372445&view=rev
Log:
- Doing the copying of the properties in the policy transaction START
- Returning new Boolean(false) in the processors to fail the complex assertion in the case of a failure.
- Changed the handler parameters to specify and process sign/encryptBody and signAllHeaders
Modified:
webservices/axis2/trunk/java/modules/integration/test/org/apache/axis2/security/InteropTestBase.java
webservices/axis2/trunk/java/modules/security/src/org/apache/axis2/security/util/HandlerParameterDecoder.java
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/AlgorithmSuiteProcessor.java
webservices/axis2/trunk/java/modules/security/src/org/apache/ws/security/policy/parser/processors/AsymmetricBindingProcessor.java
webservices/axis2/trunk/java/modules/security/src/org/apache/ws/security/policy/parser/processors/EncryptedPartsElementsProcessor.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/InitiatorRecipientTokenProcessor.java
webservices/axis2/trunk/java/modules/security/src/org/apache/ws/security/policy/parser/processors/LayoutProcessor.java
webservices/axis2/trunk/java/modules/security/src/org/apache/ws/security/policy/parser/processors/SignEncProtectTokenProcessor.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/SignedPartsElementsProcessor.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
webservices/axis2/trunk/java/modules/security/src/org/apache/ws/security/policy/parser/processors/SymmetricBindingProcessor.java
webservices/axis2/trunk/java/modules/security/src/org/apache/ws/security/policy/parser/processors/Trust10Processor.java
webservices/axis2/trunk/java/modules/security/src/org/apache/ws/security/policy/parser/processors/UsernameTokenProcessor.java
webservices/axis2/trunk/java/modules/security/src/org/apache/ws/security/policy/parser/processors/Wss10Processor.java
webservices/axis2/trunk/java/modules/security/src/org/apache/ws/security/policy/parser/processors/Wss11Processor.java
webservices/axis2/trunk/java/modules/security/src/org/apache/ws/security/policy/parser/processors/X509TokenProcessor.java
Modified: webservices/axis2/trunk/java/modules/integration/test/org/apache/axis2/security/InteropTestBase.java
URL: http://svn.apache.org/viewcvs/webservices/axis2/trunk/java/modules/integration/test/org/apache/axis2/security/InteropTestBase.java?rev=372445&r1=372444&r2=372445&view=diff
==============================================================================
--- webservices/axis2/trunk/java/modules/integration/test/org/apache/axis2/security/InteropTestBase.java (original)
+++ webservices/axis2/trunk/java/modules/integration/test/org/apache/axis2/security/InteropTestBase.java Wed Jan 25 21:13:43 2006
@@ -118,8 +118,9 @@
AddressingConstants.Submission.WSA_NAMESPACE;
private String targetEpr = "http://127.0.0.1:" +
- // 5556 +
- UtilServer.TESTING_PORT + "/axis2/services/PingPort";
+ 5556 +
+ //UtilServer.TESTING_PORT +
+ "/axis2/services/PingPort";
public InteropTestBase() {
super();
Modified: webservices/axis2/trunk/java/modules/security/src/org/apache/axis2/security/util/HandlerParameterDecoder.java
URL: http://svn.apache.org/viewcvs/webservices/axis2/trunk/java/modules/security/src/org/apache/axis2/security/util/HandlerParameterDecoder.java?rev=372445&r1=372444&r2=372445&view=diff
==============================================================================
--- webservices/axis2/trunk/java/modules/security/src/org/apache/axis2/security/util/HandlerParameterDecoder.java (original)
+++ webservices/axis2/trunk/java/modules/security/src/org/apache/axis2/security/util/HandlerParameterDecoder.java Wed Jan 25 21:13:43 2006
@@ -101,14 +101,33 @@
+ "only 'action' elements can be present");
}
-
- repetitionCount++;
+ boolean signAllHeaders = false;
+ boolean signBody = false;
+ boolean encryptBody = false;
+
+ repetitionCount++;
Iterator paramElements = element.getChildElements();
while (paramElements.hasNext()) {
OMElement elem = (OMElement) paramElements.next();
- msgCtx.setProperty(Axis2Util.getKey(elem.getLocalName(),
- inflow,repetitionCount), elem.getText());
+ String localName = elem.getLocalName();
+ String text = elem.getText();
+ if(localName.equals(WSSHandlerConstants.SIGN_ALL_HEADERS)) {
+ signAllHeaders = true;
+ } else if(localName.equals(WSSHandlerConstants.SIGN_BODY)) {
+ signBody = true;
+ } else if(localName.equals(WSSHandlerConstants.ENCRYPT_BODY)) {
+ encryptBody = true;
+ } else {
+ msgCtx.setProperty(Axis2Util.getKey(localName,
+ inflow,repetitionCount), text);
+ }
}
+
+ if(signAllHeaders || signBody || encryptBody) {
+ handleSignEncrParts(signAllHeaders, signBody, encryptBody,
+ msgCtx, repetitionCount);
+ }
+
}
@@ -188,4 +207,59 @@
return null;
}
+ private static void handleSignEncrParts(boolean signAllHeaders,
+ boolean signBody, boolean encrBody, MessageContext msgCtx,
+ int repetition) {
+ String soapNs = msgCtx.getEnvelope().getNamespace().getName();
+ if(signBody) {
+ //Add body signPart
+ String sigBodySigPart = "{Element}{" + soapNs + "}Body";
+ addSigPart(sigBodySigPart, msgCtx, repetition);
+ }
+ if(encrBody) {
+ //Encrypt body content
+ String encrBodyEncrPart = "{}{" + soapNs + "}Body";
+ addEncrPart(encrBodyEncrPart, msgCtx, repetition);
+ }
+ if(signAllHeaders) {
+ Iterator children = msgCtx.getEnvelope().getHeader().getChildElements();
+ while (children.hasNext()) {
+ OMElement element = (OMElement) children.next();
+ //Sign only the quilified headers
+ //TODO check whether we can sign the unqualified header elements
+ String ns = element.getNamespace().getName();
+ if(ns != null && ns.length() > 0) {
+ addSigPart("{Element}{" + ns + "}" + element.getLocalName(),msgCtx, repetition);
+ }
+ }
+ }
+
+ }
+
+ private static void addSigPart(String sigPart, MessageContext msgCtx, int repetition) {
+ String key = Axis2Util.getKey(WSHandlerConstants.SIGNATURE_PARTS, false, repetition);
+ String existingSignParts = (String) msgCtx.getProperty(key);
+ if (existingSignParts != null && existingSignParts.length() > 0) {
+ // If the part is not already there as a sign part
+ if (existingSignParts.indexOf(sigPart) != -1) {
+ msgCtx.setProperty(key, existingSignParts + ";" + sigPart);
+ }
+ } else {
+ // If there are no signed parts
+ msgCtx.setProperty(key, sigPart);
+ }
+ }
+
+ private static void addEncrPart(String encrPart, MessageContext msgCtx, int repetition) {
+ String key = Axis2Util.getKey(WSHandlerConstants.ENCRYPTION_PARTS, false, repetition);
+ String existingEncrParts = (String) msgCtx.getProperty(key);
+ if (existingEncrParts != null && existingEncrParts.length() > 0) {
+ if (existingEncrParts.indexOf(encrPart) != -1) {
+ msgCtx.setProperty(key, existingEncrParts + ";" + encrPart);
+ }
+ } else {
+ msgCtx.setProperty(key, encrPart);
+ }
+ }
+
}
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=372445&r1=372444&r2=372445&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 Wed Jan 25 21:13:43 2006
@@ -297,14 +297,11 @@
ret = spt.invokeProcessTokenMethod(secProcessorContext);
} catch (IllegalArgumentException e) {
- // TODO Auto-generated catch block
- e.printStackTrace();
+ log.error(e.getMessage(), e);
} catch (IllegalAccessException e) {
- // TODO Auto-generated catch block
- e.printStackTrace();
+ log.error(e.getMessage(), e);
} catch (InvocationTargetException e) {
- // TODO Auto-generated catch block
- e.printStackTrace();
+ log.error(e.getMessage(), e);
} catch (WSSPolicyException e) {
e.printStackTrace();
} finally {
Modified: webservices/axis2/trunk/java/modules/security/src/org/apache/ws/security/policy/parser/processors/AlgorithmSuiteProcessor.java
URL: http://svn.apache.org/viewcvs/webservices/axis2/trunk/java/modules/security/src/org/apache/ws/security/policy/parser/processors/AlgorithmSuiteProcessor.java?rev=372445&r1=372444&r2=372445&view=diff
==============================================================================
--- webservices/axis2/trunk/java/modules/security/src/org/apache/ws/security/policy/parser/processors/AlgorithmSuiteProcessor.java (original)
+++ webservices/axis2/trunk/java/modules/security/src/org/apache/ws/security/policy/parser/processors/AlgorithmSuiteProcessor.java Wed Jan 25 21:13:43 2006
@@ -159,8 +159,7 @@
initializeAlgorithmSuite(spt);
initializedAlgorithmSuite = true;
} catch (NoSuchMethodException e) {
- // TODO Auto-generated catch block
- e.printStackTrace();
+ log.error(e.getMessage(), e);
return new Boolean(false);
}
}
@@ -183,128 +182,113 @@
log.debug("Processing "
+ spc.readCurrentSecurityToken().getTokenName() + ": "
+ SecurityProcessorContext.ACTION_NAMES[spc.getAction()]);
- this.setAlgoGroup(spc);
- return new Boolean(true);
+ return this.setAlgoGroup(spc);
}
public Object doBasic192(SecurityProcessorContext spc) {
log.debug("Processing "
+ spc.readCurrentSecurityToken().getTokenName() + ": "
+ SecurityProcessorContext.ACTION_NAMES[spc.getAction()]);
- this.setAlgoGroup(spc);
- return new Boolean(true);
+ return this.setAlgoGroup(spc);
}
public Object doBasic128(SecurityProcessorContext spc) {
log.debug("Processing "
+ spc.readCurrentSecurityToken().getTokenName() + ": "
+ SecurityProcessorContext.ACTION_NAMES[spc.getAction()]);
- this.setAlgoGroup(spc);
- return new Boolean(true);
+ return this.setAlgoGroup(spc);
}
public Object doTripleDes(SecurityProcessorContext spc) {
log.debug("Processing "
+ spc.readCurrentSecurityToken().getTokenName() + ": "
+ SecurityProcessorContext.ACTION_NAMES[spc.getAction()]);
- this.setAlgoGroup(spc);
- return new Boolean(true);
+ return this.setAlgoGroup(spc);
}
public Object doBasic256Rsa15(SecurityProcessorContext spc) {
log.debug("Processing "
+ spc.readCurrentSecurityToken().getTokenName() + ": "
+ SecurityProcessorContext.ACTION_NAMES[spc.getAction()]);
- this.setAlgoGroup(spc);
- return new Boolean(true);
+ return this.setAlgoGroup(spc);
}
public Object doBasic192Rsa15(SecurityProcessorContext spc) {
log.debug("Processing "
+ spc.readCurrentSecurityToken().getTokenName() + ": "
+ SecurityProcessorContext.ACTION_NAMES[spc.getAction()]);
- this.setAlgoGroup(spc);
- return new Boolean(true);
+ return this.setAlgoGroup(spc);
}
public Object doBasic128Rsa15(SecurityProcessorContext spc) {
log.debug("Processing "
+ spc.readCurrentSecurityToken().getTokenName() + ": "
+ SecurityProcessorContext.ACTION_NAMES[spc.getAction()]);
- this.setAlgoGroup(spc);
- return new Boolean(true);
+ return this.setAlgoGroup(spc);
}
public Object doTripleDesRsa15(SecurityProcessorContext spc) {
log.debug("Processing "
+ spc.readCurrentSecurityToken().getTokenName() + ": "
+ SecurityProcessorContext.ACTION_NAMES[spc.getAction()]);
- this.setAlgoGroup(spc);
- return new Boolean(true);
+ return this.setAlgoGroup(spc);
}
public Object doBasic256Sha256(SecurityProcessorContext spc) {
log.debug("Processing "
+ spc.readCurrentSecurityToken().getTokenName() + ": "
+ SecurityProcessorContext.ACTION_NAMES[spc.getAction()]);
- this.setAlgoGroup(spc);
- return new Boolean(true);
+ return this.setAlgoGroup(spc);
}
public Object doBasic192Sha256(SecurityProcessorContext spc) {
log.debug("Processing "
+ spc.readCurrentSecurityToken().getTokenName() + ": "
+ SecurityProcessorContext.ACTION_NAMES[spc.getAction()]);
- this.setAlgoGroup(spc);
- return new Boolean(true);
+ return this.setAlgoGroup(spc);
}
public Object doBasic128Sha256(SecurityProcessorContext spc) {
log.debug("Processing "
+ spc.readCurrentSecurityToken().getTokenName() + ": "
+ SecurityProcessorContext.ACTION_NAMES[spc.getAction()]);
- this.setAlgoGroup(spc);
- return new Boolean(true);
+ return this.setAlgoGroup(spc);
}
public Object doTripleDesSha256(SecurityProcessorContext spc) {
log.debug("Processing "
+ spc.readCurrentSecurityToken().getTokenName() + ": "
+ SecurityProcessorContext.ACTION_NAMES[spc.getAction()]);
- this.setAlgoGroup(spc);
- return new Boolean(true);
+ return this.setAlgoGroup(spc);
}
public Object doBasic256Sha256Rsa15(SecurityProcessorContext spc) {
log.debug("Processing "
+ spc.readCurrentSecurityToken().getTokenName() + ": "
+ SecurityProcessorContext.ACTION_NAMES[spc.getAction()]);
- this.setAlgoGroup(spc);
- return new Boolean(true);
+ return this.setAlgoGroup(spc);
}
public Object doBasic192Sha256Rsa15(SecurityProcessorContext spc) {
log.debug("Processing "
+ spc.readCurrentSecurityToken().getTokenName() + ": "
+ SecurityProcessorContext.ACTION_NAMES[spc.getAction()]);
- this.setAlgoGroup(spc);
- return new Boolean(true);
+ return this.setAlgoGroup(spc);
}
public Object doBasic128Sha256Rsa15(SecurityProcessorContext spc) {
log.debug("Processing "
+ spc.readCurrentSecurityToken().getTokenName() + ": "
+ SecurityProcessorContext.ACTION_NAMES[spc.getAction()]);
- this.setAlgoGroup(spc);
- return new Boolean(true);
+
+ return this.setAlgoGroup(spc);
}
public Object doTripleDesSha256Rsa15(SecurityProcessorContext spc) {
log.debug("Processing "
+ spc.readCurrentSecurityToken().getTokenName() + ": "
+ SecurityProcessorContext.ACTION_NAMES[spc.getAction()]);
- this.setAlgoGroup(spc);
- return new Boolean(true);
+ return this.setAlgoGroup(spc);
}
public Object doInclusiveC14N(SecurityProcessorContext spc) {
@@ -312,12 +296,12 @@
+ spc.readCurrentSecurityToken().getTokenName() + ": "
+ SecurityProcessorContext.ACTION_NAMES[spc.getAction()]);
AlgorithmSuite algoSuite = (AlgorithmSuite)spc.readCurrentPolicyEngineData();
- if(spc.getAction() == SecurityProcessorContext.COMMIT) {
+ if(spc.getAction() == SecurityProcessorContext.START) {
try {
algoSuite.setC14n(Constants.C14N);
} catch (WSSPolicyException e) {
- // TODO Throw this out
- e.printStackTrace();
+ log.error(e.getMessage(), e);
+ return new Boolean(false);
}
}
return new Boolean(true);
@@ -328,12 +312,12 @@
+ spc.readCurrentSecurityToken().getTokenName() + ": "
+ SecurityProcessorContext.ACTION_NAMES[spc.getAction()]);
AlgorithmSuite algoSuite = (AlgorithmSuite)spc.readCurrentPolicyEngineData();
- if(spc.getAction() == SecurityProcessorContext.COMMIT) {
+ if(spc.getAction() == SecurityProcessorContext.START) {
try {
algoSuite.setSoapNormalization(Constants.SNT);
} catch (WSSPolicyException e) {
- // TODO Throw this out
- e.printStackTrace();
+ log.error(e.getMessage(), e);
+ return new Boolean(false);
}
}
return new Boolean(true);
@@ -344,12 +328,12 @@
+ spc.readCurrentSecurityToken().getTokenName() + ": "
+ SecurityProcessorContext.ACTION_NAMES[spc.getAction()]);
AlgorithmSuite algoSuite = (AlgorithmSuite)spc.readCurrentPolicyEngineData();
- if(spc.getAction() == SecurityProcessorContext.COMMIT) {
+ if(spc.getAction() == SecurityProcessorContext.START) {
try {
algoSuite.setStrTransform(Constants.STRT10);
} catch (WSSPolicyException e) {
- // TODO Throw this out
- e.printStackTrace();
+ log.error(e.getMessage(), e);
+ return new Boolean(false);
}
}
return new Boolean(true);
@@ -360,12 +344,12 @@
+ spc.readCurrentSecurityToken().getTokenName() + ": "
+ SecurityProcessorContext.ACTION_NAMES[spc.getAction()]);
AlgorithmSuite algoSuite = (AlgorithmSuite)spc.readCurrentPolicyEngineData();
- if(spc.getAction() == SecurityProcessorContext.COMMIT) {
+ if(spc.getAction() == SecurityProcessorContext.START) {
try {
algoSuite.setXPath(Constants.XPATH);
} catch (WSSPolicyException e) {
- // TODO Throw this out
- e.printStackTrace();
+ log.error(e.getMessage(), e);
+ return new Boolean(false);
}
}
return new Boolean(true);
@@ -376,28 +360,29 @@
+ spc.readCurrentSecurityToken().getTokenName() + ": "
+ SecurityProcessorContext.ACTION_NAMES[spc.getAction()]);
AlgorithmSuite algoSuite = (AlgorithmSuite)spc.readCurrentPolicyEngineData();
- if(spc.getAction() == SecurityProcessorContext.COMMIT) {
+ if(spc.getAction() == SecurityProcessorContext.START) {
try {
algoSuite.setXPath(Constants.XPATH20);
} catch (WSSPolicyException e) {
- // TODO Throw this out
- e.printStackTrace();
+ log.error(e.getMessage(), e);
+ return new Boolean(false);
}
}
return new Boolean(true);
}
- private void setAlgoGroup(SecurityProcessorContext spc) {
- if(spc.getAction() == 2) {
+ private Boolean setAlgoGroup(SecurityProcessorContext spc) {
+ if(spc.getAction() == SecurityProcessorContext.START) {
try {
AlgorithmSuite algoSuite = (AlgorithmSuite)spc.readCurrentPolicyEngineData();
algoSuite.setAlgorithmSuite(spc.getAssertion().getName().getLocalPart());
((AlgorithmWrapper)spc.readPreviousPolicyEngineData()).setAlgorithmSuite(algoSuite);
} catch (WSSPolicyException e) {
- // TODO row this out
- e.printStackTrace();
+ log.error(e.getMessage(), e);
+ return new Boolean(false);
}
- }
+ }
+ return new Boolean(true);
}
}
Modified: webservices/axis2/trunk/java/modules/security/src/org/apache/ws/security/policy/parser/processors/AsymmetricBindingProcessor.java
URL: http://svn.apache.org/viewcvs/webservices/axis2/trunk/java/modules/security/src/org/apache/ws/security/policy/parser/processors/AsymmetricBindingProcessor.java?rev=372445&r1=372444&r2=372445&view=diff
==============================================================================
--- webservices/axis2/trunk/java/modules/security/src/org/apache/ws/security/policy/parser/processors/AsymmetricBindingProcessor.java (original)
+++ webservices/axis2/trunk/java/modules/security/src/org/apache/ws/security/policy/parser/processors/AsymmetricBindingProcessor.java Wed Jan 25 21:13:43 2006
@@ -118,8 +118,7 @@
initializeAsymmetricBinding(spt);
initializedAsymmetricBinding = true;
} catch (NoSuchMethodException e) {
- // TODO Auto-generated catch block
- e.printStackTrace();
+ log.error(e.getMessage(), e);
return new Boolean(false);
}
}
@@ -136,7 +135,7 @@
log.debug("Processing "
+ spc.readCurrentSecurityToken().getTokenName() + ": "
+ SecurityProcessorContext.ACTION_NAMES[spc.getAction()]);
- if(spc.getAction() == 2) {
+ if(spc.getAction() == SecurityProcessorContext.START) {
((Binding)spc.readCurrentPolicyEngineData()).setIncludeTimestamp(true);
}
return new Boolean(true);
Modified: webservices/axis2/trunk/java/modules/security/src/org/apache/ws/security/policy/parser/processors/EncryptedPartsElementsProcessor.java
URL: http://svn.apache.org/viewcvs/webservices/axis2/trunk/java/modules/security/src/org/apache/ws/security/policy/parser/processors/EncryptedPartsElementsProcessor.java?rev=372445&r1=372444&r2=372445&view=diff
==============================================================================
--- webservices/axis2/trunk/java/modules/security/src/org/apache/ws/security/policy/parser/processors/EncryptedPartsElementsProcessor.java (original)
+++ webservices/axis2/trunk/java/modules/security/src/org/apache/ws/security/policy/parser/processors/EncryptedPartsElementsProcessor.java Wed Jan 25 21:13:43 2006
@@ -108,8 +108,7 @@
}
initializedEncryptedParts = true;
} catch (NoSuchMethodException e) {
- // TODO Auto-generated catch block
- e.printStackTrace();
+ log.error(e.getMessage(), e);
return new Boolean(false);
}
}
@@ -150,8 +149,7 @@
}
initializedEncryptedElements = true;
} catch (NoSuchMethodException e) {
- // TODO Auto-generated catch block
- e.printStackTrace();
+ log.error(e.getMessage(), e);
return new Boolean(false);
}
}
@@ -174,7 +172,7 @@
log.debug("Processing "
+ spc.readCurrentSecurityToken().getTokenName() + ": "
+ SecurityProcessorContext.ACTION_NAMES[spc.getAction()]);
- if(spc.getAction() == 2) {
+ if(spc.getAction() == SecurityProcessorContext.START) {
((SignedEncryptedParts)spc.readCurrentPolicyEngineData()).setBody(true);
}
return new Boolean(true);
@@ -185,7 +183,7 @@
+ spc.readCurrentSecurityToken().getTokenName() + ": "
+ SecurityProcessorContext.ACTION_NAMES[spc.getAction()]);
- if(spc.getAction() == 2) {
+ if(spc.getAction() == SecurityProcessorContext.START) {
//Extract the sp:Header/@Name and sp:Header/@Namespace attrs
//And create a Header
Header header = new Header();
@@ -201,7 +199,7 @@
log.debug("Processing "
+ spc.readCurrentSecurityToken().getTokenName() + ": "
+ SecurityProcessorContext.ACTION_NAMES[spc.getAction()]);
- if(spc.getAction() == 2) {
+ if(spc.getAction() == SecurityProcessorContext.START) {
((SignedEncryptedElements) spc.readCurrentPolicyEngineData())
.addXPathExpression(spc.getAssertion().getStrValue());
}
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=372445&r1=372444&r2=372445&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 Wed Jan 25 21:13:43 2006
@@ -93,8 +93,7 @@
initializeEndorsingSupportingTokens(spt);
initializedEndorsingSupportingTokens = true;
} catch (NoSuchMethodException e) {
- // TODO Auto-generated catch block
- e.printStackTrace();
+ log.error(e.getMessage(), e);
return new Boolean(false);
}
}
Modified: webservices/axis2/trunk/java/modules/security/src/org/apache/ws/security/policy/parser/processors/InitiatorRecipientTokenProcessor.java
URL: http://svn.apache.org/viewcvs/webservices/axis2/trunk/java/modules/security/src/org/apache/ws/security/policy/parser/processors/InitiatorRecipientTokenProcessor.java?rev=372445&r1=372444&r2=372445&view=diff
==============================================================================
--- webservices/axis2/trunk/java/modules/security/src/org/apache/ws/security/policy/parser/processors/InitiatorRecipientTokenProcessor.java (original)
+++ webservices/axis2/trunk/java/modules/security/src/org/apache/ws/security/policy/parser/processors/InitiatorRecipientTokenProcessor.java Wed Jan 25 21:13:43 2006
@@ -96,8 +96,7 @@
((AsymmetricBinding)spc.readPreviousPolicyEngineData()).setInitiatorToken(initiatorToken);
initializedInitiatorToken = true;
} catch (NoSuchMethodException e) {
- // TODO Auto-generated catch block
- e.printStackTrace();
+ log.error(e.getMessage(), e);
return new Boolean(false);
}
}
@@ -125,8 +124,7 @@
((AsymmetricBinding)spc.readPreviousPolicyEngineData()).setRecipientToken(recipientToken);
initializedRecipientToken = true;
} catch (NoSuchMethodException e) {
- // TODO Auto-generated catch block
- e.printStackTrace();
+ log.error(e.getMessage(), e);
return new Boolean(false);
}
}
Modified: webservices/axis2/trunk/java/modules/security/src/org/apache/ws/security/policy/parser/processors/LayoutProcessor.java
URL: http://svn.apache.org/viewcvs/webservices/axis2/trunk/java/modules/security/src/org/apache/ws/security/policy/parser/processors/LayoutProcessor.java?rev=372445&r1=372444&r2=372445&view=diff
==============================================================================
--- webservices/axis2/trunk/java/modules/security/src/org/apache/ws/security/policy/parser/processors/LayoutProcessor.java (original)
+++ webservices/axis2/trunk/java/modules/security/src/org/apache/ws/security/policy/parser/processors/LayoutProcessor.java Wed Jan 25 21:13:43 2006
@@ -87,9 +87,8 @@
initializeLayout(spt);
initializedLayout = true;
} catch (NoSuchMethodException e) {
- // TODO Auto-generated catch block
- e.printStackTrace();
- return new Boolean(false);
+ log.error(e.getMessage(), e);
+ return new Boolean(false);
}
}
log.debug(spt.getTokenName());
@@ -112,14 +111,14 @@
+ spc.readCurrentSecurityToken().getTokenName() + ": "
+ SecurityProcessorContext.ACTION_NAMES[spc.getAction()]);
try {
- if(spc.getAction() == 2) {
+ if(spc.getAction() == SecurityProcessorContext.START) {
Layout layout = (Layout) spc.readCurrentPolicyEngineData();
layout.setValue(spc.getAssertion().getName().getLocalPart());
((Binding)spc.readPreviousPolicyEngineData()).setLayout(layout);
}
} catch (WSSPolicyException e) {
- // TODO Throw this exception out
- e.printStackTrace();
+ log.error(e.getMessage(), e);
+ return new Boolean(false);
}
return new Boolean(true);
}
@@ -129,14 +128,14 @@
+ spc.readCurrentSecurityToken().getTokenName() + ": "
+ SecurityProcessorContext.ACTION_NAMES[spc.getAction()]);
try {
- if(spc.getAction() == 2) {
+ if(spc.getAction() == SecurityProcessorContext.START) {
Layout layout = (Layout) spc.readCurrentPolicyEngineData();
layout.setValue(spc.getAssertion().getName().getLocalPart());
((Binding)spc.readPreviousPolicyEngineData()).setLayout(layout);
}
} catch (WSSPolicyException e) {
- // TODO Throw this exception out
- e.printStackTrace();
+ log.error(e.getMessage(), e);
+ return new Boolean(false);
}
return new Boolean(true);
}
@@ -146,14 +145,14 @@
+ spc.readCurrentSecurityToken().getTokenName() + ": "
+ SecurityProcessorContext.ACTION_NAMES[spc.getAction()]);
try {
- if(spc.getAction() == 2) {
+ if(spc.getAction() == SecurityProcessorContext.START) {
Layout layout = (Layout) spc.readCurrentPolicyEngineData();
layout.setValue(spc.getAssertion().getName().getLocalPart());
((Binding)spc.readPreviousPolicyEngineData()).setLayout(layout);
}
} catch (WSSPolicyException e) {
- // TODO Throw this exception out
- e.printStackTrace();
+ log.error(e.getMessage(), e);
+ return new Boolean(false);
}
return new Boolean(true);
}
@@ -163,14 +162,14 @@
+ spc.readCurrentSecurityToken().getTokenName() + ": "
+ SecurityProcessorContext.ACTION_NAMES[spc.getAction()]);
try {
- if(spc.getAction() == 2) {
+ if(spc.getAction() == SecurityProcessorContext.START) {
Layout layout = (Layout) spc.readCurrentPolicyEngineData();
layout.setValue(spc.getAssertion().getName().getLocalPart());
((Binding)spc.readPreviousPolicyEngineData()).setLayout(layout);
}
} catch (WSSPolicyException e) {
- // TODO Throw this exception out
- e.printStackTrace();
+ log.error(e.getMessage(), e);
+ return new Boolean(false);
}
return new Boolean(true);
}
Modified: webservices/axis2/trunk/java/modules/security/src/org/apache/ws/security/policy/parser/processors/SignEncProtectTokenProcessor.java
URL: http://svn.apache.org/viewcvs/webservices/axis2/trunk/java/modules/security/src/org/apache/ws/security/policy/parser/processors/SignEncProtectTokenProcessor.java?rev=372445&r1=372444&r2=372445&view=diff
==============================================================================
--- webservices/axis2/trunk/java/modules/security/src/org/apache/ws/security/policy/parser/processors/SignEncProtectTokenProcessor.java (original)
+++ webservices/axis2/trunk/java/modules/security/src/org/apache/ws/security/policy/parser/processors/SignEncProtectTokenProcessor.java Wed Jan 25 21:13:43 2006
@@ -116,8 +116,7 @@
initializeSignatureToken(spt);
initializedSignatureToken = true;
} catch (NoSuchMethodException e) {
- // TODO Auto-generated catch block
- e.printStackTrace();
+ log.error(e.getMessage(), e);
return new Boolean(false);
}
}
@@ -143,8 +142,7 @@
initializeEncryptionToken(spt);
initializedEncryptionToken = true;
} catch (NoSuchMethodException e) {
- // TODO Auto-generated catch block
- e.printStackTrace();
+ log.error(e.getMessage(), e);
return new Boolean(false);
}
}
@@ -174,13 +172,12 @@
((SymmetricBinding) spc.readPreviousPolicyEngineData())
.setProtectionToken(protectionToken);
} catch (WSSPolicyException e) {
- // TODO Throw this out
- e.printStackTrace();
+ log.error(e.getMessage(), e);
+ return new Boolean(false);
}
initializedProtectionToken = true;
} catch (NoSuchMethodException e) {
- // TODO Auto-generated catch block
- e.printStackTrace();
+ log.error(e.getMessage(), e);
return new Boolean(false);
}
}
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=372445&r1=372444&r2=372445&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 Wed Jan 25 21:13:43 2006
@@ -93,8 +93,7 @@
initializeSignedEndorsingSupportingTokens(spt);
initializedSignedEndorsingSupportingTokens = true;
} catch (NoSuchMethodException e) {
- // TODO Auto-generated catch block
- e.printStackTrace();
+ log.error(e.getMessage(), e);
return new Boolean(false);
}
}
Modified: webservices/axis2/trunk/java/modules/security/src/org/apache/ws/security/policy/parser/processors/SignedPartsElementsProcessor.java
URL: http://svn.apache.org/viewcvs/webservices/axis2/trunk/java/modules/security/src/org/apache/ws/security/policy/parser/processors/SignedPartsElementsProcessor.java?rev=372445&r1=372444&r2=372445&view=diff
==============================================================================
--- webservices/axis2/trunk/java/modules/security/src/org/apache/ws/security/policy/parser/processors/SignedPartsElementsProcessor.java (original)
+++ webservices/axis2/trunk/java/modules/security/src/org/apache/ws/security/policy/parser/processors/SignedPartsElementsProcessor.java Wed Jan 25 21:13:43 2006
@@ -113,8 +113,7 @@
}
initializedSignedParts = true;
} catch (NoSuchMethodException e) {
- // TODO Auto-generated catch block
- e.printStackTrace();
+ log.error(e.getMessage(), e);
return new Boolean(false);
}
}
@@ -157,8 +156,7 @@
}
initializedSignedElements = true;
} catch (NoSuchMethodException e) {
- // TODO Auto-generated catch block
- e.printStackTrace();
+ log.error(e.getMessage(), e);
return new Boolean(false);
}
}
@@ -181,7 +179,7 @@
log.debug("Processing "
+ spc.readCurrentSecurityToken().getTokenName() + ": "
+ SecurityProcessorContext.ACTION_NAMES[spc.getAction()]);
- if(spc.getAction() == 2) {
+ if(spc.getAction() == SecurityProcessorContext.START) {
((SignedEncryptedParts)spc.readCurrentPolicyEngineData()).setBody(true);
}
return new Boolean(true);
@@ -191,7 +189,7 @@
log.debug("Processing "
+ spc.readCurrentSecurityToken().getTokenName() + ": "
+ SecurityProcessorContext.ACTION_NAMES[spc.getAction()]);
- if(spc.getAction() == 2) {
+ if(spc.getAction() == SecurityProcessorContext.START) {
//Extract the sp:Header/@Name and sp:Header/@Namespace attrs
//And create a Header
Header header = new Header();
@@ -206,7 +204,7 @@
log.debug("Processing "
+ spc.readCurrentSecurityToken().getTokenName() + ": "
+ SecurityProcessorContext.ACTION_NAMES[spc.getAction()]);
- if(spc.getAction() == 2) {
+ if(spc.getAction() == SecurityProcessorContext.START) {
((SignedEncryptedElements) spc.readCurrentPolicyEngineData())
.addXPathExpression(spc.getAssertion().getStrValue());
}
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=372445&r1=372444&r2=372445&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 Wed Jan 25 21:13:43 2006
@@ -93,8 +93,7 @@
initializeSignedSupportingTokens(spt);
initializedSignedSupportingTokens = true;
} catch (NoSuchMethodException e) {
- // TODO Auto-generated catch block
- e.printStackTrace();
+ log.error(e.getMessage(), e);
return new Boolean(false);
}
}
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=372445&r1=372444&r2=372445&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 Wed Jan 25 21:13:43 2006
@@ -93,8 +93,7 @@
initializeSupportingTokens(spt);
initializedSupportingTokens = true;
} catch (NoSuchMethodException e) {
- // TODO Auto-generated catch block
- e.printStackTrace();
+ log.error(e.getMessage(), e);
return new Boolean(false);
}
}
Modified: webservices/axis2/trunk/java/modules/security/src/org/apache/ws/security/policy/parser/processors/SymmetricBindingProcessor.java
URL: http://svn.apache.org/viewcvs/webservices/axis2/trunk/java/modules/security/src/org/apache/ws/security/policy/parser/processors/SymmetricBindingProcessor.java?rev=372445&r1=372444&r2=372445&view=diff
==============================================================================
--- webservices/axis2/trunk/java/modules/security/src/org/apache/ws/security/policy/parser/processors/SymmetricBindingProcessor.java (original)
+++ webservices/axis2/trunk/java/modules/security/src/org/apache/ws/security/policy/parser/processors/SymmetricBindingProcessor.java Wed Jan 25 21:13:43 2006
@@ -126,8 +126,7 @@
initializeSymmetricBinding(spt);
initializedSymmetricBinding = true;
} catch (NoSuchMethodException e) {
- // TODO Auto-generated catch block
- e.printStackTrace();
+ log.error(e.getMessage(), e);
return new Boolean(false);
}
}
@@ -144,7 +143,7 @@
log.debug("Processing "
+ spc.readCurrentSecurityToken().getTokenName() + ": "
+ SecurityProcessorContext.ACTION_NAMES[spc.getAction()]);
- if(spc.getAction() == 2) {
+ if(spc.getAction() == SecurityProcessorContext.START) {
((Binding)spc.readCurrentPolicyEngineData()).setIncludeTimestamp(true);
}
return new Boolean(true);
@@ -154,13 +153,13 @@
log.debug("Processing "
+ spc.readCurrentSecurityToken().getTokenName() + ": "
+ SecurityProcessorContext.ACTION_NAMES[spc.getAction()]);
- if(spc.getAction() == 2) {
+ if(spc.getAction() == SecurityProcessorContext.START) {
try {
((SymmetricBinding) spc.readCurrentPolicyEngineData()).setProtectionOrder(spc
.getAssertion().getName().getLocalPart());
} catch (WSSPolicyException e) {
- // TODO Throw this exception out
- e.printStackTrace();
+ log.error(e.getMessage(), e);
+ return new Boolean(false);
}
}
return new Boolean(true);
Modified: webservices/axis2/trunk/java/modules/security/src/org/apache/ws/security/policy/parser/processors/Trust10Processor.java
URL: http://svn.apache.org/viewcvs/webservices/axis2/trunk/java/modules/security/src/org/apache/ws/security/policy/parser/processors/Trust10Processor.java?rev=372445&r1=372444&r2=372445&view=diff
==============================================================================
--- webservices/axis2/trunk/java/modules/security/src/org/apache/ws/security/policy/parser/processors/Trust10Processor.java (original)
+++ webservices/axis2/trunk/java/modules/security/src/org/apache/ws/security/policy/parser/processors/Trust10Processor.java Wed Jan 25 21:13:43 2006
@@ -89,8 +89,7 @@
initializeTrust10(spt);
initializedTrust10 = true;
} catch (NoSuchMethodException e) {
- // TODO Auto-generated catch block
- e.printStackTrace();
+ log.error(e.getMessage(), e);
return new Boolean(false);
}
}
Modified: webservices/axis2/trunk/java/modules/security/src/org/apache/ws/security/policy/parser/processors/UsernameTokenProcessor.java
URL: http://svn.apache.org/viewcvs/webservices/axis2/trunk/java/modules/security/src/org/apache/ws/security/policy/parser/processors/UsernameTokenProcessor.java?rev=372445&r1=372444&r2=372445&view=diff
==============================================================================
--- webservices/axis2/trunk/java/modules/security/src/org/apache/ws/security/policy/parser/processors/UsernameTokenProcessor.java (original)
+++ webservices/axis2/trunk/java/modules/security/src/org/apache/ws/security/policy/parser/processors/UsernameTokenProcessor.java Wed Jan 25 21:13:43 2006
@@ -89,13 +89,12 @@
}
((TokenWrapper)spc.readPreviousPolicyEngineData()).setToken(unt);
} catch (WSSPolicyException e) {
- // TODO Throw this out
- e.printStackTrace();
+ log.error(e.getMessage(), e);
+ return new Boolean(false);
}
initializedUsernameToken = true;
} catch (NoSuchMethodException e) {
- // TODO Auto-generated catch block
- e.printStackTrace();
+ log.error(e.getMessage(), e);
return new Boolean(false);
}
}
@@ -116,7 +115,7 @@
public Object doWssUsernameToken10(SecurityProcessorContext spc) {
log.debug("Processing wssUsernameToken10");
- if(spc.getAction() == 2) {
+ if(spc.getAction() == SecurityProcessorContext.START) {
((UsernameToken)spc.readCurrentPolicyEngineData()).setUseUTProfile11(false);
}
return new Boolean(true);
@@ -124,7 +123,7 @@
public Object doWssUsernameToken11(SecurityProcessorContext spc) {
log.debug("Processing wssUsernameToken11");
- if(spc.getAction() == 2) {
+ if(spc.getAction() == SecurityProcessorContext.START) {
((UsernameToken)spc.readCurrentPolicyEngineData()).setUseUTProfile11(true);
}
return new Boolean(true);
Modified: webservices/axis2/trunk/java/modules/security/src/org/apache/ws/security/policy/parser/processors/Wss10Processor.java
URL: http://svn.apache.org/viewcvs/webservices/axis2/trunk/java/modules/security/src/org/apache/ws/security/policy/parser/processors/Wss10Processor.java?rev=372445&r1=372444&r2=372445&view=diff
==============================================================================
--- webservices/axis2/trunk/java/modules/security/src/org/apache/ws/security/policy/parser/processors/Wss10Processor.java (original)
+++ webservices/axis2/trunk/java/modules/security/src/org/apache/ws/security/policy/parser/processors/Wss10Processor.java Wed Jan 25 21:13:43 2006
@@ -87,8 +87,7 @@
initializeWss10(spt);
initializedWss10 = true;
} catch (NoSuchMethodException e) {
- // TODO Auto-generated catch block
- e.printStackTrace();
+ log.error(e.getMessage(), e);
return new Boolean(false);
}
}
@@ -110,7 +109,7 @@
log.debug("Processing "
+ spc.readCurrentSecurityToken().getTokenName() + ": "
+ SecurityProcessorContext.ACTION_NAMES[spc.getAction()]);
- if(spc.getAction() == SecurityProcessorContext.COMMIT) {
+ if(spc.getAction() == SecurityProcessorContext.START) {
((Wss10)spc.readCurrentPolicyEngineData()).setMustSupportRefKeyIdentifier(true);
}
return new Boolean(true);
@@ -120,7 +119,7 @@
log.debug("Processing "
+ spc.readCurrentSecurityToken().getTokenName() + ": "
+ SecurityProcessorContext.ACTION_NAMES[spc.getAction()]);
- if(spc.getAction() == SecurityProcessorContext.COMMIT) {
+ if(spc.getAction() == SecurityProcessorContext.START) {
((Wss10)spc.readCurrentPolicyEngineData()).setMustSupportRefIssuerSerial(true);
}
return new Boolean(true);
@@ -130,7 +129,7 @@
log.debug("Processing "
+ spc.readCurrentSecurityToken().getTokenName() + ": "
+ SecurityProcessorContext.ACTION_NAMES[spc.getAction()]);
- if(spc.getAction() == SecurityProcessorContext.COMMIT) {
+ if(spc.getAction() == SecurityProcessorContext.START) {
((Wss10)spc.readCurrentPolicyEngineData()).setMustSupportRefExternalURI(true);
}
return new Boolean(true);
@@ -140,7 +139,7 @@
log.debug("Processing "
+ spc.readCurrentSecurityToken().getTokenName() + ": "
+ SecurityProcessorContext.ACTION_NAMES[spc.getAction()]);
- if(spc.getAction() == SecurityProcessorContext.COMMIT) {
+ if(spc.getAction() == SecurityProcessorContext.START) {
((Wss10)spc.readCurrentPolicyEngineData()).setMustSupportRefEmbeddedToken(true);
}
return new Boolean(true);
Modified: webservices/axis2/trunk/java/modules/security/src/org/apache/ws/security/policy/parser/processors/Wss11Processor.java
URL: http://svn.apache.org/viewcvs/webservices/axis2/trunk/java/modules/security/src/org/apache/ws/security/policy/parser/processors/Wss11Processor.java?rev=372445&r1=372444&r2=372445&view=diff
==============================================================================
--- webservices/axis2/trunk/java/modules/security/src/org/apache/ws/security/policy/parser/processors/Wss11Processor.java (original)
+++ webservices/axis2/trunk/java/modules/security/src/org/apache/ws/security/policy/parser/processors/Wss11Processor.java Wed Jan 25 21:13:43 2006
@@ -98,8 +98,7 @@
initializeWss11(spt);
initializedWss11 = true;
} catch (NoSuchMethodException e) {
- // TODO Auto-generated catch block
- e.printStackTrace();
+ log.error(e.getMessage(), e);
return new Boolean(false);
}
}
@@ -121,7 +120,7 @@
log.debug("Processing "
+ spc.readCurrentSecurityToken().getTokenName() + ": "
+ SecurityProcessorContext.ACTION_NAMES[spc.getAction()]);
- if(spc.getAction() == SecurityProcessorContext.COMMIT) {
+ if(spc.getAction() == SecurityProcessorContext.START) {
((Wss11)spc.readCurrentPolicyEngineData()).setMustSupportRefKeyIdentifier(true);
}
return new Boolean(true);
@@ -131,7 +130,7 @@
log.debug("Processing "
+ spc.readCurrentSecurityToken().getTokenName() + ": "
+ SecurityProcessorContext.ACTION_NAMES[spc.getAction()]);
- if(spc.getAction() == SecurityProcessorContext.COMMIT) {
+ if(spc.getAction() == SecurityProcessorContext.START) {
((Wss11)spc.readCurrentPolicyEngineData()).setMustSupportRefIssuerSerial(true);
}
return new Boolean(true);
@@ -141,7 +140,7 @@
log.debug("Processing "
+ spc.readCurrentSecurityToken().getTokenName() + ": "
+ SecurityProcessorContext.ACTION_NAMES[spc.getAction()]);
- if(spc.getAction() == SecurityProcessorContext.COMMIT) {
+ if(spc.getAction() == SecurityProcessorContext.START) {
((Wss11)spc.readCurrentPolicyEngineData()).setMustSupportRefExternalURI(true);
}
return new Boolean(true);
@@ -151,7 +150,7 @@
log.debug("Processing "
+ spc.readCurrentSecurityToken().getTokenName() + ": "
+ SecurityProcessorContext.ACTION_NAMES[spc.getAction()]);
- if(spc.getAction() == SecurityProcessorContext.COMMIT) {
+ if(spc.getAction() == SecurityProcessorContext.START) {
((Wss11)spc.readCurrentPolicyEngineData()).setMustSupportRefEmbeddedToken(true);
}
return new Boolean(true);
@@ -161,7 +160,7 @@
log.debug("Processing "
+ spc.readCurrentSecurityToken().getTokenName() + ": "
+ SecurityProcessorContext.ACTION_NAMES[spc.getAction()]);
- if(spc.getAction() == SecurityProcessorContext.COMMIT) {
+ if(spc.getAction() == SecurityProcessorContext.START) {
((Wss11)spc.readCurrentPolicyEngineData()).setMustSupportRefThumbprint(true);
}
return new Boolean(true);
@@ -171,7 +170,7 @@
log.debug("Processing "
+ spc.readCurrentSecurityToken().getTokenName() + ": "
+ SecurityProcessorContext.ACTION_NAMES[spc.getAction()]);
- if(spc.getAction() == SecurityProcessorContext.COMMIT) {
+ if(spc.getAction() == SecurityProcessorContext.START) {
((Wss11)spc.readCurrentPolicyEngineData()).setMustSupportRefEncryptedKey(true);
}
return new Boolean(true);
@@ -181,7 +180,7 @@
log.debug("Processing "
+ spc.readCurrentSecurityToken().getTokenName() + ": "
+ SecurityProcessorContext.ACTION_NAMES[spc.getAction()]);
- if(spc.getAction() == SecurityProcessorContext.COMMIT) {
+ if(spc.getAction() == SecurityProcessorContext.START) {
((Wss11)spc.readCurrentPolicyEngineData()).setRequireSignatureConfirmation(true);
}
return new Boolean(true);
Modified: webservices/axis2/trunk/java/modules/security/src/org/apache/ws/security/policy/parser/processors/X509TokenProcessor.java
URL: http://svn.apache.org/viewcvs/webservices/axis2/trunk/java/modules/security/src/org/apache/ws/security/policy/parser/processors/X509TokenProcessor.java?rev=372445&r1=372444&r2=372445&view=diff
==============================================================================
--- webservices/axis2/trunk/java/modules/security/src/org/apache/ws/security/policy/parser/processors/X509TokenProcessor.java (original)
+++ webservices/axis2/trunk/java/modules/security/src/org/apache/ws/security/policy/parser/processors/X509TokenProcessor.java Wed Jan 25 21:13:43 2006
@@ -132,13 +132,12 @@
}
((TokenWrapper)spc.readPreviousPolicyEngineData()).setToken(token);
} catch (WSSPolicyException e) {
- // TODO Throw this out
- e.printStackTrace();
+ log.error(e.getMessage(), e);
+ return new Boolean(false);
}
initializedX509Token = true;
} catch (NoSuchMethodException e) {
- // TODO Auto-generated catch block
- e.printStackTrace();
+ log.error(e.getMessage(), e);
return new Boolean(false);
}
}