cxf-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From cohei...@apache.org
Subject [4/4] cxf git commit: Fixing backmerge
Date Fri, 31 Jul 2015 11:12:01 GMT
Fixing backmerge


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

Branch: refs/heads/2.7.x-fixes
Commit: 6c2ab7d08840f21e265819c3fc5108ab4465439b
Parents: 01d5ea1
Author: Colm O hEigeartaigh <coheigea@apache.org>
Authored: Fri Jul 31 12:11:49 2015 +0100
Committer: Colm O hEigeartaigh <coheigea@apache.org>
Committed: Fri Jul 31 12:11:49 2015 +0100

----------------------------------------------------------------------
 ...AbstractRequestAssertionConsumerHandler.java | 11 --------
 .../saml/sso/SAMLSSOResponseValidator.java      |  2 +-
 .../saml/sso/CombinedValidatorTest.java         | 27 +++++---------------
 3 files changed, 7 insertions(+), 33 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cxf/blob/6c2ab7d0/rt/rs/security/sso/saml/src/main/java/org/apache/cxf/rs/security/saml/sso/AbstractRequestAssertionConsumerHandler.java
----------------------------------------------------------------------
diff --git a/rt/rs/security/sso/saml/src/main/java/org/apache/cxf/rs/security/saml/sso/AbstractRequestAssertionConsumerHandler.java
b/rt/rs/security/sso/saml/src/main/java/org/apache/cxf/rs/security/saml/sso/AbstractRequestAssertionConsumerHandler.java
index 2c37543..ef8b0e1 100644
--- a/rt/rs/security/sso/saml/src/main/java/org/apache/cxf/rs/security/saml/sso/AbstractRequestAssertionConsumerHandler.java
+++ b/rt/rs/security/sso/saml/src/main/java/org/apache/cxf/rs/security/saml/sso/AbstractRequestAssertionConsumerHandler.java
@@ -65,11 +65,7 @@ public class AbstractRequestAssertionConsumerHandler extends AbstractSSOSpHandle
     private boolean supportBase64Encoding = true;
     private boolean enforceAssertionsSigned = true;
     private boolean enforceKnownIssuer = true;
-<<<<<<< HEAD
-=======
-    private boolean keyInfoMustBeAvailable = true;
     private boolean enforceResponseSigned;
->>>>>>> a61db28... Adding more SAML SSO tests
     private TokenReplayCache<String> replayCache;
 
     private MessageContext messageContext;
@@ -340,12 +336,6 @@ public class AbstractRequestAssertionConsumerHandler extends AbstractSSOSpHandle
         LOG.warning(errorMsg.toString());
     }
     
-<<<<<<< HEAD
-=======
-    public void setKeyInfoMustBeAvailable(boolean keyInfoMustBeAvailable) {
-        this.keyInfoMustBeAvailable = keyInfoMustBeAvailable;
-    }
-
     public boolean isEnforceResponseSigned() {
         return enforceResponseSigned;
     }
@@ -356,5 +346,4 @@ public class AbstractRequestAssertionConsumerHandler extends AbstractSSOSpHandle
     public void setEnforceResponseSigned(boolean enforceResponseSigned) {
         this.enforceResponseSigned = enforceResponseSigned;
     }
->>>>>>> a61db28... Adding more SAML SSO tests
 }

http://git-wip-us.apache.org/repos/asf/cxf/blob/6c2ab7d0/rt/rs/security/sso/saml/src/main/java/org/apache/cxf/rs/security/saml/sso/SAMLSSOResponseValidator.java
----------------------------------------------------------------------
diff --git a/rt/rs/security/sso/saml/src/main/java/org/apache/cxf/rs/security/saml/sso/SAMLSSOResponseValidator.java
b/rt/rs/security/sso/saml/src/main/java/org/apache/cxf/rs/security/saml/sso/SAMLSSOResponseValidator.java
index 30bdcd8..d9234d9 100644
--- a/rt/rs/security/sso/saml/src/main/java/org/apache/cxf/rs/security/saml/sso/SAMLSSOResponseValidator.java
+++ b/rt/rs/security/sso/saml/src/main/java/org/apache/cxf/rs/security/saml/sso/SAMLSSOResponseValidator.java
@@ -94,7 +94,7 @@ public class SAMLSSOResponseValidator {
         
         if (enforceResponseSigned && !samlResponse.isSigned()) {
             LOG.fine("The Response must be signed!");
-            throw new WSSecurityException(WSSecurityException.ErrorCode.FAILURE, "invalidSAMLsecurity");
+            throw new WSSecurityException(WSSecurityException.FAILURE, "invalidSAMLsecurity");
         }
         
         // Validate Assertions

http://git-wip-us.apache.org/repos/asf/cxf/blob/6c2ab7d0/rt/rs/security/sso/saml/src/test/java/org/apache/cxf/rs/security/saml/sso/CombinedValidatorTest.java
----------------------------------------------------------------------
diff --git a/rt/rs/security/sso/saml/src/test/java/org/apache/cxf/rs/security/saml/sso/CombinedValidatorTest.java
b/rt/rs/security/sso/saml/src/test/java/org/apache/cxf/rs/security/saml/sso/CombinedValidatorTest.java
index dc2f167..e83cc27 100644
--- a/rt/rs/security/sso/saml/src/test/java/org/apache/cxf/rs/security/saml/sso/CombinedValidatorTest.java
+++ b/rt/rs/security/sso/saml/src/test/java/org/apache/cxf/rs/security/saml/sso/CombinedValidatorTest.java
@@ -31,11 +31,12 @@ import javax.xml.parsers.DocumentBuilderFactory;
 
 import org.w3c.dom.Document;
 import org.w3c.dom.Element;
-<<<<<<< HEAD
 import org.apache.cxf.staxutils.StaxUtils;
 import org.apache.ws.security.WSConstants;
 import org.apache.ws.security.WSSConfig;
+import org.apache.ws.security.WSSecurityException;
 import org.apache.ws.security.components.crypto.Crypto;
+import org.apache.ws.security.components.crypto.CryptoType;
 import org.apache.ws.security.components.crypto.Merlin;
 import org.apache.ws.security.saml.ext.AssertionWrapper;
 import org.apache.ws.security.saml.ext.OpenSAMLUtil;
@@ -45,23 +46,6 @@ import org.apache.ws.security.saml.ext.bean.ConditionsBean;
 import org.apache.ws.security.saml.ext.bean.SubjectConfirmationDataBean;
 import org.apache.ws.security.saml.ext.builder.SAML2Constants;
 import org.apache.ws.security.util.Loader;
-=======
-import org.apache.wss4j.common.crypto.Crypto;
-import org.apache.wss4j.common.crypto.CryptoType;
-import org.apache.wss4j.common.crypto.Merlin;
-import org.apache.wss4j.common.ext.WSSecurityException;
-import org.apache.wss4j.common.saml.OpenSAMLUtil;
-import org.apache.wss4j.common.saml.SAMLCallback;
-import org.apache.wss4j.common.saml.SAMLUtil;
-import org.apache.wss4j.common.saml.SamlAssertionWrapper;
-import org.apache.wss4j.common.saml.bean.AudienceRestrictionBean;
-import org.apache.wss4j.common.saml.bean.ConditionsBean;
-import org.apache.wss4j.common.saml.bean.SubjectConfirmationDataBean;
-import org.apache.wss4j.common.saml.builder.SAML2Constants;
-import org.apache.wss4j.common.util.Loader;
-import org.apache.wss4j.dom.WSConstants;
-import org.apache.wss4j.dom.WSSConfig;
->>>>>>> a61db28... Adding more SAML SSO tests
 import org.joda.time.DateTime;
 import org.opensaml.common.SignableSAMLObject;
 import org.opensaml.common.xml.SAMLConstants;
@@ -242,10 +226,11 @@ public class CombinedValidatorTest extends org.junit.Assert {
         // Parse the response
         SSOValidatorResponse ssoResponse = 
             ssoValidator.validateSamlResponse(marshalledResponse, false);
-        SamlAssertionWrapper parsedAssertion = 
-            new SamlAssertionWrapper(ssoResponse.getAssertionElement());
+        Document assertionDoc = StaxUtils.read(new StringReader(ssoResponse.getAssertion()));
+        AssertionWrapper parsedAssertion = 
+            new AssertionWrapper(assertionDoc.getDocumentElement());
         
-        assertEquals("alice", parsedAssertion.getSubjectName());
+        assertEquals("alice", parsedAssertion.getSaml2().getSubject().getNameID().getValue());
     }
     
     @org.junit.Test


Mime
View raw message