[java-identity-provider] branch master updated: Demote NameID precedence setting to SAML SSO classes.
Scott Cantor
cantor.2 at osu.edu
Fri Jan 3 11:31:11 EST 2020
This is an automated email from the git hooks/post-receive script.
scantor pushed a commit to branch master
in repository java-identity-provider.
View the commit online:
http://git.shibboleth.net/view/?p=java-identity-provider.git;a=commit;h=925febadffa1481558eca1191a30d965dce6d1e3
The following commit(s) were added to refs/heads/master by this push:
new 925feba Demote NameID precedence setting to SAML SSO classes.
925feba is described below
commit 925febadffa1481558eca1191a30d965dce6d1e3
Author: Scott Cantor <cantor.2 at osu.edu>
AuthorDate: Fri Jan 3 11:31:06 2020 -0500
Demote NameID precedence setting to SAML SSO classes.
---
.../admin/BasicAdministrativeFlowDescriptor.java | 6 ----
.../config/AuthenticationProfileConfiguration.java | 10 ------
.../idp/cas/config/LoginConfiguration.java | 37 ----------------------
.../system/conf/relying-party-mddriven.xml | 3 --
.../logic/DefaultNameIdentifierFormatStrategy.java | 15 ++++++---
5 files changed, 11 insertions(+), 60 deletions(-)
diff --git a/idp-admin-api/src/main/java/net/shibboleth/idp/admin/BasicAdministrativeFlowDescriptor.java b/idp-admin-api/src/main/java/net/shibboleth/idp/admin/BasicAdministrativeFlowDescriptor.java
index 8263296..f747332 100644
--- a/idp-admin-api/src/main/java/net/shibboleth/idp/admin/BasicAdministrativeFlowDescriptor.java
+++ b/idp-admin-api/src/main/java/net/shibboleth/idp/admin/BasicAdministrativeFlowDescriptor.java
@@ -453,12 +453,6 @@ public class BasicAdministrativeFlowDescriptor extends AbstractProfileConfigurat
}
/** {@inheritDoc} */
- @Nonnull @NonnullElements @NotLive @Unmodifiable public List<String> getNameIDFormatPrecedence(
- @Nullable final ProfileRequestContext profileRequestContext) {
- return Collections.emptyList();
- }
-
- /** {@inheritDoc} */
public boolean isForceAuthn(@Nullable final ProfileRequestContext profileRequestContext) {
return forceAuthnPredicate.test(profileRequestContext);
}
diff --git a/idp-authn-api/src/main/java/net/shibboleth/idp/authn/config/AuthenticationProfileConfiguration.java b/idp-authn-api/src/main/java/net/shibboleth/idp/authn/config/AuthenticationProfileConfiguration.java
index 2187fe9..6ad9fcb 100644
--- a/idp-authn-api/src/main/java/net/shibboleth/idp/authn/config/AuthenticationProfileConfiguration.java
+++ b/idp-authn-api/src/main/java/net/shibboleth/idp/authn/config/AuthenticationProfileConfiguration.java
@@ -74,16 +74,6 @@ public interface AuthenticationProfileConfiguration extends ProfileConfiguration
@Nullable final ProfileRequestContext profileRequestContext);
/**
- * Get the name identifier formats to use with this relying party, in order of preference.
- *
- * @param profileRequestContext current profile request context
- *
- * @return name identifier formats to use
- */
- @Nonnull @NonnullElements @NotLive @Unmodifiable List<String> getNameIDFormatPrecedence(
- @Nullable final ProfileRequestContext profileRequestContext);
-
- /**
* Get whether the authentication process should include a proof of user presence.
*
* @param profileRequestContext current profile request context
diff --git a/idp-cas-api/src/main/java/net/shibboleth/idp/cas/config/LoginConfiguration.java b/idp-cas-api/src/main/java/net/shibboleth/idp/cas/config/LoginConfiguration.java
index 2f7e17d..c3fb73b 100644
--- a/idp-cas-api/src/main/java/net/shibboleth/idp/cas/config/LoginConfiguration.java
+++ b/idp-cas-api/src/main/java/net/shibboleth/idp/cas/config/LoginConfiguration.java
@@ -70,9 +70,6 @@ public class LoginConfiguration extends AbstractProtocolConfiguration
/** Lookup function to supply defaultAuthenticationContexts property. */
@Nonnull private Function<ProfileRequestContext,Collection<AuthnContextClassRefPrincipal>>
defaultAuthenticationContextsLookupStrategy;
-
- /** Lookup function to supply nameIDFormatPrecedence property. */
- @Nonnull private Function<ProfileRequestContext,Collection<String>> nameIDFormatPrecedenceLookupStrategy;
/** Whether to mandate forced authentication for the request. */
@Nonnull private Predicate<ProfileRequestContext> forceAuthnPredicate;
@@ -87,7 +84,6 @@ public class LoginConfiguration extends AbstractProtocolConfiguration
authenticationFlowsLookupStrategy = FunctionSupport.constant(null);
postAuthenticationFlowsLookupStrategy = FunctionSupport.constant(null);
defaultAuthenticationContextsLookupStrategy = FunctionSupport.constant(null);
- nameIDFormatPrecedenceLookupStrategy = FunctionSupport.constant(null);
forceAuthnPredicate = Predicates.alwaysFalse();
proxyCountLookupStrategy = FunctionSupport.constant(null);
}
@@ -197,39 +193,6 @@ public class LoginConfiguration extends AbstractProtocolConfiguration
}
/** {@inheritDoc} */
- @Nonnull @NonnullElements @NotLive @Unmodifiable public List<String> getNameIDFormatPrecedence(
- @Nullable final ProfileRequestContext profileRequestContext) {
-
- final Collection<String> formats = nameIDFormatPrecedenceLookupStrategy.apply(profileRequestContext);
- if (formats != null) {
- return List.copyOf(formats);
- }
- return Collections.emptyList();
- }
-
- /**
- * Set the name identifier formats to use.
- *
- * @param formats name identifier formats to use
- */
- public void setNameIDFormatPrecedence(@Nonnull @NonnullElements final Collection<String> formats) {
- Constraint.isNotNull(formats, "List of formats cannot be null");
-
- nameIDFormatPrecedenceLookupStrategy =
- FunctionSupport.constant(List.copyOf(StringSupport.normalizeStringCollection(formats)));
- }
-
- /**
- * Set a lookup strategy for the name identifier formats to use.
- *
- * @param strategy lookup strategy
- */
- public void setNameIDFormatPrecedenceLookupStrategy(
- @Nonnull final Function<ProfileRequestContext,Collection<String>> strategy) {
- nameIDFormatPrecedenceLookupStrategy = Constraint.isNotNull(strategy, "Lookup strategy cannot be null");
- }
-
- /** {@inheritDoc} */
public boolean isForceAuthn(@Nullable final ProfileRequestContext profileRequestContext) {
return forceAuthnPredicate.test(profileRequestContext);
}
diff --git a/idp-conf/src/main/resources/system/conf/relying-party-mddriven.xml b/idp-conf/src/main/resources/system/conf/relying-party-mddriven.xml
index 80e5f60..afdf360 100644
--- a/idp-conf/src/main/resources/system/conf/relying-party-mddriven.xml
+++ b/idp-conf/src/main/resources/system/conf/relying-party-mddriven.xml
@@ -642,9 +642,6 @@
<property name="postAuthenticationFlowsLookupStrategy">
<bean parent="shibboleth.MDDrivenListProperty" p:propertyName="postAuthenticationFlows" />
</property>
- <property name="nameIDFormatPrecedenceLookupStrategy">
- <bean parent="shibboleth.MDDrivenListProperty" p:propertyName="nameIDFormatPrecedence" />
- </property>
<property name="forceAuthnPredicate">
<bean class="net.shibboleth.utilities.java.support.logic.PredicateSupport" factory-method="fromFunction">
<constructor-arg>
diff --git a/idp-saml-api/src/main/java/net/shibboleth/idp/saml/profile/logic/DefaultNameIdentifierFormatStrategy.java b/idp-saml-api/src/main/java/net/shibboleth/idp/saml/profile/logic/DefaultNameIdentifierFormatStrategy.java
index 713c35e..02164ab 100644
--- a/idp-saml-api/src/main/java/net/shibboleth/idp/saml/profile/logic/DefaultNameIdentifierFormatStrategy.java
+++ b/idp-saml-api/src/main/java/net/shibboleth/idp/saml/profile/logic/DefaultNameIdentifierFormatStrategy.java
@@ -25,7 +25,6 @@ import java.util.function.Function;
import javax.annotation.Nonnull;
import javax.annotation.Nullable;
-import net.shibboleth.idp.authn.config.AuthenticationProfileConfiguration;
import net.shibboleth.idp.profile.config.ProfileConfiguration;
import net.shibboleth.idp.profile.context.RelyingPartyContext;
import net.shibboleth.utilities.java.support.annotation.constraint.NotEmpty;
@@ -119,12 +118,20 @@ public class DefaultNameIdentifierFormatStrategy extends MetadataNameIdentifierF
profileConfig = relyingPartyCtx.getProfileConfig();
}
- if (profileConfig != null && profileConfig instanceof AuthenticationProfileConfiguration) {
+ if (profileConfig
+ instanceof net.shibboleth.idp.saml.saml2.profile.config.BrowserSSOProfileConfiguration) {
fromConfig.addAll(
- ((AuthenticationProfileConfiguration) profileConfig).getNameIDFormatPrecedence(input));
+ ((net.shibboleth.idp.saml.saml2.profile.config.BrowserSSOProfileConfiguration) profileConfig)
+ .getNameIDFormatPrecedence(input));
+ log.debug("Configuration specifies the following formats: {}", fromConfig);
+ } else if (profileConfig instanceof
+ net.shibboleth.idp.saml.saml1.profile.config.BrowserSSOProfileConfiguration) {
+ fromConfig.addAll(
+ ((net.shibboleth.idp.saml.saml1.profile.config.BrowserSSOProfileConfiguration) profileConfig)
+ .getNameIDFormatPrecedence(input));
log.debug("Configuration specifies the following formats: {}", fromConfig);
} else {
- log.debug("No ProfileConfiguraton available (or not an AuthenticationProfileConfiguration)");
+ log.debug("No ProfileConfiguraton available (or not a BrowserSSOProfileConfiguration)");
}
} else {
log.debug("No RelyingPartyContext or RelyingPartyConfiguration available");
--
To stop receiving notification emails like this one, please contact
the administrator of this repository.
More information about the commits
mailing list