cxf-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From cohei...@apache.org
Subject cxf git commit: Fixing build following WSS4J changes
Date Fri, 10 Feb 2017 18:02:05 GMT
Repository: cxf
Updated Branches:
  refs/heads/master 00503840e -> 8e7d8e18e


Fixing build following WSS4J changes


Project: http://git-wip-us.apache.org/repos/asf/cxf/repo
Commit: http://git-wip-us.apache.org/repos/asf/cxf/commit/8e7d8e18
Tree: http://git-wip-us.apache.org/repos/asf/cxf/tree/8e7d8e18
Diff: http://git-wip-us.apache.org/repos/asf/cxf/diff/8e7d8e18

Branch: refs/heads/master
Commit: 8e7d8e18e820dcaef748c2cab6091f884fe647a4
Parents: 0050384
Author: Colm O hEigeartaigh <coheigea@apache.org>
Authored: Fri Feb 10 18:01:53 2017 +0000
Committer: Colm O hEigeartaigh <coheigea@apache.org>
Committed: Fri Feb 10 18:01:53 2017 +0000

----------------------------------------------------------------------
 .../security/oauth2/grants/saml/Saml2BearerGrantHandler.java | 5 +++--
 .../rs/security/saml/sso/SAMLProtocolResponseValidator.java  | 8 +++++---
 .../apache/cxf/rs/security/saml/AbstractSamlInHandler.java   | 5 +++--
 .../org/apache/cxf/ws/security/trust/AbstractSTSClient.java  | 4 ++--
 .../ws/security/wss4j/BinarySecurityTokenInterceptor.java    | 8 ++++----
 .../apache/cxf/ws/security/wss4j/SamlTokenInterceptor.java   | 6 ++++--
 .../cxf/ws/security/wss4j/UsernameTokenInterceptor.java      | 7 ++++---
 .../org/apache/cxf/ws/security/wss4j/CustomProcessor.java    | 6 ++----
 .../main/java/org/apache/cxf/sts/request/RequestParser.java  | 5 ++---
 .../org/apache/cxf/sts/token/renewer/SAMLTokenRenewer.java   | 7 ++++---
 .../apache/cxf/sts/token/validator/SAMLTokenValidator.java   | 4 ++--
 .../java/org/apache/cxf/sts/operation/IssueSamlUnitTest.java | 4 ++--
 .../apache/cxf/systest/sts/batch/SimpleBatchSTSClient.java   | 8 +++++---
 .../cxf/systest/sts/secure_conv/SCTTokenValidator.java       | 7 +------
 .../org/apache/cxf/systest/sts/issueunit/IssueUnitTest.java  | 5 ++---
 .../java/org/apache/cxf/systest/sts/rest/STSRESTTest.java    | 5 ++---
 .../org/apache/cxf/systest/sts/itests/unit/STSUnitTest.java  | 5 ++---
 17 files changed, 49 insertions(+), 50 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cxf/blob/8e7d8e18/rt/rs/security/oauth-parent/oauth2-saml/src/main/java/org/apache/cxf/rs/security/oauth2/grants/saml/Saml2BearerGrantHandler.java
----------------------------------------------------------------------
diff --git a/rt/rs/security/oauth-parent/oauth2-saml/src/main/java/org/apache/cxf/rs/security/oauth2/grants/saml/Saml2BearerGrantHandler.java
b/rt/rs/security/oauth-parent/oauth2-saml/src/main/java/org/apache/cxf/rs/security/oauth2/grants/saml/Saml2BearerGrantHandler.java
index 88d365c..0d43d0b 100644
--- a/rt/rs/security/oauth-parent/oauth2-saml/src/main/java/org/apache/cxf/rs/security/oauth2/grants/saml/Saml2BearerGrantHandler.java
+++ b/rt/rs/security/oauth-parent/oauth2-saml/src/main/java/org/apache/cxf/rs/security/oauth2/grants/saml/Saml2BearerGrantHandler.java
@@ -197,16 +197,17 @@ public class Saml2BearerGrantHandler extends AbstractGrantHandler {
                 
                 Signature sig = assertion.getSignature();
                 WSDocInfo docInfo = new WSDocInfo(sig.getDOM().getOwnerDocument());
+                data.setWsDocInfo(docInfo);
                 KeyInfo keyInfo = sig.getKeyInfo();
                 
                 SAMLKeyInfo samlKeyInfo = 
                     SAMLUtil.getCredentialFromKeyInfo(
-                        keyInfo.getDOM(), new WSSSAMLKeyInfoProcessor(data, docInfo), 
+                        keyInfo.getDOM(), new WSSSAMLKeyInfoProcessor(data), 
                         data.getSigVerCrypto()
                     );
                 assertion.verifySignature(samlKeyInfo);
                 assertion.parseSubject(
-                    new WSSSAMLKeyInfoProcessor(data, null), data.getSigVerCrypto(), 
+                    new WSSSAMLKeyInfoProcessor(data), data.getSigVerCrypto(), 
                     data.getCallbackHandler()
                 );
             } else if (getTLSCertificates(message) == null) {

http://git-wip-us.apache.org/repos/asf/cxf/blob/8e7d8e18/rt/rs/security/sso/saml/src/main/java/org/apache/cxf/rs/security/saml/sso/SAMLProtocolResponseValidator.java
----------------------------------------------------------------------
diff --git a/rt/rs/security/sso/saml/src/main/java/org/apache/cxf/rs/security/saml/sso/SAMLProtocolResponseValidator.java
b/rt/rs/security/sso/saml/src/main/java/org/apache/cxf/rs/security/saml/sso/SAMLProtocolResponseValidator.java
index 590ed64..49607dc 100644
--- a/rt/rs/security/sso/saml/src/main/java/org/apache/cxf/rs/security/saml/sso/SAMLProtocolResponseValidator.java
+++ b/rt/rs/security/sso/saml/src/main/java/org/apache/cxf/rs/security/saml/sso/SAMLProtocolResponseValidator.java
@@ -259,6 +259,7 @@ public class SAMLProtocolResponseValidator {
         WSSConfig wssConfig = WSSConfig.getNewInstance();
         requestData.setWssConfig(wssConfig);
         requestData.setCallbackHandler(callbackHandler);
+        requestData.setWsDocInfo(new WSDocInfo(doc));
 
         SAMLKeyInfo samlKeyInfo = null;
 
@@ -267,7 +268,7 @@ public class SAMLProtocolResponseValidator {
             try {
                 samlKeyInfo =
                     SAMLUtil.getCredentialFromKeyInfo(
-                        keyInfo.getDOM(), new WSSSAMLKeyInfoProcessor(requestData, new WSDocInfo(doc)),
sigCrypto
+                        keyInfo.getDOM(), new WSSSAMLKeyInfoProcessor(requestData), sigCrypto
                     );
             } catch (WSSecurityException ex) {
                 LOG.log(Level.FINE, "Error in getting KeyInfo from SAML Response: " + ex.getMessage(),
ex);
@@ -373,13 +374,14 @@ public class SAMLProtocolResponseValidator {
             try {
                 Signature sig = assertion.getSignature();
                 WSDocInfo docInfo = new WSDocInfo(sig.getDOM().getOwnerDocument());
+                requestData.setWsDocInfo(docInfo);
 
                 SAMLKeyInfo samlKeyInfo = null;
 
                 KeyInfo keyInfo = sig.getKeyInfo();
                 if (keyInfo != null) {
                     samlKeyInfo = SAMLUtil.getCredentialFromKeyInfo(
-                        keyInfo.getDOM(), new WSSSAMLKeyInfoProcessor(requestData, docInfo),
sigCrypto
+                        keyInfo.getDOM(), new WSSSAMLKeyInfoProcessor(requestData), sigCrypto
                     );
                 } else if (!keyInfoMustBeAvailable) {
                     samlKeyInfo = createKeyInfoFromDefaultAlias(sigCrypto);
@@ -393,7 +395,7 @@ public class SAMLProtocolResponseValidator {
                 assertion.verifySignature(samlKeyInfo);
 
                 assertion.parseSubject(
-                    new WSSSAMLKeyInfoProcessor(requestData, new WSDocInfo(doc)),
+                    new WSSSAMLKeyInfoProcessor(requestData),
                     requestData.getSigVerCrypto(),
                     requestData.getCallbackHandler()
                 );

http://git-wip-us.apache.org/repos/asf/cxf/blob/8e7d8e18/rt/rs/security/xml/src/main/java/org/apache/cxf/rs/security/saml/AbstractSamlInHandler.java
----------------------------------------------------------------------
diff --git a/rt/rs/security/xml/src/main/java/org/apache/cxf/rs/security/saml/AbstractSamlInHandler.java
b/rt/rs/security/xml/src/main/java/org/apache/cxf/rs/security/saml/AbstractSamlInHandler.java
index f8b3976..4f51032 100644
--- a/rt/rs/security/xml/src/main/java/org/apache/cxf/rs/security/saml/AbstractSamlInHandler.java
+++ b/rt/rs/security/xml/src/main/java/org/apache/cxf/rs/security/saml/AbstractSamlInHandler.java
@@ -155,13 +155,14 @@ public abstract class AbstractSamlInHandler implements ContainerRequestFilter
{
                 
                 Signature sig = assertion.getSignature();
                 WSDocInfo docInfo = new WSDocInfo(sig.getDOM().getOwnerDocument());
+                data.setWsDocInfo(docInfo);
                 
                 SAMLKeyInfo samlKeyInfo = null;
                 
                 KeyInfo keyInfo = sig.getKeyInfo();
                 if (keyInfo != null) {
                     samlKeyInfo = SAMLUtil.getCredentialFromKeyInfo(
-                        keyInfo.getDOM(), new WSSSAMLKeyInfoProcessor(data, docInfo), 
+                        keyInfo.getDOM(), new WSSSAMLKeyInfoProcessor(data), 
                         data.getSigVerCrypto()
                     );
                 } else if (!keyInfoMustBeAvailable) {
@@ -170,7 +171,7 @@ public abstract class AbstractSamlInHandler implements ContainerRequestFilter
{
                 
                 assertion.verifySignature(samlKeyInfo);
                 assertion.parseSubject(
-                    new WSSSAMLKeyInfoProcessor(data, null), data.getSigVerCrypto(), 
+                    new WSSSAMLKeyInfoProcessor(data), data.getSigVerCrypto(), 
                     data.getCallbackHandler()
                 );
             } else if (getTLSCertificates(message) == null) {

http://git-wip-us.apache.org/repos/asf/cxf/blob/8e7d8e18/rt/ws/security/src/main/java/org/apache/cxf/ws/security/trust/AbstractSTSClient.java
----------------------------------------------------------------------
diff --git a/rt/ws/security/src/main/java/org/apache/cxf/ws/security/trust/AbstractSTSClient.java
b/rt/ws/security/src/main/java/org/apache/cxf/ws/security/trust/AbstractSTSClient.java
index fcd716b..856ac41 100755
--- a/rt/ws/security/src/main/java/org/apache/cxf/ws/security/trust/AbstractSTSClient.java
+++ b/rt/ws/security/src/main/java/org/apache/cxf/ws/security/trust/AbstractSTSClient.java
@@ -1585,8 +1585,8 @@ public abstract class AbstractSTSClient implements Configurable, InterceptorProv
                 data.setWssConfig(WSSConfig.getNewInstance());
                 data.setDecCrypto(createCrypto(true));
                 data.setCallbackHandler(createHandler());
-                List<WSSecurityEngineResult> result =
-                    proc.handleToken(child, data, docInfo);
+                data.setWsDocInfo(docInfo);
+                List<WSSecurityEngineResult> result = proc.handleToken(child, data);
                 return 
                     (byte[])result.get(0).get(
                         WSSecurityEngineResult.TAG_SECRET

http://git-wip-us.apache.org/repos/asf/cxf/blob/8e7d8e18/rt/ws/security/src/main/java/org/apache/cxf/ws/security/wss4j/BinarySecurityTokenInterceptor.java
----------------------------------------------------------------------
diff --git a/rt/ws/security/src/main/java/org/apache/cxf/ws/security/wss4j/BinarySecurityTokenInterceptor.java
b/rt/ws/security/src/main/java/org/apache/cxf/ws/security/wss4j/BinarySecurityTokenInterceptor.java
index deefa6a..6f2fa84 100644
--- a/rt/ws/security/src/main/java/org/apache/cxf/ws/security/wss4j/BinarySecurityTokenInterceptor.java
+++ b/rt/ws/security/src/main/java/org/apache/cxf/ws/security/wss4j/BinarySecurityTokenInterceptor.java
@@ -102,7 +102,6 @@ public class BinarySecurityTokenInterceptor extends AbstractTokenInterceptor
{
     
     private List<WSSecurityEngineResult> processToken(Element tokenElement, final SoapMessage
message)
         throws WSSecurityException {
-        WSDocInfo wsDocInfo = new WSDocInfo(tokenElement.getOwnerDocument());
         RequestData data = new CXFRequestData();
         Object o = SecurityUtils.getSecurityPropertyValue(SecurityConstants.CALLBACK_HANDLER,
message);
         try {
@@ -113,10 +112,11 @@ public class BinarySecurityTokenInterceptor extends AbstractTokenInterceptor
{
         data.setMsgContext(message);
         data.setWssConfig(WSSConfig.getNewInstance());
         
+        WSDocInfo wsDocInfo = new WSDocInfo(tokenElement.getOwnerDocument());
+        data.setWsDocInfo(wsDocInfo);
+        
         BinarySecurityTokenProcessor p = new BinarySecurityTokenProcessor();
-        List<WSSecurityEngineResult> results = 
-            p.handleToken(tokenElement, data, wsDocInfo);
-        return results;
+        return p.handleToken(tokenElement, data);
     }
     
     protected AbstractToken assertTokens(SoapMessage message) {

http://git-wip-us.apache.org/repos/asf/cxf/blob/8e7d8e18/rt/ws/security/src/main/java/org/apache/cxf/ws/security/wss4j/SamlTokenInterceptor.java
----------------------------------------------------------------------
diff --git a/rt/ws/security/src/main/java/org/apache/cxf/ws/security/wss4j/SamlTokenInterceptor.java
b/rt/ws/security/src/main/java/org/apache/cxf/ws/security/wss4j/SamlTokenInterceptor.java
index f6ff3f5..83df9bd 100644
--- a/rt/ws/security/src/main/java/org/apache/cxf/ws/security/wss4j/SamlTokenInterceptor.java
+++ b/rt/ws/security/src/main/java/org/apache/cxf/ws/security/wss4j/SamlTokenInterceptor.java
@@ -170,7 +170,6 @@ public class SamlTokenInterceptor extends AbstractTokenInterceptor {
 
     private List<WSSecurityEngineResult> processToken(Element tokenElement, final SoapMessage
message)
         throws WSSecurityException {
-        WSDocInfo wsDocInfo = new WSDocInfo(tokenElement.getOwnerDocument());
         
         RequestData data = new CXFRequestData();
         Object o = SecurityUtils.getSecurityPropertyValue(SecurityConstants.CALLBACK_HANDLER,
message);
@@ -185,8 +184,11 @@ public class SamlTokenInterceptor extends AbstractTokenInterceptor {
         data.setSigVerCrypto(getCrypto(null, SecurityConstants.SIGNATURE_CRYPTO,
                                      SecurityConstants.SIGNATURE_PROPERTIES, message));
         
+        WSDocInfo wsDocInfo = new WSDocInfo(tokenElement.getOwnerDocument());
+        data.setWsDocInfo(wsDocInfo);
+        
         SAMLTokenProcessor p = new SAMLTokenProcessor();
-        return p.handleToken(tokenElement, data, wsDocInfo);
+        return p.handleToken(tokenElement, data);
     }
 
     protected AbstractToken assertTokens(SoapMessage message) {

http://git-wip-us.apache.org/repos/asf/cxf/blob/8e7d8e18/rt/ws/security/src/main/java/org/apache/cxf/ws/security/wss4j/UsernameTokenInterceptor.java
----------------------------------------------------------------------
diff --git a/rt/ws/security/src/main/java/org/apache/cxf/ws/security/wss4j/UsernameTokenInterceptor.java
b/rt/ws/security/src/main/java/org/apache/cxf/ws/security/wss4j/UsernameTokenInterceptor.java
index 725884d..5442b6e 100644
--- a/rt/ws/security/src/main/java/org/apache/cxf/ws/security/wss4j/UsernameTokenInterceptor.java
+++ b/rt/ws/security/src/main/java/org/apache/cxf/ws/security/wss4j/UsernameTokenInterceptor.java
@@ -201,7 +201,6 @@ public class UsernameTokenInterceptor extends AbstractTokenInterceptor
{
         boolean bspCompliant = isWsiBSPCompliant(message);
         boolean allowNoPassword = isAllowNoPassword(message.get(AssertionInfoMap.class));
         UsernameTokenProcessor p = new UsernameTokenProcessor();
-        WSDocInfo wsDocInfo = new WSDocInfo(tokenElement.getOwnerDocument());
         
         RequestData data = new CXFRequestData();
         Object o = SecurityUtils.getSecurityPropertyValue(SecurityConstants.CALLBACK_HANDLER,
message);
@@ -225,9 +224,11 @@ public class UsernameTokenInterceptor extends AbstractTokenInterceptor
{
             data.setDisableBSPEnforcement(true);
         }
         data.setMsgContext(message);
+        
+        WSDocInfo wsDocInfo = new WSDocInfo(tokenElement.getOwnerDocument());
+        data.setWsDocInfo(wsDocInfo);
         try {
-            List<WSSecurityEngineResult> results = 
-                p.handleToken(tokenElement, data, wsDocInfo);
+            List<WSSecurityEngineResult> results = p.handleToken(tokenElement, data);
             return results.get(0);
         } catch (WSSecurityException ex) {
             throw WSS4JUtils.createSoapFault(message, message.getVersion(), ex);

http://git-wip-us.apache.org/repos/asf/cxf/blob/8e7d8e18/rt/ws/security/src/test/java/org/apache/cxf/ws/security/wss4j/CustomProcessor.java
----------------------------------------------------------------------
diff --git a/rt/ws/security/src/test/java/org/apache/cxf/ws/security/wss4j/CustomProcessor.java
b/rt/ws/security/src/test/java/org/apache/cxf/ws/security/wss4j/CustomProcessor.java
index 968e433..ec9fb03 100644
--- a/rt/ws/security/src/test/java/org/apache/cxf/ws/security/wss4j/CustomProcessor.java
+++ b/rt/ws/security/src/test/java/org/apache/cxf/ws/security/wss4j/CustomProcessor.java
@@ -20,7 +20,6 @@ package org.apache.cxf.ws.security.wss4j;
 
 import org.apache.wss4j.common.ext.WSSecurityException;
 import org.apache.wss4j.dom.WSConstants;
-import org.apache.wss4j.dom.WSDocInfo;
 import org.apache.wss4j.dom.engine.WSSecurityEngineResult;
 import org.apache.wss4j.dom.handler.RequestData;
 import org.apache.wss4j.dom.processor.Processor;
@@ -33,13 +32,12 @@ public class CustomProcessor implements Processor {
     
     public final java.util.List<WSSecurityEngineResult> handleToken(
         final org.w3c.dom.Element elem, 
-        final RequestData data, 
-        final WSDocInfo wsDocInfo 
+        final RequestData data
     ) throws WSSecurityException {
         final WSSecurityEngineResult result = 
             new WSSecurityEngineResult(WSConstants.SIGN);
         result.put("foo", this);
-        wsDocInfo.addResult(result);
+        data.getWsDocInfo().addResult(result);
         return java.util.Collections.singletonList(result);
     }
     

http://git-wip-us.apache.org/repos/asf/cxf/blob/8e7d8e18/services/sts/sts-core/src/main/java/org/apache/cxf/sts/request/RequestParser.java
----------------------------------------------------------------------
diff --git a/services/sts/sts-core/src/main/java/org/apache/cxf/sts/request/RequestParser.java
b/services/sts/sts-core/src/main/java/org/apache/cxf/sts/request/RequestParser.java
index 2e705fd..d04ae9e 100644
--- a/services/sts/sts-core/src/main/java/org/apache/cxf/sts/request/RequestParser.java
+++ b/services/sts/sts-core/src/main/java/org/apache/cxf/sts/request/RequestParser.java
@@ -518,11 +518,10 @@ public class RequestParser {
                 requestData.setDecCrypto(stsProperties.getSignatureCrypto());
                 requestData.setCallbackHandler(stsProperties.getCallbackHandler());
                 requestData.setWssConfig(WSSConfig.getNewInstance());
+                requestData.setWsDocInfo(new WSDocInfo(entropyElement.getOwnerDocument()));
                 try {
                     List<WSSecurityEngineResult> results = 
-                        processor.handleToken(
-                            entropyElement, requestData, new WSDocInfo(entropyElement.getOwnerDocument())
-                        );
+                        processor.handleToken(entropyElement, requestData);
                     Entropy entropy = new Entropy();
                     entropy.setDecryptedKey((byte[])results.get(0).get(WSSecurityEngineResult.TAG_SECRET));
                     return entropy;

http://git-wip-us.apache.org/repos/asf/cxf/blob/8e7d8e18/services/sts/sts-core/src/main/java/org/apache/cxf/sts/token/renewer/SAMLTokenRenewer.java
----------------------------------------------------------------------
diff --git a/services/sts/sts-core/src/main/java/org/apache/cxf/sts/token/renewer/SAMLTokenRenewer.java
b/services/sts/sts-core/src/main/java/org/apache/cxf/sts/token/renewer/SAMLTokenRenewer.java
index 0fe906d..6c77477 100644
--- a/services/sts/sts-core/src/main/java/org/apache/cxf/sts/token/renewer/SAMLTokenRenewer.java
+++ b/services/sts/sts-core/src/main/java/org/apache/cxf/sts/token/renewer/SAMLTokenRenewer.java
@@ -333,12 +333,13 @@ public class SAMLTokenRenewer extends AbstractSAMLTokenProvider implements
Token
             requestData.setSigVerCrypto(sigCrypto);
             WSSConfig wssConfig = WSSConfig.getNewInstance();
             requestData.setWssConfig(wssConfig);
-            requestData.setCallbackHandler(callbackHandler);
-            // Parse the HOK subject if it exists
             
             WSDocInfo docInfo = new WSDocInfo(((Element)tokenToRenew.getToken()).getOwnerDocument());
+            requestData.setWsDocInfo(docInfo);
+            // Parse the HOK subject if it exists
+            
             assertion.parseSubject(
-                new WSSSAMLKeyInfoProcessor(requestData, docInfo), sigCrypto, callbackHandler
+                new WSSSAMLKeyInfoProcessor(requestData), sigCrypto, callbackHandler
             );
             
             SAMLKeyInfo keyInfo = assertion.getSubjectKeyInfo();

http://git-wip-us.apache.org/repos/asf/cxf/blob/8e7d8e18/services/sts/sts-core/src/main/java/org/apache/cxf/sts/token/validator/SAMLTokenValidator.java
----------------------------------------------------------------------
diff --git a/services/sts/sts-core/src/main/java/org/apache/cxf/sts/token/validator/SAMLTokenValidator.java
b/services/sts/sts-core/src/main/java/org/apache/cxf/sts/token/validator/SAMLTokenValidator.java
index 59edca2..fbc803f 100644
--- a/services/sts/sts-core/src/main/java/org/apache/cxf/sts/token/validator/SAMLTokenValidator.java
+++ b/services/sts/sts-core/src/main/java/org/apache/cxf/sts/token/validator/SAMLTokenValidator.java
@@ -166,14 +166,14 @@ public class SAMLTokenValidator implements TokenValidator {
             requestData.setMsgContext(tokenParameters.getMessageContext());
             requestData.setSubjectCertConstraints(certConstraints.getCompiledSubjectContraints());
 
-            WSDocInfo docInfo = new WSDocInfo(validateTargetElement.getOwnerDocument());
+            requestData.setWsDocInfo(new WSDocInfo(validateTargetElement.getOwnerDocument()));
 
             // Verify the signature
             Signature sig = assertion.getSignature();
             KeyInfo keyInfo = sig.getKeyInfo();
             SAMLKeyInfo samlKeyInfo = 
                 SAMLUtil.getCredentialFromKeyInfo(
-                    keyInfo.getDOM(), new WSSSAMLKeyInfoProcessor(requestData, docInfo),
sigCrypto
+                    keyInfo.getDOM(), new WSSSAMLKeyInfoProcessor(requestData), sigCrypto
                 );
             assertion.verifySignature(samlKeyInfo);
                 

http://git-wip-us.apache.org/repos/asf/cxf/blob/8e7d8e18/services/sts/sts-core/src/test/java/org/apache/cxf/sts/operation/IssueSamlUnitTest.java
----------------------------------------------------------------------
diff --git a/services/sts/sts-core/src/test/java/org/apache/cxf/sts/operation/IssueSamlUnitTest.java
b/services/sts/sts-core/src/test/java/org/apache/cxf/sts/operation/IssueSamlUnitTest.java
index 86f2a7e..7b6c781 100644
--- a/services/sts/sts-core/src/test/java/org/apache/cxf/sts/operation/IssueSamlUnitTest.java
+++ b/services/sts/sts-core/src/test/java/org/apache/cxf/sts/operation/IssueSamlUnitTest.java
@@ -879,10 +879,10 @@ public class IssueSamlUnitTest extends org.junit.Assert {
         data.setDecCrypto(CryptoFactory.getInstance(properties));
         data.setCallbackHandler(new PasswordCallbackHandler());
         data.setWssConfig(WSSConfig.getNewInstance());
+        data.setWsDocInfo(new WSDocInfo(assertion.getOwnerDocument()));
         
         assertionWrapper.parseSubject(
-            new WSSSAMLKeyInfoProcessor(data, new WSDocInfo(assertion.getOwnerDocument())),

-                                        data.getSigVerCrypto(), data.getCallbackHandler()
+            new WSSSAMLKeyInfoProcessor(data), data.getSigVerCrypto(), data.getCallbackHandler()
         );
         
         SAMLKeyInfo samlKeyInfo = assertionWrapper.getSubjectKeyInfo();

http://git-wip-us.apache.org/repos/asf/cxf/blob/8e7d8e18/services/sts/systests/advanced/src/test/java/org/apache/cxf/systest/sts/batch/SimpleBatchSTSClient.java
----------------------------------------------------------------------
diff --git a/services/sts/systests/advanced/src/test/java/org/apache/cxf/systest/sts/batch/SimpleBatchSTSClient.java
b/services/sts/systests/advanced/src/test/java/org/apache/cxf/systest/sts/batch/SimpleBatchSTSClient.java
index 993cb93..40b214d 100644
--- a/services/sts/systests/advanced/src/test/java/org/apache/cxf/systest/sts/batch/SimpleBatchSTSClient.java
+++ b/services/sts/systests/advanced/src/test/java/org/apache/cxf/systest/sts/batch/SimpleBatchSTSClient.java
@@ -967,13 +967,15 @@ public class SimpleBatchSTSClient implements Configurable, InterceptorProvider
{
         } else {
             try {
                 EncryptedKeyProcessor proc = new EncryptedKeyProcessor();
-                WSDocInfo docInfo = new WSDocInfo(child.getOwnerDocument());
                 RequestData data = new RequestData();
                 data.setWssConfig(WSSConfig.getNewInstance());
                 data.setDecCrypto(createCrypto(true));
                 data.setCallbackHandler(createHandler());
-                List<WSSecurityEngineResult> result =
-                    proc.handleToken(child, data, docInfo);
+                
+                WSDocInfo docInfo = new WSDocInfo(child.getOwnerDocument());
+                data.setWsDocInfo(docInfo);
+                
+                List<WSSecurityEngineResult> result = proc.handleToken(child, data);
                 return 
                     (byte[])result.get(0).get(
                         WSSecurityEngineResult.TAG_SECRET

http://git-wip-us.apache.org/repos/asf/cxf/blob/8e7d8e18/services/sts/systests/advanced/src/test/java/org/apache/cxf/systest/sts/secure_conv/SCTTokenValidator.java
----------------------------------------------------------------------
diff --git a/services/sts/systests/advanced/src/test/java/org/apache/cxf/systest/sts/secure_conv/SCTTokenValidator.java
b/services/sts/systests/advanced/src/test/java/org/apache/cxf/systest/sts/secure_conv/SCTTokenValidator.java
index aee7f9a..2fb23e8 100644
--- a/services/sts/systests/advanced/src/test/java/org/apache/cxf/systest/sts/secure_conv/SCTTokenValidator.java
+++ b/services/sts/systests/advanced/src/test/java/org/apache/cxf/systest/sts/secure_conv/SCTTokenValidator.java
@@ -18,13 +18,10 @@
  */
 package org.apache.cxf.systest.sts.secure_conv;
 
-import org.w3c.dom.Document;
-
 import org.apache.cxf.ws.security.trust.STSTokenValidator;
 import org.apache.wss4j.common.ext.WSSecurityException;
 import org.apache.wss4j.common.saml.SAMLKeyInfo;
 import org.apache.wss4j.common.saml.SamlAssertionWrapper;
-import org.apache.wss4j.dom.WSDocInfo;
 import org.apache.wss4j.dom.handler.RequestData;
 import org.apache.wss4j.dom.saml.WSSSAMLKeyInfoProcessor;
 import org.apache.wss4j.dom.validate.Credential;
@@ -44,10 +41,8 @@ public class SCTTokenValidator extends STSTokenValidator {
             throw new WSSecurityException(WSSecurityException.ErrorCode.FAILURE);
         }
 
-        Document doc = transformedToken.getElement().getOwnerDocument();
-        
         transformedToken.parseSubject(
-            new WSSSAMLKeyInfoProcessor(data, new WSDocInfo(doc)), data.getSigVerCrypto(),

+            new WSSSAMLKeyInfoProcessor(data), data.getSigVerCrypto(), 
             data.getCallbackHandler()
         );
         SAMLKeyInfo keyInfo = transformedToken.getSubjectKeyInfo();

http://git-wip-us.apache.org/repos/asf/cxf/blob/8e7d8e18/services/sts/systests/basic/src/test/java/org/apache/cxf/systest/sts/issueunit/IssueUnitTest.java
----------------------------------------------------------------------
diff --git a/services/sts/systests/basic/src/test/java/org/apache/cxf/systest/sts/issueunit/IssueUnitTest.java
b/services/sts/systests/basic/src/test/java/org/apache/cxf/systest/sts/issueunit/IssueUnitTest.java
index b8de1fb..ac47a9f 100644
--- a/services/sts/systests/basic/src/test/java/org/apache/cxf/systest/sts/issueunit/IssueUnitTest.java
+++ b/services/sts/systests/basic/src/test/java/org/apache/cxf/systest/sts/issueunit/IssueUnitTest.java
@@ -654,10 +654,9 @@ public class IssueUnitTest extends AbstractBusClientServerTestBase {
         Crypto crypto = CryptoFactory.getInstance("serviceKeystore.properties");
         requestData.setDecCrypto(crypto);
         requestData.setSigVerCrypto(crypto);
+        requestData.setWsDocInfo(new WSDocInfo(token.getToken().getOwnerDocument()));
         
         Processor processor = new SAMLTokenProcessor();
-        return processor.handleToken(
-            token.getToken(), requestData, new WSDocInfo(token.getToken().getOwnerDocument())
-        );
+        return processor.handleToken(token.getToken(), requestData);
     }
 }

http://git-wip-us.apache.org/repos/asf/cxf/blob/8e7d8e18/services/sts/systests/basic/src/test/java/org/apache/cxf/systest/sts/rest/STSRESTTest.java
----------------------------------------------------------------------
diff --git a/services/sts/systests/basic/src/test/java/org/apache/cxf/systest/sts/rest/STSRESTTest.java
b/services/sts/systests/basic/src/test/java/org/apache/cxf/systest/sts/rest/STSRESTTest.java
index 4cc6b66..44ca437 100644
--- a/services/sts/systests/basic/src/test/java/org/apache/cxf/systest/sts/rest/STSRESTTest.java
+++ b/services/sts/systests/basic/src/test/java/org/apache/cxf/systest/sts/rest/STSRESTTest.java
@@ -1311,11 +1311,10 @@ public class STSRESTTest extends AbstractBusClientServerTestBase {
         Crypto crypto = CryptoFactory.getInstance("serviceKeystore.properties");
         requestData.setDecCrypto(crypto);
         requestData.setSigVerCrypto(crypto);
+        requestData.setWsDocInfo(new WSDocInfo(assertionElement.getOwnerDocument()));
         
         Processor processor = new SAMLTokenProcessor();
-        return processor.handleToken(
-            assertionElement, requestData, new WSDocInfo(assertionElement.getOwnerDocument())
-        );
+        return processor.handleToken(assertionElement, requestData);
     }
     
     private void validateJWTToken(String token, String audience) 

http://git-wip-us.apache.org/repos/asf/cxf/blob/8e7d8e18/services/sts/systests/sts-itests/src/test/java/org/apache/cxf/systest/sts/itests/unit/STSUnitTest.java
----------------------------------------------------------------------
diff --git a/services/sts/systests/sts-itests/src/test/java/org/apache/cxf/systest/sts/itests/unit/STSUnitTest.java
b/services/sts/systests/sts-itests/src/test/java/org/apache/cxf/systest/sts/itests/unit/STSUnitTest.java
index 7fdb04f..50d5409 100644
--- a/services/sts/systests/sts-itests/src/test/java/org/apache/cxf/systest/sts/itests/unit/STSUnitTest.java
+++ b/services/sts/systests/sts-itests/src/test/java/org/apache/cxf/systest/sts/itests/unit/STSUnitTest.java
@@ -122,11 +122,10 @@ public class STSUnitTest extends BasicSTSIntegrationTest {
         Crypto crypto = CryptoFactory.getInstance("clientKeystore.properties", 
                                                   this.getClass().getClassLoader());
         requestData.setSigVerCrypto(crypto);
+        requestData.setWsDocInfo(new WSDocInfo(token.getToken().getOwnerDocument()));
         
         Processor processor = new SAMLTokenProcessor();
-        return processor.handleToken(
-            token.getToken(), requestData, new WSDocInfo(token.getToken().getOwnerDocument())
-        );
+        return processor.handleToken(token.getToken(), requestData);
     }
     
 }


Mime
View raw message