[java-opensaml] branch master updated: Ignore format during NameIDPolicy evaluation.
Scott Cantor
cantor.2 at osu.edu
Wed Sep 4 10:24:07 EDT 2019
This is an automated email from the git hooks/post-receive script.
scantor pushed a commit to branch master
in repository java-opensaml.
View the commit online:
http://git.shibboleth.net/view/?p=java-opensaml.git;a=commit;h=945b40830469602f52ff0dfc67e837911dd13dcb
The following commit(s) were added to refs/heads/master by this push:
new 945b408 Ignore format during NameIDPolicy evaluation.
945b408 is described below
commit 945b40830469602f52ff0dfc67e837911dd13dcb
Author: Scott Cantor <cantor.2 at osu.edu>
AuthorDate: Wed Sep 4 10:24:05 2019 -0400
Ignore format during NameIDPolicy evaluation.
---
.../saml/common/profile/logic/AbstractNameIDPolicyPredicate.java | 9 +--------
.../saml/saml2/profile/impl/AddNameIDToSubjectsTest.java | 3 ++-
2 files changed, 3 insertions(+), 9 deletions(-)
diff --git a/opensaml-saml-api/src/main/java/org/opensaml/saml/common/profile/logic/AbstractNameIDPolicyPredicate.java b/opensaml-saml-api/src/main/java/org/opensaml/saml/common/profile/logic/AbstractNameIDPolicyPredicate.java
index d432d78..56f7305 100644
--- a/opensaml-saml-api/src/main/java/org/opensaml/saml/common/profile/logic/AbstractNameIDPolicyPredicate.java
+++ b/opensaml-saml-api/src/main/java/org/opensaml/saml/common/profile/logic/AbstractNameIDPolicyPredicate.java
@@ -201,14 +201,7 @@ public abstract class AbstractNameIDPolicyPredicate extends AbstractInitializabl
final String requesterId = requesterIdLookupStrategy != null ? requesterIdLookupStrategy.apply(input) : null;
final String responderId = responderIdLookupStrategy != null ? responderIdLookupStrategy.apply(input) : null;
- final String format = target.getFormat();
- if (formats.contains(format != null ? format : NameID.UNSPECIFIED)) {
- log.debug("Applying policy to NameIDPolicy with Format {}", format != null ? format : NameID.UNSPECIFIED);
- return doApply(requesterId, responderId, format, null, target.getSPNameQualifier());
- }
- log.debug("Policy checking disabled for NameIDPolicy with Format {}",
- format != null ? format : NameID.UNSPECIFIED);
- return true;
+ return doApply(requesterId, responderId, target.getFormat(), null, target.getSPNameQualifier());
}
/**
diff --git a/opensaml-saml-impl/src/test/java/org/opensaml/saml/saml2/profile/impl/AddNameIDToSubjectsTest.java b/opensaml-saml-impl/src/test/java/org/opensaml/saml/saml2/profile/impl/AddNameIDToSubjectsTest.java
index d00a8c4..7240022 100644
--- a/opensaml-saml-impl/src/test/java/org/opensaml/saml/saml2/profile/impl/AddNameIDToSubjectsTest.java
+++ b/opensaml-saml-impl/src/test/java/org/opensaml/saml/saml2/profile/impl/AddNameIDToSubjectsTest.java
@@ -219,7 +219,7 @@ public class AddNameIDToSubjectsTest extends XMLObjectBaseTestCase {
addAssertions();
final AuthnRequest request = SAML2ActionTestingSupport.buildAuthnRequest();
final NameIDPolicy policy = policyBuilder.buildObject();
- policy.setFormat(NameID.PERSISTENT);
+ policy.setFormat(NameID.UNSPECIFIED);
policy.setSPNameQualifier("foo");
request.setNameIDPolicy(policy);
prc.getInboundMessageContext().setMessage(request);
@@ -238,6 +238,7 @@ public class AddNameIDToSubjectsTest extends XMLObjectBaseTestCase {
Subject subject = assertion.getSubject();
Assert.assertNull(subject);
+ policy.setFormat(NameID.PERSISTENT);
policy.setSPNameQualifier("http://affiliation.example.org");
action.execute(prc);
ActionTestingSupport.assertProceedEvent(prc);
--
To stop receiving notification emails like this one, please contact
the administrator of this repository.
More information about the commits
mailing list