Return-Path: X-Original-To: apmail-cxf-commits-archive@www.apache.org Delivered-To: apmail-cxf-commits-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 5A28610FE6 for ; Wed, 14 Jan 2015 16:58:27 +0000 (UTC) Received: (qmail 94367 invoked by uid 500); 14 Jan 2015 16:58:29 -0000 Delivered-To: apmail-cxf-commits-archive@cxf.apache.org Received: (qmail 94176 invoked by uid 500); 14 Jan 2015 16:58:29 -0000 Mailing-List: contact commits-help@cxf.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@cxf.apache.org Delivered-To: mailing list commits@cxf.apache.org Received: (qmail 94054 invoked by uid 99); 14 Jan 2015 16:58:28 -0000 Received: from tyr.zones.apache.org (HELO tyr.zones.apache.org) (140.211.11.114) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 14 Jan 2015 16:58:28 +0000 Received: by tyr.zones.apache.org (Postfix, from userid 65534) id B2885A420DC; Wed, 14 Jan 2015 16:58:28 +0000 (UTC) Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit From: coheigea@apache.org To: commits@cxf.apache.org Date: Wed, 14 Jan 2015 16:58:30 -0000 Message-Id: <6a2a0e9f9d494d7f8d3a208724f59158@git.apache.org> In-Reply-To: <81147151847e4a799e0f6356f5025876@git.apache.org> References: <81147151847e4a799e0f6356f5025876@git.apache.org> X-Mailer: ASF-Git Admin Mailer Subject: [3/3] cxf git commit: Fixing test Fixing test Project: http://git-wip-us.apache.org/repos/asf/cxf/repo Commit: http://git-wip-us.apache.org/repos/asf/cxf/commit/b6b7a419 Tree: http://git-wip-us.apache.org/repos/asf/cxf/tree/b6b7a419 Diff: http://git-wip-us.apache.org/repos/asf/cxf/diff/b6b7a419 Branch: refs/heads/2.7.x-fixes Commit: b6b7a419ab42e2fd006f3868773a6d3cdb3a0041 Parents: 2640b69 Author: Colm O hEigeartaigh Authored: Wed Jan 14 16:58:16 2015 +0000 Committer: Colm O hEigeartaigh Committed: Wed Jan 14 16:58:16 2015 +0000 ---------------------------------------------------------------------- parent/pom.xml | 2 +- .../saml/sso/SAMLProtocolResponseValidator.java | 15 ++------------- .../security/saml/sso/SAMLResponseValidatorTest.java | 12 ++++++------ 3 files changed, 9 insertions(+), 20 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/cxf/blob/b6b7a419/parent/pom.xml ---------------------------------------------------------------------- diff --git a/parent/pom.xml b/parent/pom.xml index 99c507e..0e6187f 100644 --- a/parent/pom.xml +++ b/parent/pom.xml @@ -158,7 +158,7 @@ 4.4.1 3.1.4 1.6.3 - 1.6.17 + 1.6.18-SNAPSHOT 2.11.0 2.6.0 2.1.0 http://git-wip-us.apache.org/repos/asf/cxf/blob/b6b7a419/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 e02cb38..d6bfee6 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 @@ -80,16 +80,12 @@ public class SAMLProtocolResponseValidator { private Validator assertionValidator = new SamlAssertionValidator(); private Validator signatureValidator = new SignatureTrustValidator(); -<<<<<<< HEAD -======= - private boolean keyInfoMustBeAvailable = true; /** * The time in seconds in the future within which the NotBefore time of an incoming * Assertion is valid. The default is 60 seconds. */ private int futureTTL = 60; ->>>>>>> ce2c2f3... Adding some more SAML SSO tests /** * Validate a SAML 2 Protocol Response @@ -122,7 +118,7 @@ public class SAMLProtocolResponseValidator { currentTime = currentTime.plusSeconds(futureTTL); if (samlResponse.getIssueInstant().isAfter(currentTime)) { LOG.fine("SAML Response IssueInstant not met"); - throw new WSSecurityException(WSSecurityException.ErrorCode.FAILURE, "invalidSAMLsecurity"); + throw new WSSecurityException(WSSecurityException.FAILURE, "invalidSAMLsecurity"); } } @@ -179,7 +175,7 @@ public class SAMLProtocolResponseValidator { currentTime = currentTime.plusSeconds(futureTTL); if (samlResponse.getIssueInstant().isAfter(currentTime)) { LOG.fine("SAML Response IssueInstant not met"); - throw new WSSecurityException(WSSecurityException.ErrorCode.FAILURE, "invalidSAMLsecurity"); + throw new WSSecurityException(WSSecurityException.FAILURE, "invalidSAMLsecurity"); } } @@ -539,12 +535,6 @@ public class SAMLProtocolResponseValidator { } } -<<<<<<< HEAD -======= - public void setKeyInfoMustBeAvailable(boolean keyInfoMustBeAvailable) { - this.keyInfoMustBeAvailable = keyInfoMustBeAvailable; - } - public int getFutureTTL() { return futureTTL; } @@ -553,5 +543,4 @@ public class SAMLProtocolResponseValidator { this.futureTTL = futureTTL; } ->>>>>>> ce2c2f3... Adding some more SAML SSO tests } http://git-wip-us.apache.org/repos/asf/cxf/blob/b6b7a419/rt/rs/security/sso/saml/src/test/java/org/apache/cxf/rs/security/saml/sso/SAMLResponseValidatorTest.java ---------------------------------------------------------------------- diff --git a/rt/rs/security/sso/saml/src/test/java/org/apache/cxf/rs/security/saml/sso/SAMLResponseValidatorTest.java b/rt/rs/security/sso/saml/src/test/java/org/apache/cxf/rs/security/saml/sso/SAMLResponseValidatorTest.java index 334cbf5..56f910a 100644 --- a/rt/rs/security/sso/saml/src/test/java/org/apache/cxf/rs/security/saml/sso/SAMLResponseValidatorTest.java +++ b/rt/rs/security/sso/saml/src/test/java/org/apache/cxf/rs/security/saml/sso/SAMLResponseValidatorTest.java @@ -585,9 +585,9 @@ public class SAMLResponseValidatorTest extends org.junit.Assert { callbackHandler.setIssuer("http://cxf.apache.org/issuer"); callbackHandler.setConfirmationMethod(SAML2Constants.CONF_SENDER_VOUCHES); - SAMLCallback samlCallback = new SAMLCallback(); - SAMLUtil.doSAMLCallback(callbackHandler, samlCallback); - SamlAssertionWrapper assertion = new SamlAssertionWrapper(samlCallback); + SAMLParms samlParms = new SAMLParms(); + samlParms.setCallbackHandler(callbackHandler); + AssertionWrapper assertion = new AssertionWrapper(samlParms); response.getAssertions().add(assertion.getSaml2()); @@ -629,9 +629,9 @@ public class SAMLResponseValidatorTest extends org.junit.Assert { callbackHandler.setIssuer("http://cxf.apache.org/issuer"); callbackHandler.setConfirmationMethod(SAML2Constants.CONF_SENDER_VOUCHES); - SAMLCallback samlCallback = new SAMLCallback(); - SAMLUtil.doSAMLCallback(callbackHandler, samlCallback); - SamlAssertionWrapper assertion = new SamlAssertionWrapper(samlCallback); + SAMLParms samlParms = new SAMLParms(); + samlParms.setCallbackHandler(callbackHandler); + AssertionWrapper assertion = new AssertionWrapper(samlParms); assertion.getSaml2().setIssueInstant(new DateTime().plusMinutes(5));