[java-identity-provider] branch main updated: JSPROF-1 - Move RelyingParty "layer" into java-shib-profile
Scott Cantor
cantor.2 at osu.edu
Wed Feb 22 15:17:10 UTC 2023
This is an automated email from the git hooks/post-receive script.
scantor pushed a commit to branch main
in repository java-identity-provider.
View the commit online:
http://git.shibboleth.net/view/?p=java-identity-provider.git;a=commit;h=c958da05c275bfebace81ed777661c6bc6fe9ed3
The following commit(s) were added to refs/heads/main by this push:
new c958da05c JSPROF-1 - Move RelyingParty "layer" into java-shib-profile
c958da05c is described below
commit c958da05c275bfebace81ed777661c6bc6fe9ed3
Author: Scott Cantor <cantor.2 at osu.edu>
AuthorDate: Wed Feb 22 10:17:07 2023 -0500
JSPROF-1 - Move RelyingParty "layer" into java-shib-profile
https://shibboleth.atlassian.net/browse/JSPROF-1
Refactor SAML profile config classes.
Add interfaces for all public settings.
Move SAML config classes into saml-impl package.
Relocate some tests to account for changes.
---
.../shibboleth/idp/conf/relying-party-mddriven.xml | 18 +-
.../shibboleth/idp/conf/relying-party-system.xml | 22 +-
.../idp/flows/admin/resolvertest-beans.xml | 4 +-
.../idp/flows/authn/saml-authn-beans.xml | 2 +-
.../flows/saml/logout/saml2-logoutprop-flow.xml | 2 +-
.../flows/saml/saml1/artifact-resolution-beans.xml | 2 +-
.../idp/flows/saml/saml1/attribute-query-beans.xml | 2 +-
.../idp/flows/saml/saml1/sso-abstract-beans.xml | 2 +-
.../flows/saml/saml2/artifact-resolution-beans.xml | 2 +-
.../idp/flows/saml/saml2/attribute-query-beans.xml | 2 +-
.../idp/flows/saml/saml2/slo-artifact-beans.xml | 2 +-
.../idp/flows/saml/saml2/slo-back-beans.xml | 2 +-
.../flows/saml/saml2/slo-front-abstract-beans.xml | 2 +-
.../idp/flows/saml/saml2/sso-abstract-beans.xml | 2 +-
.../idp/flows/saml/saml2/sso-artifact-beans.xml | 4 +-
.../idp/flows/saml/saml2/sso-ecp-beans.xml | 2 +-
.../idp/flows/saml/saml2/sso-post-beans.xml | 2 +-
.../flows/saml/saml2/sso-post-simplesign-beans.xml | 2 +-
.../idp/flows/saml/saml2/sso-redirect-beans.xml | 2 +-
.../idp/flows/saml/saml2/sso-unsolicited-beans.xml | 2 +-
.../config/BrowserSSOProfileConfiguration.java | 63 ++
.../profile/config/SAMLProfileConfiguration.java | 6 +-
.../logic/IncludeAttributeStatementPredicate.java | 12 +-
.../navigate/SessionLifetimeLookupFunction.java | 4 +-
.../DefaultNameIdentifierFormatStrategy.java | 5 +-
.../config/BrowserSSOProfileConfiguration.java | 1033 +-------------------
.../profile/config/ECPProfileConfiguration.java | 71 +-
.../logic/IgnoreScopingProfileConfigPredicate.java | 4 +-
.../SuppressAuthenticatingAuthorityPredicate.java | 4 +-
.../navigate/ProxyRestrictionLookupFunction.java | 6 +-
idp-saml-impl/pom.xml | 6 +
.../impl}/AbstractSAMLProfileConfiguration.java | 3 +-
.../saml/profile/config/impl}/package-info.java | 7 +-
...ractSAML1ArtifactAwareProfileConfiguration.java | 4 +-
...AML1AssertionProducingProfileConfiguration.java | 2 +-
.../ArtifactResolutionProfileConfiguration.java | 4 +-
.../impl}/AttributeQueryProfileConfiguration.java | 2 +-
.../impl}/BrowserSSOProfileConfiguration.java | 21 +-
.../saml1/profile/config/impl}/package-info.java | 4 +-
...ractSAML2ArtifactAwareProfileConfiguration.java | 2 +-
...AML2AssertionProducingProfileConfiguration.java | 2 +-
.../impl}/AbstractSAML2ProfileConfiguration.java | 4 +-
.../ArtifactResolutionProfileConfiguration.java | 2 +-
.../impl}/AttributeQueryProfileConfiguration.java | 2 +-
.../impl}/BrowserSSOProfileConfiguration.java | 183 +---
.../config/impl}/ECPProfileConfiguration.java | 2 +-
.../config/impl}/SSOSProfileConfiguration.java | 3 +-
.../impl}/SingleLogoutProfileConfiguration.java | 2 +-
.../saml2/profile/config/impl}/package-info.java | 4 +-
.../profile/impl/PopulateEncryptionParameters.java | 2 +-
.../impl/tests}/FinalizeAuthenticationTest.java | 49 +-
.../idp/authn/impl/tests}/package-info.java | 4 +-
.../idp/profile/impl/tests}/package-info.java | 7 +-
.../AbstractSAMLProfileConfigurationTest.java | 4 +-
.../DefaultNameIdentifierFormatStrategyTest.java | 2 +-
.../impl/InitializeAuthenticationContextTest.java | 2 +-
.../PopulateBindingAndEndpointContextsTest.java | 2 +-
...ArtifactResolutionProfileConfigurationTest.java | 3 +-
.../AttributeQueryProfileConfigurationTest.java | 2 +-
.../impl}/BrowserSSOProfileConfigurationTest.java | 2 +-
.../impl/AddAttributeStatementToAssertionTest.java | 1 -
.../AddAuthenticationStatementToAssertionTest.java | 1 -
.../profile/impl}/SAML1ActionSupportTest.java | 2 +-
.../profile/impl}/SAML1ActionTestingSupport.java | 8 +-
.../AbstractSAML2ProfileConfigurationTest.java | 2 +-
...ArtifactResolutionProfileConfigurationTest.java | 2 +-
.../AttributeQueryProfileConfigurationTest.java | 2 +-
.../impl}/BrowserSSOProfileConfigurationTest.java | 3 +-
.../config/impl}/SSOSProfileConfigurationTest.java | 13 +-
.../SingleLogoutProfileConfigurationTest.java | 2 +-
.../tests/ProxyRestrictionLookupFunctionTest.java | 2 +-
.../impl/AddAttributeStatementToAssertionTest.java | 1 -
.../saml2/profile/impl/AddAuthnRequestTest.java | 3 +-
.../impl/AddAuthnStatementToAssertionTest.java | 3 +-
.../impl/PopulateEncryptionParametersTest.java | 4 +-
.../profile/impl/PreProcessLogoutMessageTest.java | 1 -
.../profile/impl/ProcessLogoutRequestTest.java | 3 +-
.../impl/ProcessRequestedAuthnContextTest.java | 3 +-
.../profile/impl}/SAML2ActionSupportTest.java | 2 +-
.../profile/impl}/SAML2ActionTestingSupport.java | 8 +-
80 files changed, 294 insertions(+), 1398 deletions(-)
diff --git a/idp-conf-impl/src/main/resources/net/shibboleth/idp/conf/relying-party-mddriven.xml b/idp-conf-impl/src/main/resources/net/shibboleth/idp/conf/relying-party-mddriven.xml
index f8b5b231b..8192ddef1 100644
--- a/idp-conf-impl/src/main/resources/net/shibboleth/idp/conf/relying-party-mddriven.xml
+++ b/idp-conf-impl/src/main/resources/net/shibboleth/idp/conf/relying-party-mddriven.xml
@@ -268,7 +268,7 @@
<!-- Concrete profile beans. -->
<bean id="Shibboleth.SSO.MDDriven" parent="AbstractMDDrivenSAML1AssertionProducingProfile" lazy-init="true"
- class="net.shibboleth.idp.saml.saml1.profile.config.BrowserSSOProfileConfiguration"
+ class="net.shibboleth.idp.saml.saml1.profile.config.impl.BrowserSSOProfileConfiguration"
p:artifactConfiguration-ref="shibboleth.DefaultArtifactConfiguration">
<property name="artifactConfigurationLookupStrategy">
<bean parent="shibboleth.MDDrivenBeanProperty" p:propertyName="artifactConfiguration"
@@ -322,7 +322,7 @@
</bean>
<bean id="SAML1.AttributeQuery.MDDriven" parent="AbstractMDDrivenSAML1AssertionProducingProfile" lazy-init="true"
- class="net.shibboleth.idp.saml.saml1.profile.config.AttributeQueryProfileConfiguration">
+ class="net.shibboleth.idp.saml.saml1.profile.config.impl.AttributeQueryProfileConfiguration">
<property name="signResponsesPredicate">
<bean class="net.shibboleth.shared.logic.PredicateSupport" factory-method="fromFunction">
<constructor-arg>
@@ -336,7 +336,7 @@
</bean>
<bean id="SAML1.ArtifactResolution.MDDriven" parent="AbstractMDDrivenSAMLProfile" lazy-init="true"
- class="net.shibboleth.idp.saml.saml1.profile.config.ArtifactResolutionProfileConfiguration">
+ class="net.shibboleth.idp.saml.saml1.profile.config.impl.ArtifactResolutionProfileConfiguration">
<property name="signResponsesPredicate">
<bean class="net.shibboleth.shared.logic.PredicateSupport" factory-method="fromFunction">
<constructor-arg>
@@ -358,7 +358,7 @@
</bean>
<bean id="SAML2.SSO.MDDriven" parent="AbstractMDDrivenSAML2AssertionProducingProfile" lazy-init="true"
- class="net.shibboleth.idp.saml.saml2.profile.config.BrowserSSOProfileConfiguration"
+ class="net.shibboleth.idp.saml.saml2.profile.config.impl.BrowserSSOProfileConfiguration"
p:artifactConfiguration-ref="shibboleth.DefaultArtifactConfiguration">
<property name="artifactConfigurationLookupStrategy">
<bean parent="shibboleth.MDDrivenBeanProperty" p:propertyName="artifactConfiguration"
@@ -543,14 +543,14 @@
</bean>
<bean id="SAML2.ECP.MDDriven" parent="SAML2.SSO.MDDriven" lazy-init="true"
- class="net.shibboleth.idp.saml.saml2.profile.config.ECPProfileConfiguration">
+ class="net.shibboleth.idp.saml.saml2.profile.config.impl.ECPProfileConfiguration">
<property name="localEventsLookupStrategy">
<bean parent="shibboleth.MDDrivenSetProperty" p:propertyName="localEvents" />
</property>
</bean>
<bean id="SAML2.Logout.MDDriven" parent="AbstractMDDrivenSAML2Profile" lazy-init="true"
- class="net.shibboleth.idp.saml.saml2.profile.config.SingleLogoutProfileConfiguration"
+ class="net.shibboleth.idp.saml.saml2.profile.config.impl.SingleLogoutProfileConfiguration"
p:artifactConfiguration-ref="shibboleth.DefaultArtifactConfiguration">
<property name="artifactConfigurationLookupStrategy">
<bean parent="shibboleth.MDDrivenBeanProperty" p:propertyName="artifactConfiguration"
@@ -640,7 +640,7 @@
</bean>
<bean id="SAML2.AttributeQuery.MDDriven" parent="AbstractMDDrivenSAML2AssertionProducingProfile" lazy-init="true"
- class="net.shibboleth.idp.saml.saml2.profile.config.AttributeQueryProfileConfiguration">
+ class="net.shibboleth.idp.saml.saml2.profile.config.impl.AttributeQueryProfileConfiguration">
<property name="signResponsesPredicate">
<bean class="net.shibboleth.shared.logic.PredicateSupport" factory-method="fromFunction">
<constructor-arg>
@@ -664,7 +664,7 @@
</bean>
<bean id="SAML2.ArtifactResolution.MDDriven" parent="AbstractMDDrivenSAML2Profile" lazy-init="true"
- class="net.shibboleth.idp.saml.saml2.profile.config.ArtifactResolutionProfileConfiguration">
+ class="net.shibboleth.idp.saml.saml2.profile.config.impl.ArtifactResolutionProfileConfiguration">
<property name="signResponsesPredicate">
<bean class="net.shibboleth.shared.logic.PredicateSupport" factory-method="fromFunction">
<constructor-arg>
@@ -705,7 +705,7 @@
<!-- Remove in V6. -->
<bean id="Liberty.SSOS.MDDriven" parent="SAML2.SSO.MDDriven" lazy-init="true"
- class="net.shibboleth.idp.saml.idwsf.profile.config.SSOSProfileConfiguration" />
+ class="net.shibboleth.idp.saml.saml2.profile.config.impl.SSOSProfileConfiguration" />
<bean id="CAS.LoginConfiguration.MDDriven" parent="AbstractMDDrivenCASProfile" lazy-init="true"
class="net.shibboleth.idp.cas.config.LoginConfiguration">
diff --git a/idp-conf-impl/src/main/resources/net/shibboleth/idp/conf/relying-party-system.xml b/idp-conf-impl/src/main/resources/net/shibboleth/idp/conf/relying-party-system.xml
index 025e29779..d1710d0b0 100644
--- a/idp-conf-impl/src/main/resources/net/shibboleth/idp/conf/relying-party-system.xml
+++ b/idp-conf-impl/src/main/resources/net/shibboleth/idp/conf/relying-party-system.xml
@@ -81,17 +81,17 @@
-->
<bean id="Shibboleth.SSO" lazy-init="true"
- class="net.shibboleth.idp.saml.saml1.profile.config.BrowserSSOProfileConfiguration"
+ class="net.shibboleth.idp.saml.saml1.profile.config.impl.BrowserSSOProfileConfiguration"
p:artifactConfiguration-ref="shibboleth.DefaultArtifactConfiguration" />
<bean id="SAML1.AttributeQuery" lazy-init="true"
- class="net.shibboleth.idp.saml.saml1.profile.config.AttributeQueryProfileConfiguration" />
+ class="net.shibboleth.idp.saml.saml1.profile.config.impl.AttributeQueryProfileConfiguration" />
<bean id="SAML1.ArtifactResolution" lazy-init="true"
- class="net.shibboleth.idp.saml.saml1.profile.config.ArtifactResolutionProfileConfiguration" />
+ class="net.shibboleth.idp.saml.saml1.profile.config.impl.ArtifactResolutionProfileConfiguration" />
<bean id="SAML2.SSO" lazy-init="true"
- class="net.shibboleth.idp.saml.saml2.profile.config.BrowserSSOProfileConfiguration"
+ class="net.shibboleth.idp.saml.saml2.profile.config.impl.BrowserSSOProfileConfiguration"
p:artifactConfiguration-ref="shibboleth.DefaultArtifactConfiguration"
p:encryptionOptionalPredicate="%{idp.encryption.optional:false}">
<property name="defaultAuthenticationMethodsLookupStrategy">
@@ -105,31 +105,31 @@
</bean>
<util:constant id="SAML2.SSO.FEATURE_AUTHNCONTEXT"
- static-field="net.shibboleth.idp.saml.saml2.profile.config.BrowserSSOProfileConfiguration.FEATURE_AUTHNCONTEXT"/>
+ static-field="net.shibboleth.idp.saml.saml2.profile.config.impl.BrowserSSOProfileConfiguration.FEATURE_AUTHNCONTEXT"/>
<util:constant id="SAML2.SSO.FEATURE_SCOPING"
- static-field="net.shibboleth.idp.saml.saml2.profile.config.BrowserSSOProfileConfiguration.FEATURE_SCOPING"/>
+ static-field="net.shibboleth.idp.saml.saml2.profile.config.impl.BrowserSSOProfileConfiguration.FEATURE_SCOPING"/>
<bean id="SAML2.ECP" lazy-init="true"
- class="net.shibboleth.idp.saml.saml2.profile.config.ECPProfileConfiguration"
+ class="net.shibboleth.idp.saml.saml2.profile.config.impl.ECPProfileConfiguration"
p:encryptionOptionalPredicate="%{idp.encryption.optional:false}" />
<bean id="SAML2.Logout" lazy-init="true"
- class="net.shibboleth.idp.saml.saml2.profile.config.SingleLogoutProfileConfiguration"
+ class="net.shibboleth.idp.saml.saml2.profile.config.impl.SingleLogoutProfileConfiguration"
p:artifactConfiguration-ref="shibboleth.DefaultArtifactConfiguration"
p:encryptionOptionalPredicate="%{idp.encryption.optional:false}" />
<bean id="SAML2.AttributeQuery" lazy-init="true"
- class="net.shibboleth.idp.saml.saml2.profile.config.AttributeQueryProfileConfiguration"
+ class="net.shibboleth.idp.saml.saml2.profile.config.impl.AttributeQueryProfileConfiguration"
p:encryptionOptionalPredicate="%{idp.encryption.optional:false}" />
<bean id="SAML2.ArtifactResolution" lazy-init="true"
- class="net.shibboleth.idp.saml.saml2.profile.config.ArtifactResolutionProfileConfiguration"
+ class="net.shibboleth.idp.saml.saml2.profile.config.impl.ArtifactResolutionProfileConfiguration"
p:encryptionOptionalPredicate="%{idp.encryption.optional:false}" />
<!-- Remove in V6. -->
<bean id="Liberty.SSOS" lazy-init="true"
- class="net.shibboleth.idp.saml.idwsf.profile.config.SSOSProfileConfiguration" />
+ class="net.shibboleth.idp.saml.saml2.profile.config.impl.SSOSProfileConfiguration" />
<bean id="CAS.LoginConfiguration" lazy-init="true"
class="net.shibboleth.idp.cas.config.LoginConfiguration" />
diff --git a/idp-conf-impl/src/main/resources/net/shibboleth/idp/flows/admin/resolvertest-beans.xml b/idp-conf-impl/src/main/resources/net/shibboleth/idp/flows/admin/resolvertest-beans.xml
index dc77a025b..ec439d153 100644
--- a/idp-conf-impl/src/main/resources/net/shibboleth/idp/flows/admin/resolvertest-beans.xml
+++ b/idp-conf-impl/src/main/resources/net/shibboleth/idp/flows/admin/resolvertest-beans.xml
@@ -144,7 +144,7 @@
<bean class="net.shibboleth.idp.saml.profile.context.navigate.DefaultNameIdentifierFormatStrategy"
p:defaultFormat="%{idp.nameid.saml1.default:urn:mace:shibboleth:1.0:nameIdentifier}">
<property name="profileId">
- <util:constant static-field="net.shibboleth.idp.saml.saml1.profile.config.BrowserSSOProfileConfiguration.PROFILE_ID" />
+ <util:constant static-field="net.shibboleth.saml.saml1.profile.config.BrowserSSOProfileConfiguration.PROFILE_ID" />
</property>
</bean>
</property>
@@ -169,7 +169,7 @@
<bean class="net.shibboleth.idp.saml.profile.context.navigate.DefaultNameIdentifierFormatStrategy"
p:defaultFormat="%{idp.nameid.saml2.default:urn:oasis:names:tc:SAML:2.0:nameid-format:transient}">
<property name="profileId">
- <util:constant static-field="net.shibboleth.idp.saml.saml2.profile.config.BrowserSSOProfileConfiguration.PROFILE_ID" />
+ <util:constant static-field="net.shibboleth.saml.saml2.profile.config.BrowserSSOProfileConfiguration.PROFILE_ID" />
</property>
</bean>
</property>
diff --git a/idp-conf-impl/src/main/resources/net/shibboleth/idp/flows/authn/saml-authn-beans.xml b/idp-conf-impl/src/main/resources/net/shibboleth/idp/flows/authn/saml-authn-beans.xml
index 043a5f4a0..c0976bf9b 100644
--- a/idp-conf-impl/src/main/resources/net/shibboleth/idp/flows/authn/saml-authn-beans.xml
+++ b/idp-conf-impl/src/main/resources/net/shibboleth/idp/flows/authn/saml-authn-beans.xml
@@ -44,7 +44,7 @@
<!-- Explicitly wrapped by a non-nested action adaptor. -->
<bean id="InitializeProxyProfileRequestContext"
class="net.shibboleth.idp.authn.proxy.impl.InitializeProxyProfileRequestContext"
- p:profileId="#{T(net.shibboleth.idp.saml.saml2.profile.config.BrowserSSOProfileConfiguration).PROFILE_ID}"
+ p:profileId="#{T(net.shibboleth.saml.saml2.profile.config.BrowserSSOProfileConfiguration).PROFILE_ID}"
p:loggingId="%{idp.service.logging.saml2sso:SSO}"
p:browserProfile="true" />
diff --git a/idp-conf-impl/src/main/resources/net/shibboleth/idp/flows/saml/logout/saml2-logoutprop-flow.xml b/idp-conf-impl/src/main/resources/net/shibboleth/idp/flows/saml/logout/saml2-logoutprop-flow.xml
index 3f8173b44..2a3c3ead7 100644
--- a/idp-conf-impl/src/main/resources/net/shibboleth/idp/flows/saml/logout/saml2-logoutprop-flow.xml
+++ b/idp-conf-impl/src/main/resources/net/shibboleth/idp/flows/saml/logout/saml2-logoutprop-flow.xml
@@ -4,7 +4,7 @@
<!-- Rewrite the profile ID so that configuration is driven by the SAML2 SLO profile config. -->
<on-start>
- <evaluate expression="opensamlProfileRequestContext.setProfileId(T(net.shibboleth.idp.saml.saml2.profile.config.SingleLogoutProfileConfiguration).PROFILE_ID)" />
+ <evaluate expression="opensamlProfileRequestContext.setProfileId(T(net.shibboleth.saml.saml2.profile.config.SingleLogoutProfileConfiguration).PROFILE_ID)" />
</on-start>
<action-state id="PrepareContextTree">
diff --git a/idp-conf-impl/src/main/resources/net/shibboleth/idp/flows/saml/saml1/artifact-resolution-beans.xml b/idp-conf-impl/src/main/resources/net/shibboleth/idp/flows/saml/saml1/artifact-resolution-beans.xml
index 6ecf16ac0..57e9f8b4a 100644
--- a/idp-conf-impl/src/main/resources/net/shibboleth/idp/flows/saml/saml1/artifact-resolution-beans.xml
+++ b/idp-conf-impl/src/main/resources/net/shibboleth/idp/flows/saml/saml1/artifact-resolution-beans.xml
@@ -19,7 +19,7 @@
<bean id="InitializeProfileRequestContext"
class="net.shibboleth.idp.profile.impl.InitializeProfileRequestContext" scope="prototype"
- p:profileId="#{T(net.shibboleth.idp.saml.saml1.profile.config.ArtifactResolutionProfileConfiguration).PROFILE_ID}"
+ p:profileId="#{T(net.shibboleth.saml.saml1.profile.config.ArtifactResolutionProfileConfiguration).PROFILE_ID}"
p:loggingId="%{idp.service.logging.saml1artifact:ArtifactResolution}" />
<bean id="DecodeMessage" class="org.opensaml.profile.action.impl.DecodeMessage" scope="prototype">
diff --git a/idp-conf-impl/src/main/resources/net/shibboleth/idp/flows/saml/saml1/attribute-query-beans.xml b/idp-conf-impl/src/main/resources/net/shibboleth/idp/flows/saml/saml1/attribute-query-beans.xml
index 266038a6d..f8c5f8a65 100644
--- a/idp-conf-impl/src/main/resources/net/shibboleth/idp/flows/saml/saml1/attribute-query-beans.xml
+++ b/idp-conf-impl/src/main/resources/net/shibboleth/idp/flows/saml/saml1/attribute-query-beans.xml
@@ -20,7 +20,7 @@
<bean id="InitializeProfileRequestContext"
class="net.shibboleth.idp.profile.impl.InitializeProfileRequestContext" scope="prototype"
- p:profileId="#{T(net.shibboleth.idp.saml.saml1.profile.config.AttributeQueryProfileConfiguration).PROFILE_ID}"
+ p:profileId="#{T(net.shibboleth.saml.saml1.profile.config.AttributeQueryProfileConfiguration).PROFILE_ID}"
p:loggingId="%{idp.service.logging.saml1attrquery:AttributeQuery}" />
<bean id="DecodeMessage" class="org.opensaml.profile.action.impl.DecodeMessage" scope="prototype">
diff --git a/idp-conf-impl/src/main/resources/net/shibboleth/idp/flows/saml/saml1/sso-abstract-beans.xml b/idp-conf-impl/src/main/resources/net/shibboleth/idp/flows/saml/saml1/sso-abstract-beans.xml
index 4f06929a8..cbb561595 100644
--- a/idp-conf-impl/src/main/resources/net/shibboleth/idp/flows/saml/saml1/sso-abstract-beans.xml
+++ b/idp-conf-impl/src/main/resources/net/shibboleth/idp/flows/saml/saml1/sso-abstract-beans.xml
@@ -23,7 +23,7 @@
<bean id="InitializeProfileRequestContext"
class="net.shibboleth.idp.profile.impl.InitializeProfileRequestContext" scope="prototype"
- p:profileId="#{T(net.shibboleth.idp.saml.saml1.profile.config.BrowserSSOProfileConfiguration).PROFILE_ID}"
+ p:profileId="#{T(net.shibboleth.saml.saml1.profile.config.BrowserSSOProfileConfiguration).PROFILE_ID}"
p:loggingId="%{idp.service.logging.saml1sso:SSO}"
p:browserProfile="true" />
diff --git a/idp-conf-impl/src/main/resources/net/shibboleth/idp/flows/saml/saml2/artifact-resolution-beans.xml b/idp-conf-impl/src/main/resources/net/shibboleth/idp/flows/saml/saml2/artifact-resolution-beans.xml
index 79f20eccd..dd42cf1e7 100644
--- a/idp-conf-impl/src/main/resources/net/shibboleth/idp/flows/saml/saml2/artifact-resolution-beans.xml
+++ b/idp-conf-impl/src/main/resources/net/shibboleth/idp/flows/saml/saml2/artifact-resolution-beans.xml
@@ -19,7 +19,7 @@
<bean id="InitializeProfileRequestContext"
class="net.shibboleth.idp.profile.impl.InitializeProfileRequestContext" scope="prototype"
- p:profileId="#{T(net.shibboleth.idp.saml.saml2.profile.config.ArtifactResolutionProfileConfiguration).PROFILE_ID}"
+ p:profileId="#{T(net.shibboleth.saml.saml2.profile.config.ArtifactResolutionProfileConfiguration).PROFILE_ID}"
p:loggingId="%{idp.service.logging.saml2artifact:ArtifactResolution}" />
<bean id="DecodeMessage" class="org.opensaml.profile.action.impl.DecodeMessage" scope="prototype">
diff --git a/idp-conf-impl/src/main/resources/net/shibboleth/idp/flows/saml/saml2/attribute-query-beans.xml b/idp-conf-impl/src/main/resources/net/shibboleth/idp/flows/saml/saml2/attribute-query-beans.xml
index 2e0401961..0ca4b7988 100644
--- a/idp-conf-impl/src/main/resources/net/shibboleth/idp/flows/saml/saml2/attribute-query-beans.xml
+++ b/idp-conf-impl/src/main/resources/net/shibboleth/idp/flows/saml/saml2/attribute-query-beans.xml
@@ -20,7 +20,7 @@
<bean id="InitializeProfileRequestContext"
class="net.shibboleth.idp.profile.impl.InitializeProfileRequestContext" scope="prototype"
- p:profileId="#{T(net.shibboleth.idp.saml.saml2.profile.config.AttributeQueryProfileConfiguration).PROFILE_ID}"
+ p:profileId="#{T(net.shibboleth.saml.saml2.profile.config.AttributeQueryProfileConfiguration).PROFILE_ID}"
p:loggingId="%{idp.service.logging.saml2attrquery:AttributeQuery}" />
<bean id="DecodeMessage" class="org.opensaml.profile.action.impl.DecodeMessage" scope="prototype">
diff --git a/idp-conf-impl/src/main/resources/net/shibboleth/idp/flows/saml/saml2/slo-artifact-beans.xml b/idp-conf-impl/src/main/resources/net/shibboleth/idp/flows/saml/saml2/slo-artifact-beans.xml
index ce35095f2..eeba4d300 100644
--- a/idp-conf-impl/src/main/resources/net/shibboleth/idp/flows/saml/saml2/slo-artifact-beans.xml
+++ b/idp-conf-impl/src/main/resources/net/shibboleth/idp/flows/saml/saml2/slo-artifact-beans.xml
@@ -24,7 +24,7 @@
p:artifactEndpointResolver-ref="shibboleth.EndpointResolver"
p:SOAPClient-ref="shibboleth.SOAPClient.SAML"
p:SOAPPipelineName="SAML2.ArtifactDecoder"
- p:SOAPClientSecurityConfigurationProfileId="#{T(net.shibboleth.idp.saml.saml2.profile.config.SingleLogoutProfileConfiguration).PROFILE_ID}"
+ p:SOAPClientSecurityConfigurationProfileId="#{T(net.shibboleth.saml.saml2.profile.config.SingleLogoutProfileConfiguration).PROFILE_ID}"
/>
</constructor-arg>
</bean>
diff --git a/idp-conf-impl/src/main/resources/net/shibboleth/idp/flows/saml/saml2/slo-back-beans.xml b/idp-conf-impl/src/main/resources/net/shibboleth/idp/flows/saml/saml2/slo-back-beans.xml
index 32dd77847..fa4c15588 100644
--- a/idp-conf-impl/src/main/resources/net/shibboleth/idp/flows/saml/saml2/slo-back-beans.xml
+++ b/idp-conf-impl/src/main/resources/net/shibboleth/idp/flows/saml/saml2/slo-back-beans.xml
@@ -22,7 +22,7 @@
<bean id="InitializeProfileRequestContext"
class="net.shibboleth.idp.profile.impl.InitializeProfileRequestContext" scope="prototype"
- p:profileId="#{T(net.shibboleth.idp.saml.saml2.profile.config.SingleLogoutProfileConfiguration).PROFILE_ID}"
+ p:profileId="#{T(net.shibboleth.saml.saml2.profile.config.SingleLogoutProfileConfiguration).PROFILE_ID}"
p:browserProfile="false"
p:loggingId="%{idp.service.logging.saml2slo:Logout}" />
diff --git a/idp-conf-impl/src/main/resources/net/shibboleth/idp/flows/saml/saml2/slo-front-abstract-beans.xml b/idp-conf-impl/src/main/resources/net/shibboleth/idp/flows/saml/saml2/slo-front-abstract-beans.xml
index 993044648..bee74d745 100644
--- a/idp-conf-impl/src/main/resources/net/shibboleth/idp/flows/saml/saml2/slo-front-abstract-beans.xml
+++ b/idp-conf-impl/src/main/resources/net/shibboleth/idp/flows/saml/saml2/slo-front-abstract-beans.xml
@@ -24,7 +24,7 @@
<bean id="InitializeProfileRequestContext"
class="net.shibboleth.idp.profile.impl.InitializeProfileRequestContext" scope="prototype"
- p:profileId="#{T(net.shibboleth.idp.saml.saml2.profile.config.SingleLogoutProfileConfiguration).PROFILE_ID}"
+ p:profileId="#{T(net.shibboleth.saml.saml2.profile.config.SingleLogoutProfileConfiguration).PROFILE_ID}"
p:loggingId="%{idp.service.logging.saml2slo:Logout}"
p:browserProfile="true" />
diff --git a/idp-conf-impl/src/main/resources/net/shibboleth/idp/flows/saml/saml2/sso-abstract-beans.xml b/idp-conf-impl/src/main/resources/net/shibboleth/idp/flows/saml/saml2/sso-abstract-beans.xml
index f96d7bde3..10bf66aa9 100644
--- a/idp-conf-impl/src/main/resources/net/shibboleth/idp/flows/saml/saml2/sso-abstract-beans.xml
+++ b/idp-conf-impl/src/main/resources/net/shibboleth/idp/flows/saml/saml2/sso-abstract-beans.xml
@@ -31,7 +31,7 @@
<bean class="org.opensaml.profile.logic.ProfileIdPredicate">
<constructor-arg>
<util:constant
- static-field="net.shibboleth.idp.saml.saml2.profile.config.ECPProfileConfiguration.PROFILE_ID"/>
+ static-field="net.shibboleth.saml.saml2.profile.config.ECPProfileConfiguration.PROFILE_ID"/>
</constructor-arg>
</bean>
</property>
diff --git a/idp-conf-impl/src/main/resources/net/shibboleth/idp/flows/saml/saml2/sso-artifact-beans.xml b/idp-conf-impl/src/main/resources/net/shibboleth/idp/flows/saml/saml2/sso-artifact-beans.xml
index f3ca03ae0..a2eb1ed9e 100644
--- a/idp-conf-impl/src/main/resources/net/shibboleth/idp/flows/saml/saml2/sso-artifact-beans.xml
+++ b/idp-conf-impl/src/main/resources/net/shibboleth/idp/flows/saml/saml2/sso-artifact-beans.xml
@@ -13,7 +13,7 @@
<bean id="InitializeProfileRequestContext"
class="net.shibboleth.idp.profile.impl.InitializeProfileRequestContext" scope="prototype"
- p:profileId="#{T(net.shibboleth.idp.saml.saml2.profile.config.BrowserSSOProfileConfiguration).PROFILE_ID}"
+ p:profileId="#{T(net.shibboleth.idp.saml.saml2.profile.config.impl.BrowserSSOProfileConfiguration).PROFILE_ID}"
p:loggingId="%{idp.service.logging.saml2sso:SSO}"
p:browserProfile="true" />
@@ -30,7 +30,7 @@
p:artifactEndpointResolver-ref="shibboleth.EndpointResolver"
p:SOAPClient-ref="shibboleth.SOAPClient.SAML"
p:SOAPPipelineName="SAML2.ArtifactDecoder"
- p:SOAPClientSecurityConfigurationProfileId="#{T(net.shibboleth.idp.saml.saml2.profile.config.BrowserSSOProfileConfiguration).PROFILE_ID}"
+ p:SOAPClientSecurityConfigurationProfileId="#{T(net.shibboleth.saml.saml2.profile.config.BrowserSSOProfileConfiguration).PROFILE_ID}"
/>
</constructor-arg>
</bean>
diff --git a/idp-conf-impl/src/main/resources/net/shibboleth/idp/flows/saml/saml2/sso-ecp-beans.xml b/idp-conf-impl/src/main/resources/net/shibboleth/idp/flows/saml/saml2/sso-ecp-beans.xml
index 53072d5b3..649ec1bd4 100644
--- a/idp-conf-impl/src/main/resources/net/shibboleth/idp/flows/saml/saml2/sso-ecp-beans.xml
+++ b/idp-conf-impl/src/main/resources/net/shibboleth/idp/flows/saml/saml2/sso-ecp-beans.xml
@@ -13,7 +13,7 @@
<bean id="InitializeProfileRequestContext"
class="net.shibboleth.idp.profile.impl.InitializeProfileRequestContext" scope="prototype"
- p:profileId="#{T(net.shibboleth.idp.saml.saml2.profile.config.ECPProfileConfiguration).PROFILE_ID}"
+ p:profileId="#{T(net.shibboleth.saml.saml2.profile.config.ECPProfileConfiguration).PROFILE_ID}"
p:loggingId="%{idp.service.logging.saml2sso:SSO}"
p:browserProfile="false" />
diff --git a/idp-conf-impl/src/main/resources/net/shibboleth/idp/flows/saml/saml2/sso-post-beans.xml b/idp-conf-impl/src/main/resources/net/shibboleth/idp/flows/saml/saml2/sso-post-beans.xml
index d764b0b48..50107f361 100644
--- a/idp-conf-impl/src/main/resources/net/shibboleth/idp/flows/saml/saml2/sso-post-beans.xml
+++ b/idp-conf-impl/src/main/resources/net/shibboleth/idp/flows/saml/saml2/sso-post-beans.xml
@@ -13,7 +13,7 @@
<bean id="InitializeProfileRequestContext"
class="net.shibboleth.idp.profile.impl.InitializeProfileRequestContext" scope="prototype"
- p:profileId="#{T(net.shibboleth.idp.saml.saml2.profile.config.BrowserSSOProfileConfiguration).PROFILE_ID}"
+ p:profileId="#{T(net.shibboleth.saml.saml2.profile.config.BrowserSSOProfileConfiguration).PROFILE_ID}"
p:loggingId="%{idp.service.logging.saml2sso:SSO}"
p:browserProfile="true" />
diff --git a/idp-conf-impl/src/main/resources/net/shibboleth/idp/flows/saml/saml2/sso-post-simplesign-beans.xml b/idp-conf-impl/src/main/resources/net/shibboleth/idp/flows/saml/saml2/sso-post-simplesign-beans.xml
index 6ce9e0b52..dad62a86b 100644
--- a/idp-conf-impl/src/main/resources/net/shibboleth/idp/flows/saml/saml2/sso-post-simplesign-beans.xml
+++ b/idp-conf-impl/src/main/resources/net/shibboleth/idp/flows/saml/saml2/sso-post-simplesign-beans.xml
@@ -13,7 +13,7 @@
<bean id="InitializeProfileRequestContext"
class="net.shibboleth.idp.profile.impl.InitializeProfileRequestContext" scope="prototype"
- p:profileId="#{T(net.shibboleth.idp.saml.saml2.profile.config.BrowserSSOProfileConfiguration).PROFILE_ID}"
+ p:profileId="#{T(net.shibboleth.saml.saml2.profile.config.BrowserSSOProfileConfiguration).PROFILE_ID}"
p:loggingId="%{idp.service.logging.saml2sso:SSO}"
p:browserProfile="true" />
diff --git a/idp-conf-impl/src/main/resources/net/shibboleth/idp/flows/saml/saml2/sso-redirect-beans.xml b/idp-conf-impl/src/main/resources/net/shibboleth/idp/flows/saml/saml2/sso-redirect-beans.xml
index ebbc05473..c54644482 100644
--- a/idp-conf-impl/src/main/resources/net/shibboleth/idp/flows/saml/saml2/sso-redirect-beans.xml
+++ b/idp-conf-impl/src/main/resources/net/shibboleth/idp/flows/saml/saml2/sso-redirect-beans.xml
@@ -13,7 +13,7 @@
<bean id="InitializeProfileRequestContext"
class="net.shibboleth.idp.profile.impl.InitializeProfileRequestContext" scope="prototype"
- p:profileId="#{T(net.shibboleth.idp.saml.saml2.profile.config.BrowserSSOProfileConfiguration).PROFILE_ID}"
+ p:profileId="#{T(net.shibboleth.saml.saml2.profile.config.BrowserSSOProfileConfiguration).PROFILE_ID}"
p:loggingId="%{idp.service.logging.saml2sso:SSO}"
p:browserProfile="true" />
diff --git a/idp-conf-impl/src/main/resources/net/shibboleth/idp/flows/saml/saml2/sso-unsolicited-beans.xml b/idp-conf-impl/src/main/resources/net/shibboleth/idp/flows/saml/saml2/sso-unsolicited-beans.xml
index 92d5c3787..88fd1810f 100644
--- a/idp-conf-impl/src/main/resources/net/shibboleth/idp/flows/saml/saml2/sso-unsolicited-beans.xml
+++ b/idp-conf-impl/src/main/resources/net/shibboleth/idp/flows/saml/saml2/sso-unsolicited-beans.xml
@@ -13,7 +13,7 @@
<bean id="InitializeProfileRequestContext"
class="net.shibboleth.idp.profile.impl.InitializeProfileRequestContext" scope="prototype"
- p:profileId="#{T(net.shibboleth.idp.saml.saml2.profile.config.BrowserSSOProfileConfiguration).PROFILE_ID}"
+ p:profileId="#{T(net.shibboleth.saml.saml2.profile.config.BrowserSSOProfileConfiguration).PROFILE_ID}"
p:loggingId="%{idp.service.logging.saml2sso:SSO}"
p:browserProfile="true" />
diff --git a/idp-saml-api/src/main/java/net/shibboleth/idp/saml/profile/config/BrowserSSOProfileConfiguration.java b/idp-saml-api/src/main/java/net/shibboleth/idp/saml/profile/config/BrowserSSOProfileConfiguration.java
new file mode 100644
index 000000000..4d44f23a7
--- /dev/null
+++ b/idp-saml-api/src/main/java/net/shibboleth/idp/saml/profile/config/BrowserSSOProfileConfiguration.java
@@ -0,0 +1,63 @@
+/*
+ * Licensed to the University Corporation for Advanced Internet Development,
+ * Inc. (UCAID) under one or more contributor license agreements. See the
+ * NOTICE file distributed with this work for additional information regarding
+ * copyright ownership. The UCAID licenses this file to You under the Apache
+ * License, Version 2.0 (the "License"); you may not use this file except in
+ * compliance with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package net.shibboleth.idp.saml.profile.config;
+
+import java.util.List;
+
+import javax.annotation.Nonnull;
+import javax.annotation.Nullable;
+
+import org.opensaml.profile.context.ProfileRequestContext;
+
+import net.shibboleth.idp.authn.config.AuthenticationProfileConfiguration;
+import net.shibboleth.profile.config.AttributeResolvingProfileConfiguration;
+import net.shibboleth.saml.profile.config.SAMLAssertionProducingProfileConfiguration;
+import net.shibboleth.shared.annotation.constraint.NonnullElements;
+import net.shibboleth.shared.annotation.constraint.NotLive;
+import net.shibboleth.shared.annotation.constraint.Unmodifiable;
+
+/**
+ * Profile configuration for IdP SAML Browser SSO profiles.
+ *
+ * <p>Adds settings specific to the issuer role that are cross-version.</p>
+ */
+public interface BrowserSSOProfileConfiguration extends AuthenticationProfileConfiguration,
+ AttributeResolvingProfileConfiguration, SAMLAssertionProducingProfileConfiguration {
+
+ /**
+ * Get whether responses to the authentication request should include an attribute statement.
+ *
+ * <p>Default is true</p>
+ *
+ * @param profileRequestContext current profile request context
+ *
+ * @return whether responses to the authentication request should include an attribute statement
+ */
+ boolean isIncludeAttributeStatement(@Nullable final ProfileRequestContext profileRequestContext);
+
+ /**
+ * Get the name identifier formats to use.
+ *
+ * @param profileRequestContext profile request context
+ *
+ * @return the formats to use
+ */
+ @Nonnull @NonnullElements @NotLive @Unmodifiable public List<String> getNameIDFormatPrecedence(
+ @Nullable final ProfileRequestContext profileRequestContext);
+
+}
\ No newline at end of file
diff --git a/idp-saml-api/src/main/java/net/shibboleth/idp/saml/profile/config/SAMLProfileConfiguration.java b/idp-saml-api/src/main/java/net/shibboleth/idp/saml/profile/config/SAMLProfileConfiguration.java
index ab0ac80bb..4cbc55af1 100644
--- a/idp-saml-api/src/main/java/net/shibboleth/idp/saml/profile/config/SAMLProfileConfiguration.java
+++ b/idp-saml-api/src/main/java/net/shibboleth/idp/saml/profile/config/SAMLProfileConfiguration.java
@@ -19,7 +19,11 @@ package net.shibboleth.idp.saml.profile.config;
import net.shibboleth.idp.profile.config.InterceptorAwareProfileConfiguration;
-/** Common interface for IdP SAML profile configurations. */
+/**
+ * Common interface for IdP SAML profile configurations.
+ *
+ * <p>This hooks all SAML profiles against the inbound and outbound interceptor support interface.</p>
+ */
public interface SAMLProfileConfiguration extends net.shibboleth.saml.profile.config.SAMLProfileConfiguration,
InterceptorAwareProfileConfiguration {
diff --git a/idp-saml-api/src/main/java/net/shibboleth/idp/saml/profile/config/logic/IncludeAttributeStatementPredicate.java b/idp-saml-api/src/main/java/net/shibboleth/idp/saml/profile/config/logic/IncludeAttributeStatementPredicate.java
index 431297ebc..4ef8885a4 100644
--- a/idp-saml-api/src/main/java/net/shibboleth/idp/saml/profile/config/logic/IncludeAttributeStatementPredicate.java
+++ b/idp-saml-api/src/main/java/net/shibboleth/idp/saml/profile/config/logic/IncludeAttributeStatementPredicate.java
@@ -75,15 +75,11 @@ public class IncludeAttributeStatementPredicate extends AbstractRelyingPartyPred
if (rpc != null) {
final ProfileConfiguration pc = rpc.getProfileConfig();
- if (pc instanceof net.shibboleth.idp.saml.saml1.profile.config.BrowserSSOProfileConfiguration) {
- return ((net.shibboleth.idp.saml.saml1.profile.config.BrowserSSOProfileConfiguration)
- pc).isIncludeAttributeStatement(input);
- } else if (pc instanceof net.shibboleth.idp.saml.saml2.profile.config.BrowserSSOProfileConfiguration) {
- return ((net.shibboleth.idp.saml.saml2.profile.config.BrowserSSOProfileConfiguration)
- pc).isIncludeAttributeStatement(input);
- } else if (pc instanceof net.shibboleth.idp.saml.saml1.profile.config.AttributeQueryProfileConfiguration) {
+ if (pc instanceof net.shibboleth.idp.saml.profile.config.BrowserSSOProfileConfiguration sso) {
+ return sso.isIncludeAttributeStatement(input);
+ } else if (pc instanceof net.shibboleth.saml.saml1.profile.config.AttributeQueryProfileConfiguration) {
return true;
- } else if (pc instanceof net.shibboleth.idp.saml.saml2.profile.config.AttributeQueryProfileConfiguration) {
+ } else if (pc instanceof net.shibboleth.saml.saml2.profile.config.AttributeQueryProfileConfiguration) {
return true;
}
}
diff --git a/idp-saml-api/src/main/java/net/shibboleth/idp/saml/profile/config/navigate/SessionLifetimeLookupFunction.java b/idp-saml-api/src/main/java/net/shibboleth/idp/saml/profile/config/navigate/SessionLifetimeLookupFunction.java
index ea12838c7..1bea71321 100644
--- a/idp-saml-api/src/main/java/net/shibboleth/idp/saml/profile/config/navigate/SessionLifetimeLookupFunction.java
+++ b/idp-saml-api/src/main/java/net/shibboleth/idp/saml/profile/config/navigate/SessionLifetimeLookupFunction.java
@@ -42,8 +42,8 @@ public class SessionLifetimeLookupFunction extends AbstractRelyingPartyLookupFun
final RelyingPartyContext rpc = getRelyingPartyContextLookupStrategy().apply(input);
if (rpc != null) {
final ProfileConfiguration pc = rpc.getProfileConfig();
- if (pc != null && pc instanceof BrowserSSOProfileConfiguration) {
- return ((BrowserSSOProfileConfiguration) pc).getMaximumSPSessionLifetime(input);
+ if (pc instanceof BrowserSSOProfileConfiguration sso) {
+ return sso.getMaximumSPSessionLifetime(input);
}
}
diff --git a/idp-saml-api/src/main/java/net/shibboleth/idp/saml/profile/context/navigate/DefaultNameIdentifierFormatStrategy.java b/idp-saml-api/src/main/java/net/shibboleth/idp/saml/profile/context/navigate/DefaultNameIdentifierFormatStrategy.java
index dd3c79134..ac0e999c6 100644
--- a/idp-saml-api/src/main/java/net/shibboleth/idp/saml/profile/context/navigate/DefaultNameIdentifierFormatStrategy.java
+++ b/idp-saml-api/src/main/java/net/shibboleth/idp/saml/profile/context/navigate/DefaultNameIdentifierFormatStrategy.java
@@ -129,10 +129,9 @@ public class DefaultNameIdentifierFormatStrategy extends MetadataNameIdentifierF
.getNameIDFormatPrecedence(input));
log.debug("Configuration specifies the following formats: {}", fromConfig);
} else if (profileConfig instanceof
- net.shibboleth.idp.saml.saml1.profile.config.BrowserSSOProfileConfiguration) {
+ net.shibboleth.idp.saml.profile.config.BrowserSSOProfileConfiguration sso) {
fromConfig.addAll(
- ((net.shibboleth.idp.saml.saml1.profile.config.BrowserSSOProfileConfiguration) profileConfig)
- .getNameIDFormatPrecedence(input));
+ sso.getNameIDFormatPrecedence(input));
log.debug("Configuration specifies the following formats: {}", fromConfig);
} else {
log.debug("No ProfileConfiguraton available (or not a BrowserSSOProfileConfiguration)");
diff --git a/idp-saml-api/src/main/java/net/shibboleth/idp/saml/saml2/profile/config/BrowserSSOProfileConfiguration.java b/idp-saml-api/src/main/java/net/shibboleth/idp/saml/saml2/profile/config/BrowserSSOProfileConfiguration.java
index 94c532a11..79ec12275 100644
--- a/idp-saml-api/src/main/java/net/shibboleth/idp/saml/saml2/profile/config/BrowserSSOProfileConfiguration.java
+++ b/idp-saml-api/src/main/java/net/shibboleth/idp/saml/saml2/profile/config/BrowserSSOProfileConfiguration.java
@@ -20,231 +20,37 @@ package net.shibboleth.idp.saml.saml2.profile.config;
import java.security.Principal;
import java.time.Duration;
import java.util.Collection;
-import java.util.List;
import java.util.Set;
import java.util.function.Function;
-import java.util.function.Predicate;
import javax.annotation.Nonnull;
import javax.annotation.Nullable;
import net.shibboleth.idp.authn.config.AuthenticationProfileConfiguration;
-import net.shibboleth.idp.saml.authn.principal.AuthnContextClassRefPrincipal;
-import net.shibboleth.idp.saml.profile.config.logic.ProxyAwareForceAuthnPredicate;
-import net.shibboleth.idp.saml.saml2.profile.config.navigate.ProxyAwareAuthnContextComparisonLookupFunction;
-import net.shibboleth.idp.saml.saml2.profile.config.navigate.ProxyAwareDefaultAuthenticationMethodsLookupFunction;
import net.shibboleth.profile.config.AttributeResolvingProfileConfiguration;
import net.shibboleth.shared.annotation.constraint.NonNegative;
import net.shibboleth.shared.annotation.constraint.NonnullElements;
-import net.shibboleth.shared.annotation.constraint.NotEmpty;
import net.shibboleth.shared.annotation.constraint.NotLive;
import net.shibboleth.shared.annotation.constraint.Unmodifiable;
-import net.shibboleth.shared.collection.CollectionSupport;
-import net.shibboleth.shared.logic.Constraint;
-import net.shibboleth.shared.logic.FunctionSupport;
-import net.shibboleth.shared.logic.PredicateSupport;
-import net.shibboleth.shared.primitive.DeprecationSupport;
-import net.shibboleth.shared.primitive.DeprecationSupport.ObjectType;
-import net.shibboleth.shared.primitive.StringSupport;
import org.opensaml.profile.context.ProfileRequestContext;
import org.opensaml.saml.saml2.core.AuthenticatingAuthority;
import org.opensaml.saml.saml2.core.AuthnContext;
-import org.opensaml.saml.saml2.core.AuthnContextComparisonTypeEnumeration;
-import org.opensaml.saml.saml2.core.SubjectLocality;
-import org.opensaml.saml.saml2.metadata.RequestedAttribute;
-/** Configuration support for IdP and proxied SAML 2.0 Browser SSO. */
-public class BrowserSSOProfileConfiguration extends AbstractSAML2AssertionProducingProfileConfiguration
- implements AuthenticationProfileConfiguration, AttributeResolvingProfileConfiguration,
- net.shibboleth.saml.saml2.profile.config.BrowserSSOProfileConfiguration{
+/**
+ * Configuration support for IdP and proxied SAML 2.0 Browser SSO.
+ *
+ * <p>Adds settings specific issuer role for SAML 2.0, along with special features
+ * needed for proxying.</p>
+ */
+public interface BrowserSSOProfileConfiguration
+ extends net.shibboleth.saml.saml2.profile.config.BrowserSSOProfileConfiguration,
+ net.shibboleth.idp.saml.profile.config.BrowserSSOProfileConfiguration,
+ AuthenticationProfileConfiguration, AttributeResolvingProfileConfiguration {
/** Default maximum delegation chain length. */
- @Nonnull public static final Long DEFAULT_DELEGATION_CHAIN_LENGTH = 1L;
-
- /** Whether attributes should be resolved in the course of the profile. */
- @Nonnull private Predicate<ProfileRequestContext> resolveAttributesPredicate;
-
- /** Whether responses to the authentication request should include an attribute statement. */
- @Nonnull private Predicate<ProfileRequestContext> includeAttributeStatementPredicate;
-
- /** Whether to ignore Scoping elements within AuthnRequest. */
- @Nonnull private Predicate<ProfileRequestContext> ignoreScoping;
-
- /** Whether to mandate forced authentication for the request. */
- @Nonnull private Predicate<ProfileRequestContext> forceAuthnPredicate;
-
- /** Whether to compare client and assertion addresses on inbound SSO. */
- @Nonnull private Predicate<ProfileRequestContext> checkAddressPredicate;
-
- /** Whether the response endpoint should be validated if the request is signed. */
- @Nonnull private Predicate<ProfileRequestContext> skipEndpointValidationWhenSignedPredicate;
-
- /** Lookup function to supply proxyCount property. */
- @Nonnull private Function<ProfileRequestContext,Integer> proxyCountLookupStrategy;
-
- /** Lookup function to supply proxy audiences. */
- @Nonnull private Function<ProfileRequestContext,Collection<String>> proxyAudiencesLookupStrategy;
-
- /** Whether authentication results should carry the proxied AuthnInstant. */
- @Nonnull private Predicate<ProfileRequestContext> proxiedAuthnInstantPredicate;
-
- /**
- * The predicate used to determine whether to suppress {@link AuthenticatingAuthority} when possible.
- */
- @Nonnull private Predicate<ProfileRequestContext> suppressAuthenticatingAuthorityPredicate;
-
- /** Whether to require requests be signed. */
- @Nonnull private Predicate<ProfileRequestContext> requireSignedRequestsPredicate;
-
- /** Whether to require assertions be signed. */
- @Nonnull private Predicate<ProfileRequestContext> requireSignedAssertionsPredicate;
-
- /** Lookup function to supply maximum session lifetime. */
- @Nonnull private Function<ProfileRequestContext,Duration> maximumSPSessionLifetimeLookupStrategy;
-
- /** Lookup function to supply maximum time since inbound AuthnInstant. */
- @Nonnull private Function<ProfileRequestContext,Duration> maximumTimeSinceAuthnLookupStrategy;
-
- /**
- * The predicate used to determine if produced assertions may be delegated.
- */
- @Nonnull private Predicate<ProfileRequestContext> allowDelegationPredicate;
-
- /** Lookup function to supply maximum delegation chain length. */
- @Nonnull private Function<ProfileRequestContext,Long> maximumTokenDelegationChainLengthLookupStrategy;
-
- /** Lookup function to supply the strategy function for translating SAML 2.0 AuthnContext data. */
- @Nonnull private Function<ProfileRequestContext,Function<AuthnContext,Collection<Principal>>>
- authnContextTranslationStrategyLookupStrategy;
-
- /** Lookup function to supply the strategy function for translating fully-generic data. */
- @Nonnull private Function<ProfileRequestContext,Function<ProfileRequestContext,Collection<Principal>>>
- authnContextTranslationStrategyExLookupStrategy;
-
- /** Lookup function for requested AC operator. */
- @Nonnull private Function<ProfileRequestContext,String> authnContextComparisonLookupStrategy;
-
- /** Lookup function to supply default authentication methods. */
- @Nonnull private Function<ProfileRequestContext,Collection<AuthnContextClassRefPrincipal>>
- defaultAuthenticationContextsLookupStrategy;
-
- /** Lookup function to supply authentication flows. */
- @Nonnull private Function<ProfileRequestContext,Set<String>> authenticationFlowsLookupStrategy;
-
- /** Lookup function to supply post authentication flows. */
- @Nonnull private Function<ProfileRequestContext,Collection<String>> postAuthenticationFlowsLookupStrategy;
-
- /** Lookup function to supply NameID formats. */
- @Nonnull private Function<ProfileRequestContext,Collection<String>> nameIDFormatPrecedenceLookupStrategy;
-
- /** Lookup function to supply SPNameQualifier in request. */
- @Nonnull private Function<ProfileRequestContext,String> spNameQualifierLookupStrategy;
-
- /** Lookup function to supply AttributeConsumingServiceIndex in request. */
- @Nonnull private Function<ProfileRequestContext,String> attributeIndexLookupStrategy;
-
- /** Lookup function to supply RequestedAttributes in request. */
- @Nonnull private Function<ProfileRequestContext,Collection<RequestedAttribute>> requestedAttributesLookupStrategy;
-
- /** Constructor. */
- public BrowserSSOProfileConfiguration() {
- this(PROFILE_ID);
- }
-
- /**
- * Constructor.
- *
- * @param profileId unique ID for this profile
- */
- protected BrowserSSOProfileConfiguration(@Nonnull @NotEmpty final String profileId) {
- super(profileId);
- setSignResponses(true);
- setEncryptAssertions(true);
- resolveAttributesPredicate = PredicateSupport.alwaysTrue();
- includeAttributeStatementPredicate = PredicateSupport.alwaysTrue();
- ignoreScoping = PredicateSupport.alwaysFalse();
- forceAuthnPredicate = new ProxyAwareForceAuthnPredicate();
- checkAddressPredicate = PredicateSupport.alwaysTrue();
- skipEndpointValidationWhenSignedPredicate = PredicateSupport.alwaysFalse();
- proxyCountLookupStrategy = FunctionSupport.constant(null);
- proxyAudiencesLookupStrategy = FunctionSupport.constant(null);
- proxiedAuthnInstantPredicate = PredicateSupport.alwaysTrue();
- suppressAuthenticatingAuthorityPredicate = PredicateSupport.alwaysFalse();
- requireSignedRequestsPredicate = PredicateSupport.alwaysFalse();
- requireSignedAssertionsPredicate = PredicateSupport.alwaysFalse();
- maximumSPSessionLifetimeLookupStrategy = FunctionSupport.constant(null);
- maximumTimeSinceAuthnLookupStrategy = FunctionSupport.constant(null);
- maximumTokenDelegationChainLengthLookupStrategy = FunctionSupport.constant(DEFAULT_DELEGATION_CHAIN_LENGTH);
- allowDelegationPredicate = PredicateSupport.alwaysFalse();
- authenticationFlowsLookupStrategy = FunctionSupport.constant(null);
- postAuthenticationFlowsLookupStrategy = FunctionSupport.constant(null);
- authnContextTranslationStrategyLookupStrategy = FunctionSupport.constant(null);
- authnContextTranslationStrategyExLookupStrategy = FunctionSupport.constant(null);
- authnContextComparisonLookupStrategy = new ProxyAwareAuthnContextComparisonLookupFunction();
- defaultAuthenticationContextsLookupStrategy = new ProxyAwareDefaultAuthenticationMethodsLookupFunction();
- nameIDFormatPrecedenceLookupStrategy = FunctionSupport.constant(null);
- spNameQualifierLookupStrategy = FunctionSupport.constant(null);
- attributeIndexLookupStrategy = FunctionSupport.constant(null);
- requestedAttributesLookupStrategy = FunctionSupport.constant(null);
- }
-
- /** {@inheritDoc} */
- public boolean isResolveAttributes(@Nullable final ProfileRequestContext profileRequestContext) {
- return resolveAttributesPredicate.test(profileRequestContext);
- }
-
- /**
- * Set whether attributes should be resolved during the profile.
- *
- * @param flag flag to set
- */
- public void setResolveAttributes(final boolean flag) {
- resolveAttributesPredicate = PredicateSupport.constant(flag);
- }
-
- /**
- * Set a condition to determine whether attributes should be resolved during the profile.
- *
- * @param condition condition to set
- */
- public void setResolveAttributesPredicate(@Nonnull final Predicate<ProfileRequestContext> condition) {
- resolveAttributesPredicate = Constraint.isNotNull(condition, "Resolve attributes predicate cannot be null");
- }
-
- /**
- * Get whether responses to the authentication request should include an attribute statement.
- *
- * <p>Default is true</p>
- *
- * @param profileRequestContext current profile request context
- *
- * @return whether responses to the authentication request should include an attribute statement
- */
- public boolean isIncludeAttributeStatement(@Nullable final ProfileRequestContext profileRequestContext) {
- return includeAttributeStatementPredicate.test(profileRequestContext);
- }
-
- /**
- * Set whether responses to the authentication request should include an attribute statement.
- *
- * @param flag flag to set
- */
- public void setIncludeAttributeStatement(final boolean flag) {
- includeAttributeStatementPredicate = PredicateSupport.constant(flag);
- }
-
- /**
- * Set a condition to determine whether responses to the authentication request should include an
- * attribute statement.
- *
- * @param condition condition to set
- */
- public void setIncludeAttributeStatementPredicate(@Nonnull final Predicate<ProfileRequestContext> condition) {
- includeAttributeStatementPredicate = Constraint.isNotNull(condition,
- "Include attribute statement predicate cannot be null");
- }
-
+ @Nonnull static final Long DEFAULT_DELEGATION_CHAIN_LENGTH = 1L;
+
/**
* Gets whether Scoping elements in requests should be ignored/omitted.
*
@@ -254,94 +60,7 @@ public class BrowserSSOProfileConfiguration extends AbstractSAML2AssertionProduc
*
* @since 4.0.0
*/
- public boolean isIgnoreScoping(@Nullable final ProfileRequestContext profileRequestContext) {
- return ignoreScoping.test(profileRequestContext);
- }
-
- /**
- * Sets whether Scoping elements in requests should be ignored/omitted.
- *
- * <p>Defaults to false.</p>
- *
- * @param flag flag to set
- *
- * @since 4.0.0
- */
- public void setIgnoreScoping(final boolean flag) {
- ignoreScoping = PredicateSupport.constant(flag);
- }
-
- /**
- * Sets a condition to determine whether Scoping elements in requests should be ignored/omitted.
- *
- * @param condition condition to set
- *
- * @since 4.0.0
- */
- public void setIgnoreScopingPredicate(@Nonnull final Predicate<ProfileRequestContext> condition) {
- ignoreScoping = Constraint.isNotNull(condition, "Ignore Scoping condition cannot be null");
- }
-
- /** {@inheritDoc} */
- public boolean isForceAuthn(@Nullable final ProfileRequestContext profileRequestContext) {
- return forceAuthnPredicate.test(profileRequestContext);
- }
-
- /**
- * Set whether a fresh user presence proof should be required for this request.
- *
- * @param flag flag to set
- */
- public void setForceAuthn(final boolean flag) {
- forceAuthnPredicate = PredicateSupport.constant(flag);
- }
-
- /**
- * Set a condition to determine whether a fresh user presence proof should be required for this request.
- *
- * @param condition condition to set
- */
- public void setForceAuthnPredicate(@Nonnull final Predicate<ProfileRequestContext> condition) {
- forceAuthnPredicate = Constraint.isNotNull(condition, "Forced authentication predicate cannot be null");
- }
-
- /**
- * Get whether the client's address must match the address in an inbound {@link SubjectLocality}
- * element during inbound SSO.
- *
- * @param profileRequestContext current profile request context
- *
- * @return whether to compare addresses
- *
- * @since 4.0.0
- */
- public boolean isCheckAddress(@Nullable final ProfileRequestContext profileRequestContext) {
- return checkAddressPredicate.test(profileRequestContext);
- }
-
- /**
- * Set whether the client's address must match the address in an inbound {@link SubjectLocality}
- * element during inbound SSO.
- *
- * @param flag flag to set
- *
- * @since 4.0.0
- */
- public void setCheckAddress(final boolean flag) {
- checkAddressPredicate = PredicateSupport.constant(flag);
- }
-
- /**
- * Set a condition to determine whether the client's address must match the address in an inbound
- * {@link SubjectLocality} element during inbound SSO.
- *
- * @param condition condition to set
- *
- * @since 4.0.0
- */
- public void setCheckAddressPredicate(@Nonnull final Predicate<ProfileRequestContext> condition) {
- checkAddressPredicate = Constraint.isNotNull(condition, "Address checking predicate cannot be null");
- }
+ boolean isIgnoreScoping(@Nullable final ProfileRequestContext profileRequestContext);
/**
* Get condition to determine whether the response endpoint should be validated if the request is signed.
@@ -352,68 +71,7 @@ public class BrowserSSOProfileConfiguration extends AbstractSAML2AssertionProduc
*
* @since 4.0.0
*/
- public boolean isSkipEndpointValidationWhenSigned(@Nullable final ProfileRequestContext profileRequestContext) {
- return skipEndpointValidationWhenSignedPredicate.test(profileRequestContext);
- }
-
- /**
- * Set whether the response endpoint should be validated if the request is signed.
- *
- * @param flag flag to set
- *
- * @since 3.4.0
- */
- public void setSkipEndpointValidationWhenSigned(final boolean flag) {
- skipEndpointValidationWhenSignedPredicate = PredicateSupport.constant(flag);
- }
-
- /**
- * Set condition to determine whether the response endpoint should be validated if the request is signed.
- *
- * @param condition condition to set
- *
- * @since 3.4.0
- */
- public void setSkipEndpointValidationWhenSignedPredicate(
- @Nonnull final Predicate<ProfileRequestContext> condition) {
- skipEndpointValidationWhenSignedPredicate = Constraint.isNotNull(condition, "Condition cannot be null");
- }
-
- /**
- * Gets the maximum number of times an assertion may be proxied.
- *
- * @param profileRequestContext current profile request context
- *
- * @return maximum number of times an assertion may be proxied
- */
- @Nullable public Integer getProxyCount(@Nullable final ProfileRequestContext profileRequestContext) {
- final Integer count = proxyCountLookupStrategy.apply(profileRequestContext);
- if (count != null) {
- Constraint.isGreaterThanOrEqual(0, count, "Proxy count must be greater than or equal to 0");
- }
- return count;
- }
-
- /**
- * Set the maximum number of times an assertion may be proxied.
- *
- * @param count maximum number of times an assertion may be proxied
- */
- public void setProxyCount(@Nullable @NonNegative final Integer count) {
- if (count != null) {
- Constraint.isGreaterThanOrEqual(0, count, "Proxy count must be greater than or equal to 0");
- }
- proxyCountLookupStrategy = FunctionSupport.constant(count);
- }
-
- /**
- * Set a lookup strategy for the maximum number of times an assertion may be proxied.
- *
- * @param strategy lookup strategy
- */
- public void setProxyCountLookupStrategy(@Nonnull final Function<ProfileRequestContext,Integer> strategy) {
- proxyCountLookupStrategy = Constraint.isNotNull(strategy, "Lookup strategy cannot be null");
- }
+ boolean isSkipEndpointValidationWhenSigned(@Nullable final ProfileRequestContext profileRequestContext);
/**
* Gets the unmodifiable collection of audiences for a proxied assertion.
@@ -422,38 +80,8 @@ public class BrowserSSOProfileConfiguration extends AbstractSAML2AssertionProduc
*
* @return audiences for a proxied assertion
*/
- @Nonnull @NonnullElements @NotLive @Unmodifiable public Set<String> getProxyAudiences(
- @Nullable final ProfileRequestContext profileRequestContext) {
- final Collection<String> audiences = proxyAudiencesLookupStrategy.apply(profileRequestContext);
- if (audiences != null) {
- return CollectionSupport.copyToSet(audiences);
- }
- return CollectionSupport.emptySet();
- }
-
- /**
- * Set the proxy audiences to be added to responses.
- *
- * @param audiences proxy audiences to be added to responses
- */
- public void setProxyAudiences(@Nullable @NonnullElements final Collection<String> audiences) {
- if (audiences == null || audiences.isEmpty()) {
- proxyAudiencesLookupStrategy = FunctionSupport.constant(null);
- } else {
- proxyAudiencesLookupStrategy = FunctionSupport.constant(
- List.copyOf(StringSupport.normalizeStringCollection(audiences)));
- }
- }
-
- /**
- * Set a lookup strategy for the proxy audiences to be added to responses.
- *
- * @param strategy lookup strategy
- */
- public void setProxyAudiencesLookupStrategy(
- @Nonnull final Function<ProfileRequestContext,Collection<String>> strategy) {
- proxyAudiencesLookupStrategy = Constraint.isNotNull(strategy, "Lookup strategy cannot be null");
- }
+ @Nonnull @NonnullElements @NotLive @Unmodifiable Set<String> getProxyAudiences(
+ @Nullable final ProfileRequestContext profileRequestContext);
/**
* Gets whether to suppress inclusion of {@link AuthenticatingAuthority} element.
@@ -466,34 +94,8 @@ public class BrowserSSOProfileConfiguration extends AbstractSAML2AssertionProduc
*
* @since 4.2.0
*/
- public boolean isSuppressAuthenticatingAuthority(@Nullable final ProfileRequestContext profileRequestContext) {
- return suppressAuthenticatingAuthorityPredicate.test(profileRequestContext);
- }
-
- /**
- * Sets whether to suppress inclusion of {@link AuthenticatingAuthority} element.
- *
- * <p>Defaults to false.</p>
- *
- * @param flag flag to set
- *
- * @since 4.2.0
- */
- public void setSuppressAuthenticatingAuthority(final boolean flag) {
- suppressAuthenticatingAuthorityPredicate = PredicateSupport.constant(flag);
- }
-
- /**
- * Sets condition to determine whether to suppress inclusion of {@link AuthenticatingAuthority} element.
- *
- * @param condition condition to set
- *
- * @since 4.2.0
- */
- public void setSuppressAuthenticatingAuthorityPredicate(@Nonnull final Predicate<ProfileRequestContext> condition) {
- suppressAuthenticatingAuthorityPredicate = Constraint.isNotNull(condition, "Condition cannot be null");
- }
-
+ boolean isSuppressAuthenticatingAuthority(@Nullable final ProfileRequestContext profileRequestContext);
+
/**
* Gets whether authentication results produced by use of this profile should carry the proxied
* assertion's AuthnInstant, rather than the current time.
@@ -506,33 +108,7 @@ public class BrowserSSOProfileConfiguration extends AbstractSAML2AssertionProduc
*
* @since 4.0.0
*/
- public boolean isProxiedAuthnInstant(@Nullable final ProfileRequestContext profileRequestContext) {
- return proxiedAuthnInstantPredicate.test(profileRequestContext);
- }
-
- /**
- * Sets whether authentication results produced by use of this profile should carry the proxied
- * assertion's AuthnInstant, rather than the current time.
- *
- * @param flag flag to set
- *
- * @since 4.0.0
- */
- public void setProxiedAuthnInstant(final boolean flag) {
- proxiedAuthnInstantPredicate = PredicateSupport.constant(flag);
- }
-
- /**
- * Sets condition to determine whether authentication results produced by use of this profile should
- * carry the proxied assertion's AuthnInstant, rather than the current time.
- *
- * @param condition condition to set
- *
- * @since 4.0.0
- */
- public void setProxiedAuthnInstantPredicate(@Nonnull final Predicate<ProfileRequestContext> condition) {
- proxiedAuthnInstantPredicate = Constraint.isNotNull(condition, "Condition cannot be null");
- }
+ boolean isProxiedAuthnInstant(@Nullable final ProfileRequestContext profileRequestContext);
/**
* Get whether to require signed requests.
@@ -543,59 +119,7 @@ public class BrowserSSOProfileConfiguration extends AbstractSAML2AssertionProduc
*
* @since 4.3.0
*/
- public boolean isRequireSignedRequests(@Nullable final ProfileRequestContext profileRequestContext) {
- return requireSignedRequestsPredicate.test(profileRequestContext);
- }
-
- /**
- * Set whether to require signed requests.
- *
- * @param flag flag to set
- *
- * @since 4.3.0
- */
- public void setRequireSignedRequests(final boolean flag) {
- requireSignedRequestsPredicate = PredicateSupport.constant(flag);
- }
-
- /**
- * Set a condition to determine whether to require signed requests.
- *
- * @param condition condition to set
- *
- * @since 4.3.0
- */
- public void setRequireSignedRequestsPredicate(@Nonnull final Predicate<ProfileRequestContext> condition) {
- requireSignedRequestsPredicate = Constraint.isNotNull(condition, "Signed requests predicate cannot be null");
- }
-
- /** {@inheritDoc} */
- public boolean isRequireSignedAssertions(@Nullable final ProfileRequestContext profileRequestContext) {
- return requireSignedAssertionsPredicate.test(profileRequestContext);
- }
-
- /**
- * Set whether to require signed assertions.
- *
- * @param flag flag to set
- *
- * @since 5.0.0
- */
- public void setRequireSignedAssertions(final boolean flag) {
- requireSignedAssertionsPredicate = PredicateSupport.constant(flag);
- }
-
- /**
- * Set a condition to determine whether to require signed assertions.
- *
- * @param condition condition to set
- *
- * @since 5.0.0
- */
- public void setRequireSignedAssertionsPredicate(@Nonnull final Predicate<ProfileRequestContext> condition) {
- requireSignedAssertionsPredicate = Constraint.isNotNull(condition,
- "Signed assertions predicate cannot be null");
- }
+ boolean isRequireSignedRequests(@Nullable final ProfileRequestContext profileRequestContext);
/**
* Get the maximum amount of time the service provider should maintain a session for the user
@@ -605,84 +129,7 @@ public class BrowserSSOProfileConfiguration extends AbstractSAML2AssertionProduc
*
* @return max lifetime of service provider should maintain a session
*/
- @Nullable public Duration getMaximumSPSessionLifetime(@Nullable final ProfileRequestContext profileRequestContext) {
- final Duration lifetime = maximumSPSessionLifetimeLookupStrategy.apply(profileRequestContext);
- Constraint.isFalse(lifetime != null && lifetime.isNegative(),
- "Maximum SP session lifetime must be greater than or equal to 0");
- return lifetime;
- }
-
- /**
- * Set the maximum amount of time the service provider should maintain a session for the user
- * based on the authentication assertion. A null or 0 is interpreted as an unlimited lifetime.
- *
- * @param lifetime max lifetime of service provider should maintain a session
- */
- public void setMaximumSPSessionLifetime(@Nullable final Duration lifetime) {
- Constraint.isFalse(lifetime != null && lifetime.isNegative(),
- "Maximum SP session lifetime must be greater than or equal to 0");
-
- maximumSPSessionLifetimeLookupStrategy = FunctionSupport.constant(lifetime);
- }
-
- /**
- * Set a lookup strategy for the maximum amount of time the service provider should maintain a session for the user.
- *
- * @param strategy lookup strategy
- *
- * @since 3.4.0
- */
- public void setMaximumSPSessionLifetimeLookupStrategy(
- @Nonnull final Function<ProfileRequestContext,Duration> strategy) {
- maximumSPSessionLifetimeLookupStrategy = Constraint.isNotNull(strategy, "Lookup strategy cannot be null");
- }
-
- /**
- * Get the maximum amount of time allowed to have elapsed since an incoming AuthnInstant.
- *
- * <p>A null or 0 is interpreted as an unlimited amount.</p>
- *
- * @param profileRequestContext current profile request context
- *
- * @return max time since inbound AuthnInstant
- *
- * @since 4.0.0
- */
- @NonNegative @Nullable public Duration getMaximumTimeSinceAuthn(
- @Nullable final ProfileRequestContext profileRequestContext) {
- final Duration amount = maximumTimeSinceAuthnLookupStrategy.apply(profileRequestContext);
- Constraint.isFalse(amount != null && amount.isNegative(),
- "Maximum time since authentication must be greater than or equal to 0");
- return amount;
- }
-
- /**
- * Set the maximum amount of time allowed to have elapsed since an incoming AuthnInstant.
- *
- * <p>A null or 0 is interpreted as an unlimited amount.</p>
- *
- * @param amount max time to allow
- *
- * @since 4.0.0
- */
- public void setMaximumTimeSinceAuthn(@Nullable final Duration amount) {
- Constraint.isFalse(amount != null && amount.isNegative(),
- "Maximum time since authentication must be greater than or equal to 0");
-
- maximumTimeSinceAuthnLookupStrategy = FunctionSupport.constant(amount);
- }
-
- /**
- * Set a lookup strategy for the maximum amount of time allowed to have elapsed since an incoming AuthnInstant.
- *
- * @param strategy lookup strategy
- *
- * @since 4.0.0
- */
- public void setMaximumTimeSinceAuthnLookupStrategy(
- @Nonnull final Function<ProfileRequestContext,Duration> strategy) {
- maximumTimeSinceAuthnLookupStrategy = Constraint.isNotNull(strategy, "Lookup strategy cannot be null");
- }
+ @Nullable Duration getMaximumSPSessionLifetime(@Nullable final ProfileRequestContext profileRequestContext);
/**
* Get the predicate used to determine if produced assertions may be delegated.
@@ -694,37 +141,8 @@ public class BrowserSSOProfileConfiguration extends AbstractSAML2AssertionProduc
* @deprecated
*/
@Deprecated(since="5.0.0", forRemoval=true)
- public boolean isAllowDelegation(@Nullable final ProfileRequestContext profileRequestContext) {
- return allowDelegationPredicate.test(profileRequestContext);
- }
+ boolean isAllowDelegation(@Nullable final ProfileRequestContext profileRequestContext);
-
- /**
- * Set whether produced assertions may be delegated.
- *
- * @param flag flag to set
- *
- * @deprecated
- */
- @Deprecated(since="5.0.0", forRemoval=true)
- public void setAllowDelegation(final boolean flag) {
- DeprecationSupport.warnOnce(ObjectType.CONFIGURATION, "allowDelegation", "relying-party.xml", null);
- allowDelegationPredicate = PredicateSupport.constant(flag);
- }
-
- /**
- * Set the predicate used to determine if produced assertions may be delegated.
- *
- * @param predicate used to determine if produced assertions may be delegated
- *
- * @deprecated
- */
- @Deprecated(since="5.0.0", forRemoval=true)
- public void setAllowDelegationPredicate(@Nonnull final Predicate<ProfileRequestContext> predicate) {
- DeprecationSupport.warnOnce(ObjectType.CONFIGURATION, "allowDelegationPredicate", "relying-party.xml", null);
- allowDelegationPredicate = Constraint.isNotNull(predicate, "Allow delegation predicate cannot be null");
- }
-
/**
* Get the limits on the total number of delegates that may be derived from the initial SAML token.
*
@@ -735,50 +153,8 @@ public class BrowserSSOProfileConfiguration extends AbstractSAML2AssertionProduc
* @deprecated
*/
@Deprecated(since="5.0.0", forRemoval=true)
- @NonNegative public long getMaximumTokenDelegationChainLength(
- @Nullable final ProfileRequestContext profileRequestContext) {
-
- final Long len = maximumTokenDelegationChainLengthLookupStrategy.apply(profileRequestContext);
- Constraint.isNotNull(len, "Delegation chain length cannot be null");
- Constraint.isGreaterThanOrEqual(0, len, "Delegation chain length must be greater than or equal to 0");
-
- return len;
- }
+ @NonNegative long getMaximumTokenDelegationChainLength(@Nullable final ProfileRequestContext profileRequestContext);
- /**
- * Set the limits on the total number of delegates that may be derived from the initial SAML token.
- *
- * @param length the limit on the total number of delegates that may be derived from the initial SAML token
- *
- * @deprecated
- */
- @Deprecated(since="5.0.0", forRemoval=true)
- public void setMaximumTokenDelegationChainLength(@NonNegative final long length) {
- DeprecationSupport.warnOnce(ObjectType.CONFIGURATION, "maximumTokenDelegationChainLength",
- "relying-party.xml", null);
- Constraint.isGreaterThanOrEqual(0, length, "Delegation chain length must be greater than or equal to 0");
-
- maximumTokenDelegationChainLengthLookupStrategy = FunctionSupport.constant(length);
- }
-
- /**
- * Set a lookup strategy for the limits on the total number of delegates that
- * may be derived from the initial SAML token.
- *
- * @param strategy lookup strategy
- *
- * @since 3.4.0
- *
- * @deprecated
- */
- @Deprecated(since="5.0.0", forRemoval=true)
- public void setMaximumTokenDelegationChainLengthLookupStrategy(
- @Nonnull final Function<ProfileRequestContext,Long> strategy) {
- DeprecationSupport.warnOnce(ObjectType.CONFIGURATION, "maximumTokenDelegationChainLengthLookupStrategy",
- "relying-party.xml", null);
- maximumTokenDelegationChainLengthLookupStrategy =
- Constraint.isNotNull(strategy, "Lookup strategy cannot be null");
- }
/**
* Get the function to use to translate an inbound proxied SAML 2.0 {@link AuthnContext} into the appropriate
@@ -790,37 +166,8 @@ public class BrowserSSOProfileConfiguration extends AbstractSAML2AssertionProduc
*
* @since 4.0.0
*/
- @Nullable public Function<AuthnContext,Collection<Principal>> getAuthnContextTranslationStrategy(
- @Nullable final ProfileRequestContext profileRequestContext) {
- return authnContextTranslationStrategyLookupStrategy.apply(profileRequestContext);
- }
-
- /**
- * Set the function to use to translate an inbound proxied SAML 2.0 {@link AuthnContext} into the appropriate
- * set of custom {@link Principal} objects to populate into the subject.
- *
- * @param strategy translation function
- *
- * @since 4.0.0
- */
- public void setAuthnContextTranslationStrategy(
- @Nullable final Function<AuthnContext,Collection<Principal>> strategy) {
- authnContextTranslationStrategyLookupStrategy = FunctionSupport.constant(strategy);
- }
-
- /**
- * Set a lookup strategy for the function to use to translate an inbound proxied SAML 2.0 {@link AuthnContext}
- * into the appropriate set of custom {@link Principal} objects to populate into the subject.
- *
- * @param strategy lookup strategy
- *
- * @since 4.0.0
- */
- public void setAuthnContextTranslationStrategyLookupStrategy(
- @Nonnull final Function<ProfileRequestContext,Function<AuthnContext,Collection<Principal>>> strategy) {
- authnContextTranslationStrategyLookupStrategy =
- Constraint.isNotNull(strategy, "Lookup strategy cannot be null");
- }
+ @Nullable Function<AuthnContext,Collection<Principal>> getAuthnContextTranslationStrategy(
+ @Nullable final ProfileRequestContext profileRequestContext);
/**
* Get the function to use to translate an inbound proxied response into the appropriate
@@ -835,333 +182,7 @@ public class BrowserSSOProfileConfiguration extends AbstractSAML2AssertionProduc
*
* @since 4.1.0
*/
- @Nullable public Function<ProfileRequestContext,Collection<Principal>> getAuthnContextTranslationStrategyEx(
- @Nullable final ProfileRequestContext profileRequestContext) {
- return authnContextTranslationStrategyExLookupStrategy.apply(profileRequestContext);
- }
-
- /**
- * Set the function to use to translate an inbound proxied response into the appropriate
- * set of custom {@link Principal} objects to populate into the subject.
- *
- * <p>This differs from the original in that the input is the entire {@link ProfileRequestContext}
- * of the proxied authentication state rather than the SAML {@link AuthnContext} directly.</p>
- *
- * @param strategy translation function
- *
- * @since 4.1.0
- */
- public void setAuthnContextTranslationStrategyEx(
- @Nullable final Function<ProfileRequestContext,Collection<Principal>> strategy) {
- authnContextTranslationStrategyExLookupStrategy = FunctionSupport.constant(strategy);
- }
-
- /**
- * Set a lookup strategy for the function to use to translate an inbound proxied response
- * into the appropriate set of custom {@link Principal} objects to populate into the subject.
- *
- * <p>This differs from the original in that the input is the entire {@link ProfileRequestContext}
- * of the proxied authentication state rather than the SAML {@link AuthnContext} directly.</p>
- *
- * @param strategy lookup strategy
- *
- * @since 4.1.0
- */
- public void setAuthnContextTranslationStrategyExLookupStrategy(
- @Nonnull
- final Function<ProfileRequestContext,Function<ProfileRequestContext,Collection<Principal>>> strategy) {
- authnContextTranslationStrategyExLookupStrategy =
- Constraint.isNotNull(strategy, "Lookup strategy cannot be null");
- }
-
- /**
- * Get the comparison operator to use when issuing SAML requests containing requested context classes.
- *
- * @param profileRequestContext profile request context
- *
- * @return comparison value or null
- *
- * @since 4.0.0
- */
- @Nullable public AuthnContextComparisonTypeEnumeration getAuthnContextComparison(
- @Nullable final ProfileRequestContext profileRequestContext) {
-
- final String comparison = authnContextComparisonLookupStrategy.apply(profileRequestContext);
- if (comparison != null) {
- return AuthnContextComparisonTypeEnumeration.valueOf(comparison.toUpperCase());
- }
-
- return null;
- }
-
- /**
- * Set the comparison operator to use when issuing SAML requests containing requested context classes.
- *
- * @param comparison comparison value or null
- *
- * @since 4.0.0
- */
- public void setAuthnContextComparison(@Nullable final AuthnContextComparisonTypeEnumeration comparison) {
- authnContextComparisonLookupStrategy =
- FunctionSupport.constant(comparison != null ? comparison.toString() : null);
- }
-
- /**
- * Set a lookup strategy for the comparison operator to use when issuing SAML requests containing
- * requested context classes.
- *
- * @param strategy lookup strategy
- *
- * @since 4.0.0
- */
- public void setAuthnContextComparisonLookupStrategy(
- @Nonnull final Function<ProfileRequestContext,String> strategy) {
- authnContextComparisonLookupStrategy = Constraint.isNotNull(strategy, "Lookup strategy cannot be null");
- }
-
- /** {@inheritDoc} */
- @Nonnull @NonnullElements @NotLive @Unmodifiable public List<Principal> getDefaultAuthenticationMethods(
- @Nullable final ProfileRequestContext profileRequestContext) {
- final Collection<AuthnContextClassRefPrincipal> methods =
- defaultAuthenticationContextsLookupStrategy.apply(profileRequestContext);
- if (methods != null) {
- return CollectionSupport.copyToList(methods);
- }
- return CollectionSupport.emptyList();
- }
-
- /**
- * Set the default authentication contexts to use, expressed as custom principals.
- *
- * @param contexts default authentication contexts to use
- */
- public void setDefaultAuthenticationMethods(
- @Nullable @NonnullElements final Collection<AuthnContextClassRefPrincipal> contexts) {
- if (contexts != null) {
- defaultAuthenticationContextsLookupStrategy = FunctionSupport.constant(List.copyOf(contexts));
- } else {
- defaultAuthenticationContextsLookupStrategy = FunctionSupport.constant(null);
- }
- }
-
- /**
- * Set a lookup strategy for the authentication contexts to use, expressed as custom principals.
- *
- * @param strategy lookup strategy
- *
- * @since 3.3.0
- */
- public void setDefaultAuthenticationMethodsLookupStrategy(
- @Nonnull final Function<ProfileRequestContext,Collection<AuthnContextClassRefPrincipal>> strategy) {
- defaultAuthenticationContextsLookupStrategy = Constraint.isNotNull(strategy, "Lookup strategy cannot be null");
- }
-
- /** {@inheritDoc} */
- @Nonnull @NonnullElements @NotLive @Unmodifiable public Set<String> getAuthenticationFlows(
- @Nullable final ProfileRequestContext profileRequestContext) {
- final Set<String> flows = authenticationFlowsLookupStrategy.apply(profileRequestContext);
- if (flows != null) {
- return CollectionSupport.copyToSet(flows);
- }
- return CollectionSupport.emptySet();
- }
-
- /**
- * Set the authentication flows to use.
- *
- * @param flows flow identifiers to use
- */
- public void setAuthenticationFlows(@Nullable @NonnullElements final Collection<String> flows) {
- if (flows != null) {
- authenticationFlowsLookupStrategy =
- FunctionSupport.constant(
- CollectionSupport.copyToSet(StringSupport.normalizeStringCollection(flows)));
- } else {
- authenticationFlowsLookupStrategy = FunctionSupport.constant(null);
- }
- }
-
- /**
- * Set a lookup strategy for the authentication flows to use.
- *
- * @param strategy lookup strategy
- *
- * @since 3.3.0
- */
- public void setAuthenticationFlowsLookupStrategy(
- @Nonnull final Function<ProfileRequestContext,Set<String>> strategy) {
- authenticationFlowsLookupStrategy = Constraint.isNotNull(strategy, "Lookup strategy cannot be null");
- }
-
- /** {@inheritDoc} */
- @Nonnull @NonnullElements @NotLive @Unmodifiable public List<String> getPostAuthenticationFlows(
- @Nullable final ProfileRequestContext profileRequestContext) {
- final Collection<String> flows = postAuthenticationFlowsLookupStrategy.apply(profileRequestContext);
- if (flows != null) {
- return CollectionSupport.copyToList(flows);
- }
- return CollectionSupport.emptyList();
- }
-
- /**
- * Set the ordered collection of post-authentication interceptor flows to enable.
- *
- * @param flows flow identifiers to enable
- */
- public void setPostAuthenticationFlows(@Nullable @NonnullElements final Collection<String> flows) {
- if (flows != null) {
- postAuthenticationFlowsLookupStrategy =
- FunctionSupport.constant(List.copyOf(StringSupport.normalizeStringCollection(flows)));
- } else {
- postAuthenticationFlowsLookupStrategy = FunctionSupport.constant(null);
- }
- }
-
- /**
- * Set a lookup strategy for the post-authentication interceptor flows to enable.
- *
- * @param strategy lookup strategy
- *
- * @since 3.3.0
- */
- public void setPostAuthenticationFlowsLookupStrategy(
- @Nonnull final Function<ProfileRequestContext,Collection<String>> strategy) {
- postAuthenticationFlowsLookupStrategy = Constraint.isNotNull(strategy, "Lookup strategy cannot be null");
- }
-
- /**
- * Get the name identifier formats to use.
- *
- * @param profileRequestContext profile request context
- *
- * @return formats to use
- */
- @Nonnull @NonnullElements @NotLive @Unmodifiable public List<String> getNameIDFormatPrecedence(
- @Nullable final ProfileRequestContext profileRequestContext) {
-
- final Collection<String> formats = nameIDFormatPrecedenceLookupStrategy.apply(profileRequestContext);
- if (formats != null) {
- return CollectionSupport.copyToList(formats);
- }
- return CollectionSupport.emptyList();
- }
-
- /**
- * Set the name identifier formats to use.
- *
- * @param formats name identifier formats to use
- */
- public void setNameIDFormatPrecedence(@Nullable @NonnullElements final Collection<String> formats) {
- if (formats != null) {
- nameIDFormatPrecedenceLookupStrategy =
- FunctionSupport.constant(
- CollectionSupport.copyToList(StringSupport.normalizeStringCollection(formats)));
- } else {
- nameIDFormatPrecedenceLookupStrategy = FunctionSupport.constant(null);
- }
- }
-
- /**
- * Set a lookup strategy for the name identifier formats to use.
- *
- * @param strategy lookup strategy
- *
- * @since 3.3.0
- */
- public void setNameIDFormatPrecedenceLookupStrategy(
- @Nonnull final Function<ProfileRequestContext,Collection<String>> strategy) {
- nameIDFormatPrecedenceLookupStrategy = Constraint.isNotNull(strategy, "Lookup strategy cannot be null");
- }
-
- /** {@inheritDoc} */
- @Nullable public String getSPNameQualifier(@Nullable final ProfileRequestContext profileRequestContext) {
- return spNameQualifierLookupStrategy.apply(profileRequestContext);
- }
-
- /**
- * Sets the SPNameQualifier to include in requests.
- *
- * @param qualifier the SPNameQualifier to include
- *
- * @since 5.0.0
- */
- public void setSPNameQualifier(@Nullable final String qualifier) {
- spNameQualifierLookupStrategy = FunctionSupport.constant(qualifier);
- }
-
- /**
- * Sets a lookup strategy for the SPNameQualifier to include in requests.
- *
- * @param strategy lookup strategy
- *
- * @since 5.0.0
- */
- public void setSPNameQualifierLookupStrategy(@Nonnull final Function<ProfileRequestContext,String> strategy) {
- spNameQualifierLookupStrategy = Constraint.isNotNull(strategy, "Lookup strategy cannot be null");
- }
-
- /** {@inheritDoc} */
- @Nullable public String getAttributeIndex(@Nullable final ProfileRequestContext profileRequestContext) {
- return attributeIndexLookupStrategy.apply(profileRequestContext);
- }
-
- /**
- * Sets the AttributeConsumingServiceIndex to include in requests.
- *
- * @param index the index to include
- *
- * @since 5.0.0
- */
- public void setAttributeIndex(@Nullable final String index) {
- attributeIndexLookupStrategy = FunctionSupport.constant(index);
- }
-
- /**
- * Sets a lookup strategy for the AttributeConsumingServiceIndex to include in requests.
- *
- * @param strategy lookup strategy
- *
- * @since 5.0.0
- */
- public void setAttributeIndexLookupStrategy(@Nonnull final Function<ProfileRequestContext,String> strategy) {
- attributeIndexLookupStrategy = Constraint.isNotNull(strategy, "Lookup strategy cannot be null");
- }
-
- /** {@inheritDoc} */
- @Nonnull @NonnullElements @NotLive @Unmodifiable public Collection<RequestedAttribute> getRequestedAttributes(
- @Nullable final ProfileRequestContext profileRequestContext) {
- final Collection<RequestedAttribute> attrs = requestedAttributesLookupStrategy.apply(profileRequestContext);
- if (attrs != null) {
- return CollectionSupport.copyToList(attrs);
- }
- return CollectionSupport.emptyList();
- }
-
- /**
- * Set the {@link RequestedAttribute} objects to include in request.
- *
- * @param attrs requested attributes to include
- *
- * @since 5.0.0
- */
- public void setRequestedAttributes(@Nullable @NonnullElements final Collection<RequestedAttribute> attrs) {
- if (attrs != null) {
- requestedAttributesLookupStrategy = FunctionSupport.constant(CollectionSupport.copyToList(attrs));
- } else {
- requestedAttributesLookupStrategy = FunctionSupport.constant(null);
- }
- }
-
- /**
- * Set a lookup strategy for the name identifier formats to use.
- *
- * @param strategy lookup strategy
- *
- * @since 5.0.0
- */
- public void setRequestedAttributesLookupStrategy(
- @Nonnull final Function<ProfileRequestContext,Collection<RequestedAttribute>> strategy) {
- requestedAttributesLookupStrategy = Constraint.isNotNull(strategy, "Lookup strategy cannot be null");
- }
+ @Nullable Function<ProfileRequestContext,Collection<Principal>> getAuthnContextTranslationStrategyEx(
+ @Nullable final ProfileRequestContext profileRequestContext);
}
\ No newline at end of file
diff --git a/idp-saml-api/src/main/java/net/shibboleth/idp/saml/saml2/profile/config/ECPProfileConfiguration.java b/idp-saml-api/src/main/java/net/shibboleth/idp/saml/saml2/profile/config/ECPProfileConfiguration.java
index cd43a67f3..b8f9bf6e0 100644
--- a/idp-saml-api/src/main/java/net/shibboleth/idp/saml/saml2/profile/config/ECPProfileConfiguration.java
+++ b/idp-saml-api/src/main/java/net/shibboleth/idp/saml/saml2/profile/config/ECPProfileConfiguration.java
@@ -17,9 +17,7 @@
package net.shibboleth.idp.saml.saml2.profile.config;
-import java.util.Collection;
import java.util.Set;
-import java.util.function.Function;
import javax.annotation.Nonnull;
import javax.annotation.Nullable;
@@ -27,38 +25,12 @@ import javax.annotation.Nullable;
import org.opensaml.profile.context.ProfileRequestContext;
import net.shibboleth.shared.annotation.constraint.NonnullElements;
-import net.shibboleth.shared.annotation.constraint.NotEmpty;
import net.shibboleth.shared.annotation.constraint.NotLive;
import net.shibboleth.shared.annotation.constraint.Unmodifiable;
-import net.shibboleth.shared.collection.CollectionSupport;
-import net.shibboleth.shared.logic.Constraint;
-import net.shibboleth.shared.logic.FunctionSupport;
-import net.shibboleth.shared.primitive.StringSupport;
/** Configuration support for IdP SAML 2.0 ECP profile. */
-public class ECPProfileConfiguration extends BrowserSSOProfileConfiguration
- implements net.shibboleth.saml.saml2.profile.config.ECPProfileConfiguration {
-
- /** Lookup function to supply Local error events to handle without a SOAP fault. */
- @Nonnull private Function<ProfileRequestContext,Set<String>> localEventsLookupStrategy;
-
- /** Constructor. */
- public ECPProfileConfiguration() {
- this(net.shibboleth.saml.saml2.profile.config.ECPProfileConfiguration.PROFILE_ID);
-
- localEventsLookupStrategy = FunctionSupport.constant(null);
- }
-
- /**
- * Constructor.
- *
- * @param profileId unique ID for this profile
- */
- protected ECPProfileConfiguration(@Nonnull @NotEmpty final String profileId) {
- super(profileId);
-
- localEventsLookupStrategy = FunctionSupport.constant(null);
- }
+public interface ECPProfileConfiguration extends BrowserSSOProfileConfiguration,
+ net.shibboleth.saml.saml2.profile.config.ECPProfileConfiguration {
/**
* Get the set of local events to handle without a SOAP fault.
@@ -69,42 +41,7 @@ public class ECPProfileConfiguration extends BrowserSSOProfileConfiguration
*
* @since 3.3.0
*/
- @Nonnull @NonnullElements @NotLive @Unmodifiable public Set<String> getLocalEvents(
- @Nullable final ProfileRequestContext profileRequestContext) {
-
- final Set<String> events = localEventsLookupStrategy.apply(profileRequestContext);
- if (events != null) {
- return CollectionSupport.copyToSet(events);
- }
- return CollectionSupport.emptySet();
- }
-
- /**
- * Set the local events to handle without a SOAP fault.
- *
- * @param events truly local events
- *
- * @since 3.3.0
- */
- public void setLocalEvents(@Nullable @NonnullElements final Collection<String> events) {
-
- if (events != null && !events.isEmpty()) {
- localEventsLookupStrategy = FunctionSupport.constant(
- Set.copyOf(StringSupport.normalizeStringCollection(events)));
- } else {
- localEventsLookupStrategy = FunctionSupport.constant(null);
- }
- }
-
- /**
- * Set a lookup strategy for the local events to handle without a SOAP fault.
- *
- * @param strategy lookup strategy
- *
- * @since 3.3.0
- */
- public void setLocalEventsLookupStrategy(@Nonnull final Function<ProfileRequestContext,Set<String>> strategy) {
- localEventsLookupStrategy = Constraint.isNotNull(strategy, "Lookup strategy cannot be null");
- }
+ @Nonnull @NonnullElements @NotLive @Unmodifiable
+ Set<String> getLocalEvents(@Nullable final ProfileRequestContext profileRequestContext);
}
\ No newline at end of file
diff --git a/idp-saml-api/src/main/java/net/shibboleth/idp/saml/saml2/profile/config/logic/IgnoreScopingProfileConfigPredicate.java b/idp-saml-api/src/main/java/net/shibboleth/idp/saml/saml2/profile/config/logic/IgnoreScopingProfileConfigPredicate.java
index ea332a0d9..604f8dc6a 100644
--- a/idp-saml-api/src/main/java/net/shibboleth/idp/saml/saml2/profile/config/logic/IgnoreScopingProfileConfigPredicate.java
+++ b/idp-saml-api/src/main/java/net/shibboleth/idp/saml/saml2/profile/config/logic/IgnoreScopingProfileConfigPredicate.java
@@ -42,8 +42,8 @@ public class IgnoreScopingProfileConfigPredicate extends AbstractRelyingPartyPre
final RelyingPartyContext rpc = getRelyingPartyContext(input);
if (rpc != null) {
final ProfileConfiguration pc = rpc.getProfileConfig();
- if (pc instanceof BrowserSSOProfileConfiguration) {
- return ((BrowserSSOProfileConfiguration) pc).isIgnoreScoping(input);
+ if (pc instanceof BrowserSSOProfileConfiguration sso) {
+ return sso.isIgnoreScoping(input);
}
}
diff --git a/idp-saml-api/src/main/java/net/shibboleth/idp/saml/saml2/profile/config/logic/SuppressAuthenticatingAuthorityPredicate.java b/idp-saml-api/src/main/java/net/shibboleth/idp/saml/saml2/profile/config/logic/SuppressAuthenticatingAuthorityPredicate.java
index ff66bc65d..6079054d0 100644
--- a/idp-saml-api/src/main/java/net/shibboleth/idp/saml/saml2/profile/config/logic/SuppressAuthenticatingAuthorityPredicate.java
+++ b/idp-saml-api/src/main/java/net/shibboleth/idp/saml/saml2/profile/config/logic/SuppressAuthenticatingAuthorityPredicate.java
@@ -42,8 +42,8 @@ public class SuppressAuthenticatingAuthorityPredicate extends AbstractRelyingPar
final RelyingPartyContext rpc = getRelyingPartyContext(input);
if (rpc != null) {
final ProfileConfiguration pc = rpc.getProfileConfig();
- if (pc instanceof BrowserSSOProfileConfiguration) {
- return ((BrowserSSOProfileConfiguration) pc).isSuppressAuthenticatingAuthority(input);
+ if (pc instanceof BrowserSSOProfileConfiguration sso) {
+ return sso.isSuppressAuthenticatingAuthority(input);
}
}
diff --git a/idp-saml-api/src/main/java/net/shibboleth/idp/saml/saml2/profile/config/navigate/ProxyRestrictionLookupFunction.java b/idp-saml-api/src/main/java/net/shibboleth/idp/saml/saml2/profile/config/navigate/ProxyRestrictionLookupFunction.java
index 09af402b2..4c511c9a2 100644
--- a/idp-saml-api/src/main/java/net/shibboleth/idp/saml/saml2/profile/config/navigate/ProxyRestrictionLookupFunction.java
+++ b/idp-saml-api/src/main/java/net/shibboleth/idp/saml/saml2/profile/config/navigate/ProxyRestrictionLookupFunction.java
@@ -77,9 +77,9 @@ public class ProxyRestrictionLookupFunction extends AbstractRelyingPartyLookupFu
final RelyingPartyContext rpc = getRelyingPartyContextLookupStrategy().apply(input);
if (rpc != null) {
final ProfileConfiguration pc = rpc.getProfileConfig();
- if (pc instanceof BrowserSSOProfileConfiguration) {
- proxyCount = ((BrowserSSOProfileConfiguration) pc).getProxyCount(input);
- final Set<String> configAudiences = ((BrowserSSOProfileConfiguration) pc).getProxyAudiences(input);
+ if (pc instanceof BrowserSSOProfileConfiguration sso) {
+ proxyCount = sso.getProxyCount(input);
+ final Set<String> configAudiences = sso.getProxyAudiences(input);
if (configAudiences != null && !configAudiences.isEmpty()) {
audiences.addAll(configAudiences);
}
diff --git a/idp-saml-impl/pom.xml b/idp-saml-impl/pom.xml
index f614bae3b..a42c6d81c 100644
--- a/idp-saml-impl/pom.xml
+++ b/idp-saml-impl/pom.xml
@@ -177,6 +177,12 @@
</dependency>
<!-- Test Dependencies -->
+ <dependency>
+ <groupId>${project.groupId}</groupId>
+ <artifactId>idp-admin-api</artifactId>
+ <version>${project.version}</version>
+ <scope>test</scope>
+ </dependency>
<dependency>
<groupId>${project.groupId}</groupId>
<artifactId>idp-profile-impl</artifactId>
diff --git a/idp-saml-api/src/main/java/net/shibboleth/idp/saml/profile/config/AbstractSAMLProfileConfiguration.java b/idp-saml-impl/src/main/java/net/shibboleth/idp/saml/profile/config/impl/AbstractSAMLProfileConfiguration.java
similarity index 96%
rename from idp-saml-api/src/main/java/net/shibboleth/idp/saml/profile/config/AbstractSAMLProfileConfiguration.java
rename to idp-saml-impl/src/main/java/net/shibboleth/idp/saml/profile/config/impl/AbstractSAMLProfileConfiguration.java
index b58eb0a60..379fe196c 100644
--- a/idp-saml-api/src/main/java/net/shibboleth/idp/saml/profile/config/AbstractSAMLProfileConfiguration.java
+++ b/idp-saml-impl/src/main/java/net/shibboleth/idp/saml/profile/config/impl/AbstractSAMLProfileConfiguration.java
@@ -15,7 +15,7 @@
* limitations under the License.
*/
-package net.shibboleth.idp.saml.profile.config;
+package net.shibboleth.idp.saml.profile.config.impl;
import java.util.function.Predicate;
@@ -23,6 +23,7 @@ import javax.annotation.Nonnull;
import javax.annotation.Nullable;
import net.shibboleth.idp.profile.config.AbstractInterceptorAwareProfileConfiguration;
+import net.shibboleth.idp.saml.profile.config.SAMLProfileConfiguration;
import net.shibboleth.shared.annotation.constraint.NotEmpty;
import net.shibboleth.shared.logic.Constraint;
import net.shibboleth.shared.logic.PredicateSupport;
diff --git a/idp-saml-api/src/main/java/net/shibboleth/idp/saml/saml1/profile/config/package-info.java b/idp-saml-impl/src/main/java/net/shibboleth/idp/saml/profile/config/impl/package-info.java
similarity index 87%
rename from idp-saml-api/src/main/java/net/shibboleth/idp/saml/saml1/profile/config/package-info.java
rename to idp-saml-impl/src/main/java/net/shibboleth/idp/saml/profile/config/impl/package-info.java
index ecdf265e3..5656e3acf 100644
--- a/idp-saml-api/src/main/java/net/shibboleth/idp/saml/saml1/profile/config/package-info.java
+++ b/idp-saml-impl/src/main/java/net/shibboleth/idp/saml/profile/config/impl/package-info.java
@@ -15,6 +15,7 @@
* limitations under the License.
*/
-/** Profile configurations for SAML 1 profiles. */
-
-package net.shibboleth.idp.saml.saml1.profile.config;
\ No newline at end of file
+/**
+ * Implementations of SAML profile configuration interfaces.
+ */
+package net.shibboleth.idp.saml.profile.config.impl;
\ No newline at end of file
diff --git a/idp-saml-api/src/main/java/net/shibboleth/idp/saml/saml1/profile/config/AbstractSAML1ArtifactAwareProfileConfiguration.java b/idp-saml-impl/src/main/java/net/shibboleth/idp/saml/saml1/profile/config/impl/AbstractSAML1ArtifactAwareProfileConfiguration.java
similarity index 95%
rename from idp-saml-api/src/main/java/net/shibboleth/idp/saml/saml1/profile/config/AbstractSAML1ArtifactAwareProfileConfiguration.java
rename to idp-saml-impl/src/main/java/net/shibboleth/idp/saml/saml1/profile/config/impl/AbstractSAML1ArtifactAwareProfileConfiguration.java
index e435114d7..b6fe3c4e7 100644
--- a/idp-saml-api/src/main/java/net/shibboleth/idp/saml/saml1/profile/config/AbstractSAML1ArtifactAwareProfileConfiguration.java
+++ b/idp-saml-impl/src/main/java/net/shibboleth/idp/saml/saml1/profile/config/impl/AbstractSAML1ArtifactAwareProfileConfiguration.java
@@ -15,7 +15,7 @@
* limitations under the License.
*/
-package net.shibboleth.idp.saml.saml1.profile.config;
+package net.shibboleth.idp.saml.saml1.profile.config.impl;
import java.util.function.Function;
@@ -24,7 +24,7 @@ import javax.annotation.Nullable;
import org.opensaml.profile.context.ProfileRequestContext;
-import net.shibboleth.idp.saml.profile.config.AbstractSAMLProfileConfiguration;
+import net.shibboleth.idp.saml.profile.config.impl.AbstractSAMLProfileConfiguration;
import net.shibboleth.saml.profile.config.SAMLArtifactAwareProfileConfiguration;
import net.shibboleth.saml.profile.config.SAMLArtifactConfiguration;
import net.shibboleth.shared.annotation.constraint.NotEmpty;
diff --git a/idp-saml-api/src/main/java/net/shibboleth/idp/saml/saml1/profile/config/AbstractSAML1AssertionProducingProfileConfiguration.java b/idp-saml-impl/src/main/java/net/shibboleth/idp/saml/saml1/profile/config/impl/AbstractSAML1AssertionProducingProfileConfiguration.java
similarity index 99%
rename from idp-saml-api/src/main/java/net/shibboleth/idp/saml/saml1/profile/config/AbstractSAML1AssertionProducingProfileConfiguration.java
rename to idp-saml-impl/src/main/java/net/shibboleth/idp/saml/saml1/profile/config/impl/AbstractSAML1AssertionProducingProfileConfiguration.java
index aaa31f779..c22752b97 100644
--- a/idp-saml-api/src/main/java/net/shibboleth/idp/saml/saml1/profile/config/AbstractSAML1AssertionProducingProfileConfiguration.java
+++ b/idp-saml-impl/src/main/java/net/shibboleth/idp/saml/saml1/profile/config/impl/AbstractSAML1AssertionProducingProfileConfiguration.java
@@ -15,7 +15,7 @@
* limitations under the License.
*/
-package net.shibboleth.idp.saml.saml1.profile.config;
+package net.shibboleth.idp.saml.saml1.profile.config.impl;
import java.time.Duration;
import java.util.Collection;
diff --git a/idp-saml-api/src/main/java/net/shibboleth/idp/saml/saml1/profile/config/ArtifactResolutionProfileConfiguration.java b/idp-saml-impl/src/main/java/net/shibboleth/idp/saml/saml1/profile/config/impl/ArtifactResolutionProfileConfiguration.java
similarity index 95%
rename from idp-saml-api/src/main/java/net/shibboleth/idp/saml/saml1/profile/config/ArtifactResolutionProfileConfiguration.java
rename to idp-saml-impl/src/main/java/net/shibboleth/idp/saml/saml1/profile/config/impl/ArtifactResolutionProfileConfiguration.java
index d363e9d55..5af3eadf9 100644
--- a/idp-saml-api/src/main/java/net/shibboleth/idp/saml/saml1/profile/config/ArtifactResolutionProfileConfiguration.java
+++ b/idp-saml-impl/src/main/java/net/shibboleth/idp/saml/saml1/profile/config/impl/ArtifactResolutionProfileConfiguration.java
@@ -15,7 +15,7 @@
* limitations under the License.
*/
-package net.shibboleth.idp.saml.saml1.profile.config;
+package net.shibboleth.idp.saml.saml1.profile.config.impl;
import java.util.function.Predicate;
@@ -25,7 +25,7 @@ import javax.annotation.Nullable;
import org.opensaml.profile.context.ProfileRequestContext;
import org.opensaml.profile.logic.NoIntegrityMessageChannelPredicate;
-import net.shibboleth.idp.saml.profile.config.AbstractSAMLProfileConfiguration;
+import net.shibboleth.idp.saml.profile.config.impl.AbstractSAMLProfileConfiguration;
import net.shibboleth.shared.annotation.constraint.NotEmpty;
import net.shibboleth.shared.logic.Constraint;
import net.shibboleth.shared.logic.PredicateSupport;
diff --git a/idp-saml-api/src/main/java/net/shibboleth/idp/saml/saml1/profile/config/AttributeQueryProfileConfiguration.java b/idp-saml-impl/src/main/java/net/shibboleth/idp/saml/saml1/profile/config/impl/AttributeQueryProfileConfiguration.java
similarity index 96%
rename from idp-saml-api/src/main/java/net/shibboleth/idp/saml/saml1/profile/config/AttributeQueryProfileConfiguration.java
rename to idp-saml-impl/src/main/java/net/shibboleth/idp/saml/saml1/profile/config/impl/AttributeQueryProfileConfiguration.java
index 4d47d7134..8de530a7e 100644
--- a/idp-saml-api/src/main/java/net/shibboleth/idp/saml/saml1/profile/config/AttributeQueryProfileConfiguration.java
+++ b/idp-saml-impl/src/main/java/net/shibboleth/idp/saml/saml1/profile/config/impl/AttributeQueryProfileConfiguration.java
@@ -15,7 +15,7 @@
* limitations under the License.
*/
-package net.shibboleth.idp.saml.saml1.profile.config;
+package net.shibboleth.idp.saml.saml1.profile.config.impl;
import javax.annotation.Nonnull;
diff --git a/idp-saml-api/src/main/java/net/shibboleth/idp/saml/saml1/profile/config/BrowserSSOProfileConfiguration.java b/idp-saml-impl/src/main/java/net/shibboleth/idp/saml/saml1/profile/config/impl/BrowserSSOProfileConfiguration.java
similarity index 96%
rename from idp-saml-api/src/main/java/net/shibboleth/idp/saml/saml1/profile/config/BrowserSSOProfileConfiguration.java
rename to idp-saml-impl/src/main/java/net/shibboleth/idp/saml/saml1/profile/config/impl/BrowserSSOProfileConfiguration.java
index 3d94bf0b8..ef11c8fd8 100644
--- a/idp-saml-api/src/main/java/net/shibboleth/idp/saml/saml1/profile/config/BrowserSSOProfileConfiguration.java
+++ b/idp-saml-impl/src/main/java/net/shibboleth/idp/saml/saml1/profile/config/impl/BrowserSSOProfileConfiguration.java
@@ -15,7 +15,7 @@
* limitations under the License.
*/
-package net.shibboleth.idp.saml.saml1.profile.config;
+package net.shibboleth.idp.saml.saml1.profile.config.impl;
import java.security.Principal;
import java.util.Collection;
@@ -47,6 +47,7 @@ import net.shibboleth.shared.primitive.StringSupport;
/** Configuration for SAML 1 Browser SSO profile requests. */
public class BrowserSSOProfileConfiguration extends AbstractSAML1AssertionProducingProfileConfiguration
implements net.shibboleth.saml.saml1.profile.config.BrowserSSOProfileConfiguration,
+ net.shibboleth.idp.saml.profile.config.BrowserSSOProfileConfiguration,
AuthenticationProfileConfiguration, AttributeResolvingProfileConfiguration,
SAMLAssertionProducingProfileConfiguration {
@@ -121,15 +122,7 @@ public class BrowserSSOProfileConfiguration extends AbstractSAML1AssertionProduc
resolveAttributesPredicate = Constraint.isNotNull(condition, "Resolve attributes predicate cannot be null");
}
- /**
- * Get whether responses to the authentication request should include an attribute statement.
- *
- * <p>Default is true</p>
- *
- * @param profileRequestContext current profile request context
- *
- * @return whether responses to the authentication request should include an attribute statement
- */
+ /** {@inheritDoc} */
public boolean isIncludeAttributeStatement(@Nullable final ProfileRequestContext profileRequestContext) {
return includeAttributeStatementPredicate.test(profileRequestContext);
}
@@ -288,13 +281,7 @@ public class BrowserSSOProfileConfiguration extends AbstractSAML1AssertionProduc
postAuthenticationFlowsLookupStrategy = Constraint.isNotNull(strategy, "Lookup strategy cannot be null");
}
- /**
- * Get the name identifier formats to use.
- *
- * @param profileRequestContext profile request context
- *
- * @return the formats to use
- */
+ /** {@inheritDoc} */
@Nonnull @NonnullElements @NotLive @Unmodifiable public List<String> getNameIDFormatPrecedence(
@Nullable final ProfileRequestContext profileRequestContext) {
final Collection<String> formats = nameIDFormatPrecedenceLookupStrategy.apply(profileRequestContext);
diff --git a/idp-testing/src/main/java/net/shibboleth/idp/saml/saml2/profile/testing/package-info.java b/idp-saml-impl/src/main/java/net/shibboleth/idp/saml/saml1/profile/config/impl/package-info.java
similarity index 88%
copy from idp-testing/src/main/java/net/shibboleth/idp/saml/saml2/profile/testing/package-info.java
copy to idp-saml-impl/src/main/java/net/shibboleth/idp/saml/saml1/profile/config/impl/package-info.java
index 31ab8d040..10f69ba0f 100644
--- a/idp-testing/src/main/java/net/shibboleth/idp/saml/saml2/profile/testing/package-info.java
+++ b/idp-saml-impl/src/main/java/net/shibboleth/idp/saml/saml1/profile/config/impl/package-info.java
@@ -16,6 +16,6 @@
*/
/**
- * Testing APIs for SAML 2 profile testing.
+ * Implementation of SAML 1.x profile configurations.
*/
-package net.shibboleth.idp.saml.saml2.profile.testing;
\ No newline at end of file
+package net.shibboleth.idp.saml.saml1.profile.config.impl;
\ No newline at end of file
diff --git a/idp-saml-api/src/main/java/net/shibboleth/idp/saml/saml2/profile/config/AbstractSAML2ArtifactAwareProfileConfiguration.java b/idp-saml-impl/src/main/java/net/shibboleth/idp/saml/saml2/profile/config/impl/AbstractSAML2ArtifactAwareProfileConfiguration.java
similarity index 98%
rename from idp-saml-api/src/main/java/net/shibboleth/idp/saml/saml2/profile/config/AbstractSAML2ArtifactAwareProfileConfiguration.java
rename to idp-saml-impl/src/main/java/net/shibboleth/idp/saml/saml2/profile/config/impl/AbstractSAML2ArtifactAwareProfileConfiguration.java
index 5ec92e0aa..e16faa699 100644
--- a/idp-saml-api/src/main/java/net/shibboleth/idp/saml/saml2/profile/config/AbstractSAML2ArtifactAwareProfileConfiguration.java
+++ b/idp-saml-impl/src/main/java/net/shibboleth/idp/saml/saml2/profile/config/impl/AbstractSAML2ArtifactAwareProfileConfiguration.java
@@ -15,7 +15,7 @@
* limitations under the License.
*/
-package net.shibboleth.idp.saml.saml2.profile.config;
+package net.shibboleth.idp.saml.saml2.profile.config.impl;
import java.util.function.Function;
import java.util.function.Predicate;
diff --git a/idp-saml-api/src/main/java/net/shibboleth/idp/saml/saml2/profile/config/AbstractSAML2AssertionProducingProfileConfiguration.java b/idp-saml-impl/src/main/java/net/shibboleth/idp/saml/saml2/profile/config/impl/AbstractSAML2AssertionProducingProfileConfiguration.java
similarity index 99%
rename from idp-saml-api/src/main/java/net/shibboleth/idp/saml/saml2/profile/config/AbstractSAML2AssertionProducingProfileConfiguration.java
rename to idp-saml-impl/src/main/java/net/shibboleth/idp/saml/saml2/profile/config/impl/AbstractSAML2AssertionProducingProfileConfiguration.java
index a79ac47f6..43b2caca8 100644
--- a/idp-saml-api/src/main/java/net/shibboleth/idp/saml/saml2/profile/config/AbstractSAML2AssertionProducingProfileConfiguration.java
+++ b/idp-saml-impl/src/main/java/net/shibboleth/idp/saml/saml2/profile/config/impl/AbstractSAML2AssertionProducingProfileConfiguration.java
@@ -15,7 +15,7 @@
* limitations under the License.
*/
-package net.shibboleth.idp.saml.saml2.profile.config;
+package net.shibboleth.idp.saml.saml2.profile.config.impl;
import java.time.Duration;
import java.util.Collection;
diff --git a/idp-saml-api/src/main/java/net/shibboleth/idp/saml/saml2/profile/config/AbstractSAML2ProfileConfiguration.java b/idp-saml-impl/src/main/java/net/shibboleth/idp/saml/saml2/profile/config/impl/AbstractSAML2ProfileConfiguration.java
similarity index 97%
rename from idp-saml-api/src/main/java/net/shibboleth/idp/saml/saml2/profile/config/AbstractSAML2ProfileConfiguration.java
rename to idp-saml-impl/src/main/java/net/shibboleth/idp/saml/saml2/profile/config/impl/AbstractSAML2ProfileConfiguration.java
index 38089a94c..ce5c40cf7 100644
--- a/idp-saml-api/src/main/java/net/shibboleth/idp/saml/saml2/profile/config/AbstractSAML2ProfileConfiguration.java
+++ b/idp-saml-impl/src/main/java/net/shibboleth/idp/saml/saml2/profile/config/impl/AbstractSAML2ProfileConfiguration.java
@@ -15,7 +15,7 @@
* limitations under the License.
*/
-package net.shibboleth.idp.saml.saml2.profile.config;
+package net.shibboleth.idp.saml.saml2.profile.config.impl;
import java.util.function.BiConsumer;
import java.util.function.Predicate;
@@ -23,7 +23,7 @@ import java.util.function.Predicate;
import javax.annotation.Nonnull;
import javax.annotation.Nullable;
-import net.shibboleth.idp.saml.profile.config.AbstractSAMLProfileConfiguration;
+import net.shibboleth.idp.saml.profile.config.impl.AbstractSAMLProfileConfiguration;
import net.shibboleth.saml.saml2.profile.config.SAML2ProfileConfiguration;
import net.shibboleth.shared.annotation.constraint.NotEmpty;
import net.shibboleth.shared.logic.Constraint;
diff --git a/idp-saml-api/src/main/java/net/shibboleth/idp/saml/saml2/profile/config/ArtifactResolutionProfileConfiguration.java b/idp-saml-impl/src/main/java/net/shibboleth/idp/saml/saml2/profile/config/impl/ArtifactResolutionProfileConfiguration.java
similarity index 98%
rename from idp-saml-api/src/main/java/net/shibboleth/idp/saml/saml2/profile/config/ArtifactResolutionProfileConfiguration.java
rename to idp-saml-impl/src/main/java/net/shibboleth/idp/saml/saml2/profile/config/impl/ArtifactResolutionProfileConfiguration.java
index ea8589c5b..ce6d13ce5 100644
--- a/idp-saml-api/src/main/java/net/shibboleth/idp/saml/saml2/profile/config/ArtifactResolutionProfileConfiguration.java
+++ b/idp-saml-impl/src/main/java/net/shibboleth/idp/saml/saml2/profile/config/impl/ArtifactResolutionProfileConfiguration.java
@@ -15,7 +15,7 @@
* limitations under the License.
*/
-package net.shibboleth.idp.saml.saml2.profile.config;
+package net.shibboleth.idp.saml.saml2.profile.config.impl;
import java.util.function.Predicate;
diff --git a/idp-saml-api/src/main/java/net/shibboleth/idp/saml/saml2/profile/config/AttributeQueryProfileConfiguration.java b/idp-saml-impl/src/main/java/net/shibboleth/idp/saml/saml2/profile/config/impl/AttributeQueryProfileConfiguration.java
similarity index 96%
rename from idp-saml-api/src/main/java/net/shibboleth/idp/saml/saml2/profile/config/AttributeQueryProfileConfiguration.java
rename to idp-saml-impl/src/main/java/net/shibboleth/idp/saml/saml2/profile/config/impl/AttributeQueryProfileConfiguration.java
index 9f06bc343..e7ab8ed7f 100644
--- a/idp-saml-api/src/main/java/net/shibboleth/idp/saml/saml2/profile/config/AttributeQueryProfileConfiguration.java
+++ b/idp-saml-impl/src/main/java/net/shibboleth/idp/saml/saml2/profile/config/impl/AttributeQueryProfileConfiguration.java
@@ -15,7 +15,7 @@
* limitations under the License.
*/
-package net.shibboleth.idp.saml.saml2.profile.config;
+package net.shibboleth.idp.saml.saml2.profile.config.impl;
import javax.annotation.Nonnull;
diff --git a/idp-saml-api/src/main/java/net/shibboleth/idp/saml/saml2/profile/config/BrowserSSOProfileConfiguration.java b/idp-saml-impl/src/main/java/net/shibboleth/idp/saml/saml2/profile/config/impl/BrowserSSOProfileConfiguration.java
similarity index 88%
copy from idp-saml-api/src/main/java/net/shibboleth/idp/saml/saml2/profile/config/BrowserSSOProfileConfiguration.java
copy to idp-saml-impl/src/main/java/net/shibboleth/idp/saml/saml2/profile/config/impl/BrowserSSOProfileConfiguration.java
index 94c532a11..7da3c0ffc 100644
--- a/idp-saml-api/src/main/java/net/shibboleth/idp/saml/saml2/profile/config/BrowserSSOProfileConfiguration.java
+++ b/idp-saml-impl/src/main/java/net/shibboleth/idp/saml/saml2/profile/config/impl/BrowserSSOProfileConfiguration.java
@@ -15,7 +15,7 @@
* limitations under the License.
*/
-package net.shibboleth.idp.saml.saml2.profile.config;
+package net.shibboleth.idp.saml.saml2.profile.config.impl;
import java.security.Principal;
import java.time.Duration;
@@ -57,10 +57,7 @@ import org.opensaml.saml.saml2.metadata.RequestedAttribute;
/** Configuration support for IdP and proxied SAML 2.0 Browser SSO. */
public class BrowserSSOProfileConfiguration extends AbstractSAML2AssertionProducingProfileConfiguration
implements AuthenticationProfileConfiguration, AttributeResolvingProfileConfiguration,
- net.shibboleth.saml.saml2.profile.config.BrowserSSOProfileConfiguration{
-
- /** Default maximum delegation chain length. */
- @Nonnull public static final Long DEFAULT_DELEGATION_CHAIN_LENGTH = 1L;
+ net.shibboleth.idp.saml.saml2.profile.config.BrowserSSOProfileConfiguration {
/** Whether attributes should be resolved in the course of the profile. */
@Nonnull private Predicate<ProfileRequestContext> resolveAttributesPredicate;
@@ -212,15 +209,7 @@ public class BrowserSSOProfileConfiguration extends AbstractSAML2AssertionProduc
resolveAttributesPredicate = Constraint.isNotNull(condition, "Resolve attributes predicate cannot be null");
}
- /**
- * Get whether responses to the authentication request should include an attribute statement.
- *
- * <p>Default is true</p>
- *
- * @param profileRequestContext current profile request context
- *
- * @return whether responses to the authentication request should include an attribute statement
- */
+ /** {@inheritDoc} */
public boolean isIncludeAttributeStatement(@Nullable final ProfileRequestContext profileRequestContext) {
return includeAttributeStatementPredicate.test(profileRequestContext);
}
@@ -245,15 +234,7 @@ public class BrowserSSOProfileConfiguration extends AbstractSAML2AssertionProduc
"Include attribute statement predicate cannot be null");
}
- /**
- * Gets whether Scoping elements in requests should be ignored/omitted.
- *
- * @param profileRequestContext current profile request context
- *
- * @return whether Scoping elements in requests should be ignored/omitted
- *
- * @since 4.0.0
- */
+ /** {@inheritDoc} */
public boolean isIgnoreScoping(@Nullable final ProfileRequestContext profileRequestContext) {
return ignoreScoping.test(profileRequestContext);
}
@@ -305,16 +286,7 @@ public class BrowserSSOProfileConfiguration extends AbstractSAML2AssertionProduc
forceAuthnPredicate = Constraint.isNotNull(condition, "Forced authentication predicate cannot be null");
}
- /**
- * Get whether the client's address must match the address in an inbound {@link SubjectLocality}
- * element during inbound SSO.
- *
- * @param profileRequestContext current profile request context
- *
- * @return whether to compare addresses
- *
- * @since 4.0.0
- */
+ /** {@inheritDoc} */
public boolean isCheckAddress(@Nullable final ProfileRequestContext profileRequestContext) {
return checkAddressPredicate.test(profileRequestContext);
}
@@ -343,15 +315,7 @@ public class BrowserSSOProfileConfiguration extends AbstractSAML2AssertionProduc
checkAddressPredicate = Constraint.isNotNull(condition, "Address checking predicate cannot be null");
}
- /**
- * Get condition to determine whether the response endpoint should be validated if the request is signed.
- *
- * @param profileRequestContext current profile request context
- *
- * @return condition
- *
- * @since 4.0.0
- */
+ /** {@inheritDoc} */
public boolean isSkipEndpointValidationWhenSigned(@Nullable final ProfileRequestContext profileRequestContext) {
return skipEndpointValidationWhenSignedPredicate.test(profileRequestContext);
}
@@ -379,13 +343,7 @@ public class BrowserSSOProfileConfiguration extends AbstractSAML2AssertionProduc
skipEndpointValidationWhenSignedPredicate = Constraint.isNotNull(condition, "Condition cannot be null");
}
- /**
- * Gets the maximum number of times an assertion may be proxied.
- *
- * @param profileRequestContext current profile request context
- *
- * @return maximum number of times an assertion may be proxied
- */
+ /** {@inheritDoc} */
@Nullable public Integer getProxyCount(@Nullable final ProfileRequestContext profileRequestContext) {
final Integer count = proxyCountLookupStrategy.apply(profileRequestContext);
if (count != null) {
@@ -415,13 +373,7 @@ public class BrowserSSOProfileConfiguration extends AbstractSAML2AssertionProduc
proxyCountLookupStrategy = Constraint.isNotNull(strategy, "Lookup strategy cannot be null");
}
- /**
- * Gets the unmodifiable collection of audiences for a proxied assertion.
- *
- * @param profileRequestContext current profile request context
- *
- * @return audiences for a proxied assertion
- */
+ /** {@inheritDoc} */
@Nonnull @NonnullElements @NotLive @Unmodifiable public Set<String> getProxyAudiences(
@Nullable final ProfileRequestContext profileRequestContext) {
final Collection<String> audiences = proxyAudiencesLookupStrategy.apply(profileRequestContext);
@@ -455,17 +407,7 @@ public class BrowserSSOProfileConfiguration extends AbstractSAML2AssertionProduc
proxyAudiencesLookupStrategy = Constraint.isNotNull(strategy, "Lookup strategy cannot be null");
}
- /**
- * Gets whether to suppress inclusion of {@link AuthenticatingAuthority} element.
- *
- * <p>Defaults to false.</p>
- *
- * @param profileRequestContext current profile request context
- *
- * @return true iff the element should be suppressed when possible
- *
- * @since 4.2.0
- */
+ /** {@inheritDoc} */
public boolean isSuppressAuthenticatingAuthority(@Nullable final ProfileRequestContext profileRequestContext) {
return suppressAuthenticatingAuthorityPredicate.test(profileRequestContext);
}
@@ -494,18 +436,7 @@ public class BrowserSSOProfileConfiguration extends AbstractSAML2AssertionProduc
suppressAuthenticatingAuthorityPredicate = Constraint.isNotNull(condition, "Condition cannot be null");
}
- /**
- * Gets whether authentication results produced by use of this profile should carry the proxied
- * assertion's AuthnInstant, rather than the current time.
- *
- * <p>Defaults to true.</p>
- *
- * @param profileRequestContext current profile request context
- *
- * @return whether to proxy across the inbound AuthnInstant
- *
- * @since 4.0.0
- */
+ /** {@inheritDoc} */
public boolean isProxiedAuthnInstant(@Nullable final ProfileRequestContext profileRequestContext) {
return proxiedAuthnInstantPredicate.test(profileRequestContext);
}
@@ -534,15 +465,7 @@ public class BrowserSSOProfileConfiguration extends AbstractSAML2AssertionProduc
proxiedAuthnInstantPredicate = Constraint.isNotNull(condition, "Condition cannot be null");
}
- /**
- * Get whether to require signed requests.
- *
- * @param profileRequestContext current profile request context
- *
- * @return whether to require signed requests
- *
- * @since 4.3.0
- */
+ /** {@inheritDoc} */
public boolean isRequireSignedRequests(@Nullable final ProfileRequestContext profileRequestContext) {
return requireSignedRequestsPredicate.test(profileRequestContext);
}
@@ -597,14 +520,7 @@ public class BrowserSSOProfileConfiguration extends AbstractSAML2AssertionProduc
"Signed assertions predicate cannot be null");
}
- /**
- * Get the maximum amount of time the service provider should maintain a session for the user
- * based on the authentication assertion. A null or 0 is interpreted as an unlimited lifetime.
- *
- * @param profileRequestContext current profile request context
- *
- * @return max lifetime of service provider should maintain a session
- */
+ /** {@inheritDoc} */
@Nullable public Duration getMaximumSPSessionLifetime(@Nullable final ProfileRequestContext profileRequestContext) {
final Duration lifetime = maximumSPSessionLifetimeLookupStrategy.apply(profileRequestContext);
Constraint.isFalse(lifetime != null && lifetime.isNegative(),
@@ -637,17 +553,7 @@ public class BrowserSSOProfileConfiguration extends AbstractSAML2AssertionProduc
maximumSPSessionLifetimeLookupStrategy = Constraint.isNotNull(strategy, "Lookup strategy cannot be null");
}
- /**
- * Get the maximum amount of time allowed to have elapsed since an incoming AuthnInstant.
- *
- * <p>A null or 0 is interpreted as an unlimited amount.</p>
- *
- * @param profileRequestContext current profile request context
- *
- * @return max time since inbound AuthnInstant
- *
- * @since 4.0.0
- */
+ /** {@inheritDoc} */
@NonNegative @Nullable public Duration getMaximumTimeSinceAuthn(
@Nullable final ProfileRequestContext profileRequestContext) {
final Duration amount = maximumTimeSinceAuthnLookupStrategy.apply(profileRequestContext);
@@ -684,15 +590,7 @@ public class BrowserSSOProfileConfiguration extends AbstractSAML2AssertionProduc
maximumTimeSinceAuthnLookupStrategy = Constraint.isNotNull(strategy, "Lookup strategy cannot be null");
}
- /**
- * Get the predicate used to determine if produced assertions may be delegated.
- *
- * @param profileRequestContext current profile request context
- *
- * @return predicate used to determine if produced assertions may be delegated
- *
- * @deprecated
- */
+ /** {@inheritDoc} */
@Deprecated(since="5.0.0", forRemoval=true)
public boolean isAllowDelegation(@Nullable final ProfileRequestContext profileRequestContext) {
return allowDelegationPredicate.test(profileRequestContext);
@@ -725,15 +623,7 @@ public class BrowserSSOProfileConfiguration extends AbstractSAML2AssertionProduc
allowDelegationPredicate = Constraint.isNotNull(predicate, "Allow delegation predicate cannot be null");
}
- /**
- * Get the limits on the total number of delegates that may be derived from the initial SAML token.
- *
- * @param profileRequestContext current profile request context
- *
- * @return the limit on the total number of delegates that may be derived from the initial SAML token
- *
- * @deprecated
- */
+ /** {@inheritDoc} */
@Deprecated(since="5.0.0", forRemoval=true)
@NonNegative public long getMaximumTokenDelegationChainLength(
@Nullable final ProfileRequestContext profileRequestContext) {
@@ -780,16 +670,7 @@ public class BrowserSSOProfileConfiguration extends AbstractSAML2AssertionProduc
Constraint.isNotNull(strategy, "Lookup strategy cannot be null");
}
- /**
- * Get the function to use to translate an inbound proxied SAML 2.0 {@link AuthnContext} into the appropriate
- * set of custom {@link Principal} objects to populate into the subject.
- *
- * @param profileRequestContext current profile request context
- *
- * @return translation function
- *
- * @since 4.0.0
- */
+ /** {@inheritDoc} */
@Nullable public Function<AuthnContext,Collection<Principal>> getAuthnContextTranslationStrategy(
@Nullable final ProfileRequestContext profileRequestContext) {
return authnContextTranslationStrategyLookupStrategy.apply(profileRequestContext);
@@ -822,19 +703,7 @@ public class BrowserSSOProfileConfiguration extends AbstractSAML2AssertionProduc
Constraint.isNotNull(strategy, "Lookup strategy cannot be null");
}
- /**
- * Get the function to use to translate an inbound proxied response into the appropriate
- * set of custom {@link Principal} objects to populate into the subject.
- *
- * <p>This differs from the original in that the input is the entire {@link ProfileRequestContext}
- * of the proxied authentication state rather than the SAML {@link AuthnContext} directly.</p>
- *
- * @param profileRequestContext current profile request context
- *
- * @return translation function
- *
- * @since 4.1.0
- */
+ /** {@inheritDoc} */
@Nullable public Function<ProfileRequestContext,Collection<Principal>> getAuthnContextTranslationStrategyEx(
@Nullable final ProfileRequestContext profileRequestContext) {
return authnContextTranslationStrategyExLookupStrategy.apply(profileRequestContext);
@@ -874,15 +743,7 @@ public class BrowserSSOProfileConfiguration extends AbstractSAML2AssertionProduc
Constraint.isNotNull(strategy, "Lookup strategy cannot be null");
}
- /**
- * Get the comparison operator to use when issuing SAML requests containing requested context classes.
- *
- * @param profileRequestContext profile request context
- *
- * @return comparison value or null
- *
- * @since 4.0.0
- */
+ /** {@inheritDoc} */
@Nullable public AuthnContextComparisonTypeEnumeration getAuthnContextComparison(
@Nullable final ProfileRequestContext profileRequestContext) {
@@ -1029,13 +890,7 @@ public class BrowserSSOProfileConfiguration extends AbstractSAML2AssertionProduc
postAuthenticationFlowsLookupStrategy = Constraint.isNotNull(strategy, "Lookup strategy cannot be null");
}
- /**
- * Get the name identifier formats to use.
- *
- * @param profileRequestContext profile request context
- *
- * @return formats to use
- */
+ /** {@inheritDoc} */
@Nonnull @NonnullElements @NotLive @Unmodifiable public List<String> getNameIDFormatPrecedence(
@Nullable final ProfileRequestContext profileRequestContext) {
diff --git a/idp-saml-api/src/main/java/net/shibboleth/idp/saml/saml2/profile/config/ECPProfileConfiguration.java b/idp-saml-impl/src/main/java/net/shibboleth/idp/saml/saml2/profile/config/impl/ECPProfileConfiguration.java
similarity index 98%
copy from idp-saml-api/src/main/java/net/shibboleth/idp/saml/saml2/profile/config/ECPProfileConfiguration.java
copy to idp-saml-impl/src/main/java/net/shibboleth/idp/saml/saml2/profile/config/impl/ECPProfileConfiguration.java
index cd43a67f3..3e5307cf2 100644
--- a/idp-saml-api/src/main/java/net/shibboleth/idp/saml/saml2/profile/config/ECPProfileConfiguration.java
+++ b/idp-saml-impl/src/main/java/net/shibboleth/idp/saml/saml2/profile/config/impl/ECPProfileConfiguration.java
@@ -15,7 +15,7 @@
* limitations under the License.
*/
-package net.shibboleth.idp.saml.saml2.profile.config;
+package net.shibboleth.idp.saml.saml2.profile.config.impl;
import java.util.Collection;
import java.util.Set;
diff --git a/idp-saml-api/src/main/java/net/shibboleth/idp/saml/idwsf/profile/config/SSOSProfileConfiguration.java b/idp-saml-impl/src/main/java/net/shibboleth/idp/saml/saml2/profile/config/impl/SSOSProfileConfiguration.java
similarity index 96%
rename from idp-saml-api/src/main/java/net/shibboleth/idp/saml/idwsf/profile/config/SSOSProfileConfiguration.java
rename to idp-saml-impl/src/main/java/net/shibboleth/idp/saml/saml2/profile/config/impl/SSOSProfileConfiguration.java
index 8e86a2d21..2fd0ddbb8 100644
--- a/idp-saml-api/src/main/java/net/shibboleth/idp/saml/idwsf/profile/config/SSOSProfileConfiguration.java
+++ b/idp-saml-impl/src/main/java/net/shibboleth/idp/saml/saml2/profile/config/impl/SSOSProfileConfiguration.java
@@ -15,14 +15,13 @@
* limitations under the License.
*/
-package net.shibboleth.idp.saml.idwsf.profile.config;
+package net.shibboleth.idp.saml.saml2.profile.config.impl;
import java.util.function.Predicate;
import javax.annotation.Nonnull;
import javax.annotation.Nullable;
-import net.shibboleth.idp.saml.saml2.profile.config.BrowserSSOProfileConfiguration;
import net.shibboleth.shared.annotation.constraint.NotEmpty;
import net.shibboleth.shared.logic.Constraint;
import net.shibboleth.shared.logic.PredicateSupport;
diff --git a/idp-saml-api/src/main/java/net/shibboleth/idp/saml/saml2/profile/config/SingleLogoutProfileConfiguration.java b/idp-saml-impl/src/main/java/net/shibboleth/idp/saml/saml2/profile/config/impl/SingleLogoutProfileConfiguration.java
similarity index 99%
rename from idp-saml-api/src/main/java/net/shibboleth/idp/saml/saml2/profile/config/SingleLogoutProfileConfiguration.java
rename to idp-saml-impl/src/main/java/net/shibboleth/idp/saml/saml2/profile/config/impl/SingleLogoutProfileConfiguration.java
index 890a40126..7c61289c9 100644
--- a/idp-saml-api/src/main/java/net/shibboleth/idp/saml/saml2/profile/config/SingleLogoutProfileConfiguration.java
+++ b/idp-saml-impl/src/main/java/net/shibboleth/idp/saml/saml2/profile/config/impl/SingleLogoutProfileConfiguration.java
@@ -15,7 +15,7 @@
* limitations under the License.
*/
-package net.shibboleth.idp.saml.saml2.profile.config;
+package net.shibboleth.idp.saml.saml2.profile.config.impl;
import java.util.Collection;
import java.util.List;
diff --git a/idp-testing/src/main/java/net/shibboleth/idp/saml/saml1/profile/testing/package-info.java b/idp-saml-impl/src/main/java/net/shibboleth/idp/saml/saml2/profile/config/impl/package-info.java
similarity index 88%
rename from idp-testing/src/main/java/net/shibboleth/idp/saml/saml1/profile/testing/package-info.java
rename to idp-saml-impl/src/main/java/net/shibboleth/idp/saml/saml2/profile/config/impl/package-info.java
index 1d22f977b..25eae9650 100644
--- a/idp-testing/src/main/java/net/shibboleth/idp/saml/saml1/profile/testing/package-info.java
+++ b/idp-saml-impl/src/main/java/net/shibboleth/idp/saml/saml2/profile/config/impl/package-info.java
@@ -16,6 +16,6 @@
*/
/**
- * Testing APIs for SAML 1 profile testing.
+ * Implementatio of SAML 2.0 profile configurations.
*/
-package net.shibboleth.idp.saml.saml1.profile.testing;
\ No newline at end of file
+package net.shibboleth.idp.saml.saml2.profile.config.impl;
\ No newline at end of file
diff --git a/idp-saml-impl/src/main/java/net/shibboleth/idp/saml/saml2/profile/impl/PopulateEncryptionParameters.java b/idp-saml-impl/src/main/java/net/shibboleth/idp/saml/saml2/profile/impl/PopulateEncryptionParameters.java
index 8a220f974..ed6f5c301 100644
--- a/idp-saml-impl/src/main/java/net/shibboleth/idp/saml/saml2/profile/impl/PopulateEncryptionParameters.java
+++ b/idp-saml-impl/src/main/java/net/shibboleth/idp/saml/saml2/profile/impl/PopulateEncryptionParameters.java
@@ -50,11 +50,11 @@ import net.shibboleth.shared.primitive.LoggerFactory;
import net.shibboleth.idp.profile.AbstractProfileAction;
import net.shibboleth.idp.profile.IdPEventIds;
-import net.shibboleth.idp.saml.saml2.profile.config.SingleLogoutProfileConfiguration;
import net.shibboleth.profile.context.RelyingPartyContext;
import net.shibboleth.saml.saml2.profile.config.ArtifactResolutionProfileConfiguration;
import net.shibboleth.saml.saml2.profile.config.SAML2AssertionProducingProfileConfiguration;
import net.shibboleth.saml.saml2.profile.config.SAML2ProfileConfiguration;
+import net.shibboleth.saml.saml2.profile.config.SingleLogoutProfileConfiguration;
import net.shibboleth.shared.annotation.constraint.NonnullAfterInit;
import net.shibboleth.shared.annotation.constraint.NonnullElements;
import net.shibboleth.shared.component.ComponentInitializationException;
diff --git a/idp-authn-impl/src/test/java/net/shibboleth/idp/authn/impl/FinalizeAuthenticationTest.java b/idp-saml-impl/src/test/java/net/shibboleth/idp/authn/impl/tests/FinalizeAuthenticationTest.java
similarity index 86%
rename from idp-authn-impl/src/test/java/net/shibboleth/idp/authn/impl/FinalizeAuthenticationTest.java
rename to idp-saml-impl/src/test/java/net/shibboleth/idp/authn/impl/tests/FinalizeAuthenticationTest.java
index bea1fdb8d..a4a9d5676 100644
--- a/idp-authn-impl/src/test/java/net/shibboleth/idp/authn/impl/FinalizeAuthenticationTest.java
+++ b/idp-saml-impl/src/test/java/net/shibboleth/idp/authn/impl/tests/FinalizeAuthenticationTest.java
@@ -15,43 +15,76 @@
* limitations under the License.
*/
-package net.shibboleth.idp.authn.impl;
+package net.shibboleth.idp.authn.impl.tests;
import java.util.Arrays;
import java.util.Collections;
+import java.util.List;
import javax.security.auth.Subject;
import net.shibboleth.idp.admin.BasicAdministrativeFlowDescriptor;
+import net.shibboleth.idp.authn.AuthenticationFlowDescriptor;
import net.shibboleth.idp.authn.AuthenticationResult;
import net.shibboleth.idp.authn.AuthnEventIds;
import net.shibboleth.idp.authn.context.AuthenticationContext;
import net.shibboleth.idp.authn.context.RequestedPrincipalContext;
import net.shibboleth.idp.authn.context.SubjectCanonicalizationContext;
import net.shibboleth.idp.authn.context.SubjectContext;
-import net.shibboleth.idp.authn.impl.testing.BaseAuthenticationContextTest;
+import net.shibboleth.idp.authn.impl.FinalizeAuthentication;
+import net.shibboleth.idp.authn.impl.PopulateAuthenticationContext;
import net.shibboleth.idp.authn.principal.ProxyAuthenticationPrincipal;
import net.shibboleth.idp.authn.principal.impl.ExactPrincipalEvalPredicateFactory;
import net.shibboleth.idp.authn.testing.TestPrincipal;
+import net.shibboleth.idp.profile.context.navigate.WebflowRequestContextProfileRequestContextLookup;
import net.shibboleth.idp.profile.testing.ActionTestingSupport;
-import net.shibboleth.idp.saml.saml2.profile.config.BrowserSSOProfileConfiguration;
+import net.shibboleth.idp.profile.testing.RequestContextBuilder;
+import net.shibboleth.idp.saml.saml2.profile.config.impl.BrowserSSOProfileConfiguration;
import net.shibboleth.profile.context.RelyingPartyContext;
import net.shibboleth.shared.component.ComponentInitializationException;
+import net.shibboleth.shared.logic.FunctionSupport;
+import org.opensaml.core.testing.OpenSAMLInitBaseTestCase;
+import org.opensaml.profile.context.ProfileRequestContext;
import org.springframework.webflow.execution.Event;
+import org.springframework.webflow.execution.RequestContext;
import org.testng.Assert;
import org.testng.annotations.BeforeMethod;
import org.testng.annotations.Test;
/** {@link FinalizeAuthentication} unit test. */
@SuppressWarnings("javadoc")
-public class FinalizeAuthenticationTest extends BaseAuthenticationContextTest {
-
+public class FinalizeAuthenticationTest extends OpenSAMLInitBaseTestCase {
+
+ protected RequestContext src;
+ protected ProfileRequestContext prc;
+ protected List<AuthenticationFlowDescriptor> authenticationFlows;
+
private FinalizeAuthentication action;
-
- @BeforeMethod public void setUp() throws ComponentInitializationException {
- super.setUp();
+
+ protected void initializeMembers() throws ComponentInitializationException {
+ src = new RequestContextBuilder().buildRequestContext();
+ prc = new WebflowRequestContextProfileRequestContextLookup().apply(src);
+ prc.addSubcontext(new AuthenticationContext(), true);
+
+ authenticationFlows = List.of(new AuthenticationFlowDescriptor(),
+ new AuthenticationFlowDescriptor(), new AuthenticationFlowDescriptor());
+ authenticationFlows.get(0).setId("test1");
+ authenticationFlows.get(1).setId("test2");
+ authenticationFlows.get(1).setPassiveAuthenticationSupported(true);
+ authenticationFlows.get(2).setId("test3");
+ }
+
+ @BeforeMethod protected void setUp() throws ComponentInitializationException {
+ initializeMembers();
+ final PopulateAuthenticationContext bootstrap = new PopulateAuthenticationContext();
+ bootstrap.setAvailableFlows(authenticationFlows);
+ bootstrap.setPotentialFlowsLookupStrategy(FunctionSupport.constant(authenticationFlows));
+ bootstrap.initialize();
+
+ bootstrap.execute(src);
+
prc.getSubcontext(RelyingPartyContext.class).setProfileConfig(new BrowserSSOProfileConfiguration());
action = new FinalizeAuthentication();
diff --git a/idp-testing/src/main/java/net/shibboleth/idp/saml/saml2/profile/testing/package-info.java b/idp-saml-impl/src/test/java/net/shibboleth/idp/authn/impl/tests/package-info.java
similarity index 87%
rename from idp-testing/src/main/java/net/shibboleth/idp/saml/saml2/profile/testing/package-info.java
rename to idp-saml-impl/src/test/java/net/shibboleth/idp/authn/impl/tests/package-info.java
index 31ab8d040..a35c4486c 100644
--- a/idp-testing/src/main/java/net/shibboleth/idp/saml/saml2/profile/testing/package-info.java
+++ b/idp-saml-impl/src/test/java/net/shibboleth/idp/authn/impl/tests/package-info.java
@@ -16,6 +16,6 @@
*/
/**
- * Testing APIs for SAML 2 profile testing.
+ * Tests of authentication actions that require access to SAML impl classes.
*/
-package net.shibboleth.idp.saml.saml2.profile.testing;
\ No newline at end of file
+package net.shibboleth.idp.authn.impl.tests;
\ No newline at end of file
diff --git a/idp-saml-api/src/main/java/net/shibboleth/idp/saml/idwsf/profile/config/package-info.java b/idp-saml-impl/src/test/java/net/shibboleth/idp/profile/impl/tests/package-info.java
similarity index 87%
rename from idp-saml-api/src/main/java/net/shibboleth/idp/saml/idwsf/profile/config/package-info.java
rename to idp-saml-impl/src/test/java/net/shibboleth/idp/profile/impl/tests/package-info.java
index 8c37dd0c7..6c322d6ca 100644
--- a/idp-saml-api/src/main/java/net/shibboleth/idp/saml/idwsf/profile/config/package-info.java
+++ b/idp-saml-impl/src/test/java/net/shibboleth/idp/profile/impl/tests/package-info.java
@@ -15,6 +15,7 @@
* limitations under the License.
*/
-/** Profile configurations for Liberty ID-WSF profiles. */
-
-package net.shibboleth.idp.saml.idwsf.profile.config;
\ No newline at end of file
+/**
+ * Tests of profile actions that require access to SAML impl classes.
+ */
+package net.shibboleth.idp.profile.impl.tests;
\ No newline at end of file
diff --git a/idp-saml-api/src/test/java/net/shibboleth/idp/saml/profile/config/AbstractSAMLProfileConfigurationTest.java b/idp-saml-impl/src/test/java/net/shibboleth/idp/saml/profile/config/impl/AbstractSAMLProfileConfigurationTest.java
similarity index 92%
rename from idp-saml-api/src/test/java/net/shibboleth/idp/saml/profile/config/AbstractSAMLProfileConfigurationTest.java
rename to idp-saml-impl/src/test/java/net/shibboleth/idp/saml/profile/config/impl/AbstractSAMLProfileConfigurationTest.java
index 4fddfabe3..47cdebd9b 100644
--- a/idp-saml-api/src/test/java/net/shibboleth/idp/saml/profile/config/AbstractSAMLProfileConfigurationTest.java
+++ b/idp-saml-impl/src/test/java/net/shibboleth/idp/saml/profile/config/impl/AbstractSAMLProfileConfigurationTest.java
@@ -15,11 +15,13 @@
* limitations under the License.
*/
-package net.shibboleth.idp.saml.profile.config;
+package net.shibboleth.idp.saml.profile.config.impl;
import org.testng.Assert;
import org.testng.annotations.Test;
+import net.shibboleth.idp.saml.profile.config.impl.AbstractSAMLProfileConfiguration;
+
/** Unit test for {@link AbstractSAMLProfileConfiguration}. */
@SuppressWarnings("javadoc")
public class AbstractSAMLProfileConfigurationTest {
diff --git a/idp-saml-impl/src/test/java/net/shibboleth/idp/saml/profile/context/navigate/tests/DefaultNameIdentifierFormatStrategyTest.java b/idp-saml-impl/src/test/java/net/shibboleth/idp/saml/profile/context/navigate/tests/DefaultNameIdentifierFormatStrategyTest.java
index d05a8020a..cf02e70d0 100644
--- a/idp-saml-impl/src/test/java/net/shibboleth/idp/saml/profile/context/navigate/tests/DefaultNameIdentifierFormatStrategyTest.java
+++ b/idp-saml-impl/src/test/java/net/shibboleth/idp/saml/profile/context/navigate/tests/DefaultNameIdentifierFormatStrategyTest.java
@@ -22,7 +22,7 @@ import java.util.List;
import net.shibboleth.idp.profile.testing.RequestContextBuilder;
import net.shibboleth.idp.saml.profile.context.navigate.DefaultNameIdentifierFormatStrategy;
-import net.shibboleth.idp.saml.saml2.profile.config.BrowserSSOProfileConfiguration;
+import net.shibboleth.idp.saml.saml2.profile.config.impl.BrowserSSOProfileConfiguration;
import net.shibboleth.shared.collection.CollectionSupport;
import net.shibboleth.shared.component.ComponentInitializationException;
diff --git a/idp-saml-impl/src/test/java/net/shibboleth/idp/saml/profile/impl/InitializeAuthenticationContextTest.java b/idp-saml-impl/src/test/java/net/shibboleth/idp/saml/profile/impl/InitializeAuthenticationContextTest.java
index a46e237aa..fd057d3ac 100644
--- a/idp-saml-impl/src/test/java/net/shibboleth/idp/saml/profile/impl/InitializeAuthenticationContextTest.java
+++ b/idp-saml-impl/src/test/java/net/shibboleth/idp/saml/profile/impl/InitializeAuthenticationContextTest.java
@@ -21,7 +21,7 @@ import net.shibboleth.idp.authn.context.AuthenticationContext;
import net.shibboleth.idp.profile.context.navigate.WebflowRequestContextProfileRequestContextLookup;
import net.shibboleth.idp.profile.testing.ActionTestingSupport;
import net.shibboleth.idp.profile.testing.RequestContextBuilder;
-import net.shibboleth.idp.saml.saml2.profile.config.BrowserSSOProfileConfiguration;
+import net.shibboleth.idp.saml.saml2.profile.config.impl.BrowserSSOProfileConfiguration;
import net.shibboleth.profile.context.RelyingPartyContext;
import net.shibboleth.shared.collection.CollectionSupport;
import net.shibboleth.shared.component.ComponentInitializationException;
diff --git a/idp-saml-impl/src/test/java/net/shibboleth/idp/saml/profile/impl/PopulateBindingAndEndpointContextsTest.java b/idp-saml-impl/src/test/java/net/shibboleth/idp/saml/profile/impl/PopulateBindingAndEndpointContextsTest.java
index 53e284d78..c42cc5064 100644
--- a/idp-saml-impl/src/test/java/net/shibboleth/idp/saml/profile/impl/PopulateBindingAndEndpointContextsTest.java
+++ b/idp-saml-impl/src/test/java/net/shibboleth/idp/saml/profile/impl/PopulateBindingAndEndpointContextsTest.java
@@ -33,7 +33,7 @@ import net.shibboleth.profile.context.RelyingPartyContext;
import net.shibboleth.idp.profile.context.navigate.WebflowRequestContextProfileRequestContextLookup;
import net.shibboleth.idp.profile.testing.ActionTestingSupport;
import net.shibboleth.idp.profile.testing.RequestContextBuilder;
-import net.shibboleth.idp.saml.saml2.profile.config.BrowserSSOProfileConfiguration;
+import net.shibboleth.idp.saml.saml2.profile.config.impl.BrowserSSOProfileConfiguration;
import net.shibboleth.shared.annotation.constraint.NotEmpty;
import net.shibboleth.shared.component.ComponentInitializationException;
import net.shibboleth.shared.logic.FunctionSupport;
diff --git a/idp-saml-api/src/test/java/net/shibboleth/idp/saml/saml1/profile/config/ArtifactResolutionProfileConfigurationTest.java b/idp-saml-impl/src/test/java/net/shibboleth/idp/saml/saml1/profile/config/impl/ArtifactResolutionProfileConfigurationTest.java
similarity index 96%
rename from idp-saml-api/src/test/java/net/shibboleth/idp/saml/saml1/profile/config/ArtifactResolutionProfileConfigurationTest.java
rename to idp-saml-impl/src/test/java/net/shibboleth/idp/saml/saml1/profile/config/impl/ArtifactResolutionProfileConfigurationTest.java
index c40cef173..5efec053e 100644
--- a/idp-saml-api/src/test/java/net/shibboleth/idp/saml/saml1/profile/config/ArtifactResolutionProfileConfigurationTest.java
+++ b/idp-saml-impl/src/test/java/net/shibboleth/idp/saml/saml1/profile/config/impl/ArtifactResolutionProfileConfigurationTest.java
@@ -15,8 +15,7 @@
* limitations under the License.
*/
-package net.shibboleth.idp.saml.saml1.profile.config;
-
+package net.shibboleth.idp.saml.saml1.profile.config.impl;
import org.testng.Assert;
import org.testng.annotations.Test;
diff --git a/idp-saml-api/src/test/java/net/shibboleth/idp/saml/saml1/profile/config/AttributeQueryProfileConfigurationTest.java b/idp-saml-impl/src/test/java/net/shibboleth/idp/saml/saml1/profile/config/impl/AttributeQueryProfileConfigurationTest.java
similarity index 97%
rename from idp-saml-api/src/test/java/net/shibboleth/idp/saml/saml1/profile/config/AttributeQueryProfileConfigurationTest.java
rename to idp-saml-impl/src/test/java/net/shibboleth/idp/saml/saml1/profile/config/impl/AttributeQueryProfileConfigurationTest.java
index a5c7a024b..7ab86451b 100644
--- a/idp-saml-api/src/test/java/net/shibboleth/idp/saml/saml1/profile/config/AttributeQueryProfileConfigurationTest.java
+++ b/idp-saml-impl/src/test/java/net/shibboleth/idp/saml/saml1/profile/config/impl/AttributeQueryProfileConfigurationTest.java
@@ -15,7 +15,7 @@
* limitations under the License.
*/
-package net.shibboleth.idp.saml.saml1.profile.config;
+package net.shibboleth.idp.saml.saml1.profile.config.impl;
import net.shibboleth.saml.profile.config.BasicSAMLArtifactConfiguration;
import net.shibboleth.saml.profile.config.SAMLArtifactConfiguration;
diff --git a/idp-saml-api/src/test/java/net/shibboleth/idp/saml/saml1/profile/config/BrowserSSOProfileConfigurationTest.java b/idp-saml-impl/src/test/java/net/shibboleth/idp/saml/saml1/profile/config/impl/BrowserSSOProfileConfigurationTest.java
similarity index 99%
rename from idp-saml-api/src/test/java/net/shibboleth/idp/saml/saml1/profile/config/BrowserSSOProfileConfigurationTest.java
rename to idp-saml-impl/src/test/java/net/shibboleth/idp/saml/saml1/profile/config/impl/BrowserSSOProfileConfigurationTest.java
index 2a6e53dbf..66df2d47a 100644
--- a/idp-saml-api/src/test/java/net/shibboleth/idp/saml/saml1/profile/config/BrowserSSOProfileConfigurationTest.java
+++ b/idp-saml-impl/src/test/java/net/shibboleth/idp/saml/saml1/profile/config/impl/BrowserSSOProfileConfigurationTest.java
@@ -15,7 +15,7 @@
* limitations under the License.
*/
-package net.shibboleth.idp.saml.saml1.profile.config;
+package net.shibboleth.idp.saml.saml1.profile.config.impl;
import net.shibboleth.idp.saml.authn.principal.AuthenticationMethodPrincipal;
import net.shibboleth.saml.profile.config.BasicSAMLArtifactConfiguration;
diff --git a/idp-saml-impl/src/test/java/net/shibboleth/idp/saml/saml1/profile/impl/AddAttributeStatementToAssertionTest.java b/idp-saml-impl/src/test/java/net/shibboleth/idp/saml/saml1/profile/impl/AddAttributeStatementToAssertionTest.java
index c03d9a9ba..bb48a819d 100644
--- a/idp-saml-impl/src/test/java/net/shibboleth/idp/saml/saml1/profile/impl/AddAttributeStatementToAssertionTest.java
+++ b/idp-saml-impl/src/test/java/net/shibboleth/idp/saml/saml1/profile/impl/AddAttributeStatementToAssertionTest.java
@@ -56,7 +56,6 @@ import net.shibboleth.idp.profile.testing.RequestContextBuilder;
import net.shibboleth.idp.saml.attribute.transcoding.AbstractSAML1AttributeTranscoder;
import net.shibboleth.idp.saml.attribute.transcoding.SAML1AttributeTranscoder;
import net.shibboleth.idp.saml.attribute.transcoding.impl.SAML1StringAttributeTranscoder;
-import net.shibboleth.idp.saml.saml1.profile.testing.SAML1ActionTestingSupport;
import net.shibboleth.profile.context.RelyingPartyContext;
import net.shibboleth.shared.component.ComponentInitializationException;
import net.shibboleth.shared.testing.MockApplicationContext;
diff --git a/idp-saml-impl/src/test/java/net/shibboleth/idp/saml/saml1/profile/impl/AddAuthenticationStatementToAssertionTest.java b/idp-saml-impl/src/test/java/net/shibboleth/idp/saml/saml1/profile/impl/AddAuthenticationStatementToAssertionTest.java
index 1e4cf26b1..662feef05 100644
--- a/idp-saml-impl/src/test/java/net/shibboleth/idp/saml/saml1/profile/impl/AddAuthenticationStatementToAssertionTest.java
+++ b/idp-saml-impl/src/test/java/net/shibboleth/idp/saml/saml1/profile/impl/AddAuthenticationStatementToAssertionTest.java
@@ -45,7 +45,6 @@ import net.shibboleth.idp.profile.context.navigate.WebflowRequestContextProfileR
import net.shibboleth.idp.profile.testing.ActionTestingSupport;
import net.shibboleth.idp.profile.testing.RequestContextBuilder;
import net.shibboleth.idp.saml.authn.principal.AuthenticationMethodPrincipal;
-import net.shibboleth.idp.saml.saml1.profile.testing.SAML1ActionTestingSupport;
import net.shibboleth.profile.context.RelyingPartyContext;
import net.shibboleth.shared.component.ComponentInitializationException;
import net.shibboleth.shared.testing.ConstantSupplier;
diff --git a/idp-testing/src/test/java/net/shibboleth/idp/saml/saml1/profile/testing/SAML1ActionSupportTest.java b/idp-saml-impl/src/test/java/net/shibboleth/idp/saml/saml1/profile/impl/SAML1ActionSupportTest.java
similarity index 98%
rename from idp-testing/src/test/java/net/shibboleth/idp/saml/saml1/profile/testing/SAML1ActionSupportTest.java
rename to idp-saml-impl/src/test/java/net/shibboleth/idp/saml/saml1/profile/impl/SAML1ActionSupportTest.java
index c86589e9a..8ace51d27 100644
--- a/idp-testing/src/test/java/net/shibboleth/idp/saml/saml1/profile/testing/SAML1ActionSupportTest.java
+++ b/idp-saml-impl/src/test/java/net/shibboleth/idp/saml/saml1/profile/impl/SAML1ActionSupportTest.java
@@ -15,7 +15,7 @@
* limitations under the License.
*/
-package net.shibboleth.idp.saml.saml1.profile.testing;
+package net.shibboleth.idp.saml.saml1.profile.impl;
import net.shibboleth.idp.profile.testing.RequestContextBuilder;
import net.shibboleth.idp.saml.profile.testing.ActionTestSupportAction;
diff --git a/idp-testing/src/main/java/net/shibboleth/idp/saml/saml1/profile/testing/SAML1ActionTestingSupport.java b/idp-saml-impl/src/test/java/net/shibboleth/idp/saml/saml1/profile/impl/SAML1ActionTestingSupport.java
similarity index 93%
rename from idp-testing/src/main/java/net/shibboleth/idp/saml/saml1/profile/testing/SAML1ActionTestingSupport.java
rename to idp-saml-impl/src/test/java/net/shibboleth/idp/saml/saml1/profile/impl/SAML1ActionTestingSupport.java
index cbdb5d907..c69ecea95 100644
--- a/idp-testing/src/main/java/net/shibboleth/idp/saml/saml1/profile/testing/SAML1ActionTestingSupport.java
+++ b/idp-saml-impl/src/test/java/net/shibboleth/idp/saml/saml1/profile/impl/SAML1ActionTestingSupport.java
@@ -15,7 +15,7 @@
* limitations under the License.
*/
-package net.shibboleth.idp.saml.saml1.profile.testing;
+package net.shibboleth.idp.saml.saml1.profile.impl;
import java.util.ArrayList;
import java.util.Collection;
@@ -27,9 +27,9 @@ import net.shibboleth.profile.config.ProfileConfiguration;
import net.shibboleth.profile.context.RelyingPartyContext;
import net.shibboleth.idp.profile.relyingparty.RelyingPartyConfiguration;
import net.shibboleth.idp.profile.testing.ActionTestingSupport;
-import net.shibboleth.idp.saml.saml1.profile.config.ArtifactResolutionProfileConfiguration;
-import net.shibboleth.idp.saml.saml1.profile.config.AttributeQueryProfileConfiguration;
-import net.shibboleth.idp.saml.saml1.profile.config.BrowserSSOProfileConfiguration;
+import net.shibboleth.idp.saml.saml1.profile.config.impl.ArtifactResolutionProfileConfiguration;
+import net.shibboleth.idp.saml.saml1.profile.config.impl.AttributeQueryProfileConfiguration;
+import net.shibboleth.idp.saml.saml1.profile.config.impl.BrowserSSOProfileConfiguration;
import net.shibboleth.shared.component.ComponentInitializationException;
import net.shibboleth.shared.primitive.StringSupport;
diff --git a/idp-saml-api/src/test/java/net/shibboleth/idp/saml/saml2/profile/config/AbstractSAML2ProfileConfigurationTest.java b/idp-saml-impl/src/test/java/net/shibboleth/idp/saml/saml2/profile/config/impl/AbstractSAML2ProfileConfigurationTest.java
similarity index 97%
rename from idp-saml-api/src/test/java/net/shibboleth/idp/saml/saml2/profile/config/AbstractSAML2ProfileConfigurationTest.java
rename to idp-saml-impl/src/test/java/net/shibboleth/idp/saml/saml2/profile/config/impl/AbstractSAML2ProfileConfigurationTest.java
index 0da2852c2..16f68ad74 100644
--- a/idp-saml-api/src/test/java/net/shibboleth/idp/saml/saml2/profile/config/AbstractSAML2ProfileConfigurationTest.java
+++ b/idp-saml-impl/src/test/java/net/shibboleth/idp/saml/saml2/profile/config/impl/AbstractSAML2ProfileConfigurationTest.java
@@ -15,7 +15,7 @@
* limitations under the License.
*/
-package net.shibboleth.idp.saml.saml2.profile.config;
+package net.shibboleth.idp.saml.saml2.profile.config.impl;
import net.shibboleth.shared.logic.PredicateSupport;
diff --git a/idp-saml-api/src/test/java/net/shibboleth/idp/saml/saml2/profile/config/ArtifactResolutionProfileConfigurationTest.java b/idp-saml-impl/src/test/java/net/shibboleth/idp/saml/saml2/profile/config/impl/ArtifactResolutionProfileConfigurationTest.java
similarity index 97%
rename from idp-saml-api/src/test/java/net/shibboleth/idp/saml/saml2/profile/config/ArtifactResolutionProfileConfigurationTest.java
rename to idp-saml-impl/src/test/java/net/shibboleth/idp/saml/saml2/profile/config/impl/ArtifactResolutionProfileConfigurationTest.java
index cfc093f00..16df74ba4 100644
--- a/idp-saml-api/src/test/java/net/shibboleth/idp/saml/saml2/profile/config/ArtifactResolutionProfileConfigurationTest.java
+++ b/idp-saml-impl/src/test/java/net/shibboleth/idp/saml/saml2/profile/config/impl/ArtifactResolutionProfileConfigurationTest.java
@@ -15,7 +15,7 @@
* limitations under the License.
*/
-package net.shibboleth.idp.saml.saml2.profile.config;
+package net.shibboleth.idp.saml.saml2.profile.config.impl;
import org.testng.Assert;
import org.testng.annotations.Test;
diff --git a/idp-saml-api/src/test/java/net/shibboleth/idp/saml/saml2/profile/config/AttributeQueryProfileConfigurationTest.java b/idp-saml-impl/src/test/java/net/shibboleth/idp/saml/saml2/profile/config/impl/AttributeQueryProfileConfigurationTest.java
similarity index 98%
rename from idp-saml-api/src/test/java/net/shibboleth/idp/saml/saml2/profile/config/AttributeQueryProfileConfigurationTest.java
rename to idp-saml-impl/src/test/java/net/shibboleth/idp/saml/saml2/profile/config/impl/AttributeQueryProfileConfigurationTest.java
index a0dc5d69b..8ca3176f8 100644
--- a/idp-saml-api/src/test/java/net/shibboleth/idp/saml/saml2/profile/config/AttributeQueryProfileConfigurationTest.java
+++ b/idp-saml-impl/src/test/java/net/shibboleth/idp/saml/saml2/profile/config/impl/AttributeQueryProfileConfigurationTest.java
@@ -15,7 +15,7 @@
* limitations under the License.
*/
-package net.shibboleth.idp.saml.saml2.profile.config;
+package net.shibboleth.idp.saml.saml2.profile.config.impl;
import org.testng.Assert;
import org.testng.annotations.Test;
diff --git a/idp-saml-api/src/test/java/net/shibboleth/idp/saml/saml2/profile/config/BrowserSSOProfileConfigurationTest.java b/idp-saml-impl/src/test/java/net/shibboleth/idp/saml/saml2/profile/config/impl/BrowserSSOProfileConfigurationTest.java
similarity index 99%
rename from idp-saml-api/src/test/java/net/shibboleth/idp/saml/saml2/profile/config/BrowserSSOProfileConfigurationTest.java
rename to idp-saml-impl/src/test/java/net/shibboleth/idp/saml/saml2/profile/config/impl/BrowserSSOProfileConfigurationTest.java
index e0d986e79..33cbee488 100644
--- a/idp-saml-api/src/test/java/net/shibboleth/idp/saml/saml2/profile/config/BrowserSSOProfileConfigurationTest.java
+++ b/idp-saml-impl/src/test/java/net/shibboleth/idp/saml/saml2/profile/config/impl/BrowserSSOProfileConfigurationTest.java
@@ -15,9 +15,10 @@
* limitations under the License.
*/
-package net.shibboleth.idp.saml.saml2.profile.config;
+package net.shibboleth.idp.saml.saml2.profile.config.impl;
import net.shibboleth.idp.saml.authn.principal.AuthnContextClassRefPrincipal;
+import net.shibboleth.idp.saml.saml2.profile.config.impl.BrowserSSOProfileConfiguration;
import net.shibboleth.saml.profile.config.BasicSAMLArtifactConfiguration;
import net.shibboleth.saml.profile.config.SAMLArtifactConfiguration;
import net.shibboleth.shared.logic.ConstraintViolationException;
diff --git a/idp-saml-api/src/test/java/net/shibboleth/idp/saml/idwsf/profile/config/SSOSProfileConfigurationTest.java b/idp-saml-impl/src/test/java/net/shibboleth/idp/saml/saml2/profile/config/impl/SSOSProfileConfigurationTest.java
similarity index 77%
rename from idp-saml-api/src/test/java/net/shibboleth/idp/saml/idwsf/profile/config/SSOSProfileConfigurationTest.java
rename to idp-saml-impl/src/test/java/net/shibboleth/idp/saml/saml2/profile/config/impl/SSOSProfileConfigurationTest.java
index 476fe4f3c..329c9a193 100644
--- a/idp-saml-api/src/test/java/net/shibboleth/idp/saml/idwsf/profile/config/SSOSProfileConfigurationTest.java
+++ b/idp-saml-impl/src/test/java/net/shibboleth/idp/saml/saml2/profile/config/impl/SSOSProfileConfigurationTest.java
@@ -15,27 +15,26 @@
* limitations under the License.
*/
-package net.shibboleth.idp.saml.idwsf.profile.config;
-
-import net.shibboleth.idp.saml.idwsf.profile.config.SSOSProfileConfiguration;
+package net.shibboleth.idp.saml.saml2.profile.config.impl;
import org.testng.Assert;
import org.testng.annotations.Test;
/** Unit test for {@link SSOSProfileConfiguration}. */
+ at SuppressWarnings("javadoc")
public class SSOSProfileConfigurationTest {
+ @SuppressWarnings("removal")
@Test
public void testProfileId() {
- Assert.assertEquals(SSOSProfileConfiguration.PROFILE_ID, "http://shibboleth.net/ns/profiles/liberty/ssos");
-
- SSOSProfileConfiguration config = new SSOSProfileConfiguration();
+ final SSOSProfileConfiguration config = new SSOSProfileConfiguration();
Assert.assertEquals(config.getId(), SSOSProfileConfiguration.PROFILE_ID);
}
@Test
+ @SuppressWarnings("removal")
public void testDelegationPredicate() {
- SSOSProfileConfiguration config = new SSOSProfileConfiguration();
+ final SSOSProfileConfiguration config = new SSOSProfileConfiguration();
Assert.assertFalse(config.isDelegation(null));
config.setDelegation(true);
diff --git a/idp-saml-api/src/test/java/net/shibboleth/idp/saml/saml2/profile/config/SingleLogoutProfileConfigurationTest.java b/idp-saml-impl/src/test/java/net/shibboleth/idp/saml/saml2/profile/config/impl/SingleLogoutProfileConfigurationTest.java
similarity index 98%
rename from idp-saml-api/src/test/java/net/shibboleth/idp/saml/saml2/profile/config/SingleLogoutProfileConfigurationTest.java
rename to idp-saml-impl/src/test/java/net/shibboleth/idp/saml/saml2/profile/config/impl/SingleLogoutProfileConfigurationTest.java
index 2c97c32fe..33f6e4d98 100644
--- a/idp-saml-api/src/test/java/net/shibboleth/idp/saml/saml2/profile/config/SingleLogoutProfileConfigurationTest.java
+++ b/idp-saml-impl/src/test/java/net/shibboleth/idp/saml/saml2/profile/config/impl/SingleLogoutProfileConfigurationTest.java
@@ -15,7 +15,7 @@
* limitations under the License.
*/
-package net.shibboleth.idp.saml.saml2.profile.config;
+package net.shibboleth.idp.saml.saml2.profile.config.impl;
import org.testng.Assert;
import org.testng.annotations.Test;
diff --git a/idp-saml-impl/src/test/java/net/shibboleth/idp/saml/saml2/profile/config/navigate/tests/ProxyRestrictionLookupFunctionTest.java b/idp-saml-impl/src/test/java/net/shibboleth/idp/saml/saml2/profile/config/navigate/tests/ProxyRestrictionLookupFunctionTest.java
index b23d3a4c7..cd9c44c49 100644
--- a/idp-saml-impl/src/test/java/net/shibboleth/idp/saml/saml2/profile/config/navigate/tests/ProxyRestrictionLookupFunctionTest.java
+++ b/idp-saml-impl/src/test/java/net/shibboleth/idp/saml/saml2/profile/config/navigate/tests/ProxyRestrictionLookupFunctionTest.java
@@ -26,7 +26,7 @@ import net.shibboleth.idp.authn.AuthenticationResult;
import net.shibboleth.idp.authn.context.SubjectContext;
import net.shibboleth.idp.authn.principal.ProxyAuthenticationPrincipal;
import net.shibboleth.idp.profile.testing.RequestContextBuilder;
-import net.shibboleth.idp.saml.saml2.profile.config.BrowserSSOProfileConfiguration;
+import net.shibboleth.idp.saml.saml2.profile.config.impl.BrowserSSOProfileConfiguration;
import net.shibboleth.idp.saml.saml2.profile.config.navigate.ProxyRestrictionLookupFunction;
import net.shibboleth.profile.context.RelyingPartyContext;
import net.shibboleth.shared.collection.CollectionSupport;
diff --git a/idp-saml-impl/src/test/java/net/shibboleth/idp/saml/saml2/profile/impl/AddAttributeStatementToAssertionTest.java b/idp-saml-impl/src/test/java/net/shibboleth/idp/saml/saml2/profile/impl/AddAttributeStatementToAssertionTest.java
index 399b123af..712cc1dce 100644
--- a/idp-saml-impl/src/test/java/net/shibboleth/idp/saml/saml2/profile/impl/AddAttributeStatementToAssertionTest.java
+++ b/idp-saml-impl/src/test/java/net/shibboleth/idp/saml/saml2/profile/impl/AddAttributeStatementToAssertionTest.java
@@ -40,7 +40,6 @@ import net.shibboleth.idp.profile.testing.RequestContextBuilder;
import net.shibboleth.idp.saml.attribute.transcoding.AbstractSAML2AttributeTranscoder;
import net.shibboleth.idp.saml.attribute.transcoding.SAML2AttributeTranscoder;
import net.shibboleth.idp.saml.attribute.transcoding.impl.SAML2StringAttributeTranscoder;
-import net.shibboleth.idp.saml.saml2.profile.testing.SAML2ActionTestingSupport;
import net.shibboleth.profile.context.RelyingPartyContext;
import net.shibboleth.shared.component.ComponentInitializationException;
import net.shibboleth.shared.testing.MockApplicationContext;
diff --git a/idp-saml-impl/src/test/java/net/shibboleth/idp/saml/saml2/profile/impl/AddAuthnRequestTest.java b/idp-saml-impl/src/test/java/net/shibboleth/idp/saml/saml2/profile/impl/AddAuthnRequestTest.java
index 0c47959df..88e997b64 100644
--- a/idp-saml-impl/src/test/java/net/shibboleth/idp/saml/saml2/profile/impl/AddAuthnRequestTest.java
+++ b/idp-saml-impl/src/test/java/net/shibboleth/idp/saml/saml2/profile/impl/AddAuthnRequestTest.java
@@ -37,8 +37,7 @@ import net.shibboleth.idp.profile.testing.ActionTestingSupport;
import net.shibboleth.idp.profile.testing.RequestContextBuilder;
import net.shibboleth.idp.saml.authn.principal.AuthenticationMethodPrincipal;
import net.shibboleth.idp.saml.authn.principal.AuthnContextClassRefPrincipal;
-import net.shibboleth.idp.saml.saml2.profile.config.BrowserSSOProfileConfiguration;
-import net.shibboleth.idp.saml.saml2.profile.testing.SAML2ActionTestingSupport;
+import net.shibboleth.idp.saml.saml2.profile.config.impl.BrowserSSOProfileConfiguration;
import net.shibboleth.profile.context.RelyingPartyContext;
import net.shibboleth.shared.component.ComponentInitializationException;
diff --git a/idp-saml-impl/src/test/java/net/shibboleth/idp/saml/saml2/profile/impl/AddAuthnStatementToAssertionTest.java b/idp-saml-impl/src/test/java/net/shibboleth/idp/saml/saml2/profile/impl/AddAuthnStatementToAssertionTest.java
index 0de61040d..d3a1584c8 100644
--- a/idp-saml-impl/src/test/java/net/shibboleth/idp/saml/saml2/profile/impl/AddAuthnStatementToAssertionTest.java
+++ b/idp-saml-impl/src/test/java/net/shibboleth/idp/saml/saml2/profile/impl/AddAuthnStatementToAssertionTest.java
@@ -50,8 +50,7 @@ import net.shibboleth.idp.profile.context.navigate.WebflowRequestContextProfileR
import net.shibboleth.idp.profile.testing.ActionTestingSupport;
import net.shibboleth.idp.profile.testing.RequestContextBuilder;
import net.shibboleth.idp.saml.authn.principal.AuthnContextClassRefPrincipal;
-import net.shibboleth.idp.saml.saml2.profile.config.BrowserSSOProfileConfiguration;
-import net.shibboleth.idp.saml.saml2.profile.testing.SAML2ActionTestingSupport;
+import net.shibboleth.idp.saml.saml2.profile.config.impl.BrowserSSOProfileConfiguration;
import net.shibboleth.profile.context.RelyingPartyContext;
import net.shibboleth.shared.component.ComponentInitializationException;
import net.shibboleth.shared.testing.ConstantSupplier;
diff --git a/idp-saml-impl/src/test/java/net/shibboleth/idp/saml/saml2/profile/impl/PopulateEncryptionParametersTest.java b/idp-saml-impl/src/test/java/net/shibboleth/idp/saml/saml2/profile/impl/PopulateEncryptionParametersTest.java
index 85c8307ba..c0dcb0b99 100644
--- a/idp-saml-impl/src/test/java/net/shibboleth/idp/saml/saml2/profile/impl/PopulateEncryptionParametersTest.java
+++ b/idp-saml-impl/src/test/java/net/shibboleth/idp/saml/saml2/profile/impl/PopulateEncryptionParametersTest.java
@@ -23,7 +23,7 @@ import net.shibboleth.idp.profile.IdPEventIds;
import net.shibboleth.idp.profile.context.navigate.WebflowRequestContextProfileRequestContextLookup;
import net.shibboleth.idp.profile.testing.ActionTestingSupport;
import net.shibboleth.idp.profile.testing.RequestContextBuilder;
-import net.shibboleth.idp.saml.saml2.profile.config.BrowserSSOProfileConfiguration;
+import net.shibboleth.idp.saml.saml2.profile.config.impl.BrowserSSOProfileConfiguration;
import net.shibboleth.profile.context.RelyingPartyContext;
import net.shibboleth.shared.collection.CollectionSupport;
import net.shibboleth.shared.component.ComponentInitializationException;
@@ -92,7 +92,7 @@ public class PopulateEncryptionParametersTest extends OpenSAMLInitBaseTestCase {
action.initialize();
prc.getSubcontext(RelyingPartyContext.class).setProfileConfig(
- new net.shibboleth.idp.saml.saml1.profile.config.BrowserSSOProfileConfiguration());
+ new net.shibboleth.idp.saml.saml1.profile.config.impl.BrowserSSOProfileConfiguration());
final Event event = action.execute(rc);
ActionTestingSupport.assertProceedEvent(event);
diff --git a/idp-saml-impl/src/test/java/net/shibboleth/idp/saml/saml2/profile/impl/PreProcessLogoutMessageTest.java b/idp-saml-impl/src/test/java/net/shibboleth/idp/saml/saml2/profile/impl/PreProcessLogoutMessageTest.java
index 71a02e78b..c0371c750 100644
--- a/idp-saml-impl/src/test/java/net/shibboleth/idp/saml/saml2/profile/impl/PreProcessLogoutMessageTest.java
+++ b/idp-saml-impl/src/test/java/net/shibboleth/idp/saml/saml2/profile/impl/PreProcessLogoutMessageTest.java
@@ -20,7 +20,6 @@ package net.shibboleth.idp.saml.saml2.profile.impl;
import net.shibboleth.idp.profile.context.navigate.WebflowRequestContextProfileRequestContextLookup;
import net.shibboleth.idp.profile.testing.ActionTestingSupport;
import net.shibboleth.idp.profile.testing.RequestContextBuilder;
-import net.shibboleth.idp.saml.saml2.profile.testing.SAML2ActionTestingSupport;
import net.shibboleth.shared.component.ComponentInitializationException;
import org.opensaml.core.testing.OpenSAMLInitBaseTestCase;
diff --git a/idp-saml-impl/src/test/java/net/shibboleth/idp/saml/saml2/profile/impl/ProcessLogoutRequestTest.java b/idp-saml-impl/src/test/java/net/shibboleth/idp/saml/saml2/profile/impl/ProcessLogoutRequestTest.java
index 942fb0d3c..80f72c075 100644
--- a/idp-saml-impl/src/test/java/net/shibboleth/idp/saml/saml2/profile/impl/ProcessLogoutRequestTest.java
+++ b/idp-saml-impl/src/test/java/net/shibboleth/idp/saml/saml2/profile/impl/ProcessLogoutRequestTest.java
@@ -30,8 +30,7 @@ import net.shibboleth.idp.authn.context.SubjectContext;
import net.shibboleth.idp.profile.context.navigate.WebflowRequestContextProfileRequestContextLookup;
import net.shibboleth.idp.profile.testing.ActionTestingSupport;
import net.shibboleth.idp.profile.testing.RequestContextBuilder;
-import net.shibboleth.idp.saml.saml2.profile.config.SingleLogoutProfileConfiguration;
-import net.shibboleth.idp.saml.saml2.profile.testing.SAML2ActionTestingSupport;
+import net.shibboleth.idp.saml.saml2.profile.config.impl.SingleLogoutProfileConfiguration;
import net.shibboleth.idp.saml.session.SAML1SPSession;
import net.shibboleth.idp.saml.session.SAML2SPSession;
import net.shibboleth.idp.saml.session.impl.SAML1SPSessionSerializer;
diff --git a/idp-saml-impl/src/test/java/net/shibboleth/idp/saml/saml2/profile/impl/ProcessRequestedAuthnContextTest.java b/idp-saml-impl/src/test/java/net/shibboleth/idp/saml/saml2/profile/impl/ProcessRequestedAuthnContextTest.java
index 6e9f2e386..624b9be03 100644
--- a/idp-saml-impl/src/test/java/net/shibboleth/idp/saml/saml2/profile/impl/ProcessRequestedAuthnContextTest.java
+++ b/idp-saml-impl/src/test/java/net/shibboleth/idp/saml/saml2/profile/impl/ProcessRequestedAuthnContextTest.java
@@ -24,8 +24,7 @@ import net.shibboleth.idp.authn.context.AuthenticationContext;
import net.shibboleth.idp.authn.context.RequestedPrincipalContext;
import net.shibboleth.idp.profile.testing.ActionTestingSupport;
import net.shibboleth.idp.profile.testing.RequestContextBuilder;
-import net.shibboleth.idp.saml.saml2.profile.config.BrowserSSOProfileConfiguration;
-import net.shibboleth.idp.saml.saml2.profile.testing.SAML2ActionTestingSupport;
+import net.shibboleth.idp.saml.saml2.profile.config.impl.BrowserSSOProfileConfiguration;
import net.shibboleth.profile.context.RelyingPartyContext;
import net.shibboleth.shared.component.ComponentInitializationException;
diff --git a/idp-testing/src/test/java/net/shibboleth/idp/saml/saml2/profile/testing/SAML2ActionSupportTest.java b/idp-saml-impl/src/test/java/net/shibboleth/idp/saml/saml2/profile/impl/SAML2ActionSupportTest.java
similarity index 98%
rename from idp-testing/src/test/java/net/shibboleth/idp/saml/saml2/profile/testing/SAML2ActionSupportTest.java
rename to idp-saml-impl/src/test/java/net/shibboleth/idp/saml/saml2/profile/impl/SAML2ActionSupportTest.java
index 715edf2ee..96e2f27e8 100644
--- a/idp-testing/src/test/java/net/shibboleth/idp/saml/saml2/profile/testing/SAML2ActionSupportTest.java
+++ b/idp-saml-impl/src/test/java/net/shibboleth/idp/saml/saml2/profile/impl/SAML2ActionSupportTest.java
@@ -15,7 +15,7 @@
* limitations under the License.
*/
-package net.shibboleth.idp.saml.saml2.profile.testing;
+package net.shibboleth.idp.saml.saml2.profile.impl;
import net.shibboleth.idp.profile.testing.RequestContextBuilder;
import net.shibboleth.idp.saml.profile.testing.ActionTestSupportAction;
diff --git a/idp-testing/src/main/java/net/shibboleth/idp/saml/saml2/profile/testing/SAML2ActionTestingSupport.java b/idp-saml-impl/src/test/java/net/shibboleth/idp/saml/saml2/profile/impl/SAML2ActionTestingSupport.java
similarity index 93%
rename from idp-testing/src/main/java/net/shibboleth/idp/saml/saml2/profile/testing/SAML2ActionTestingSupport.java
rename to idp-saml-impl/src/test/java/net/shibboleth/idp/saml/saml2/profile/impl/SAML2ActionTestingSupport.java
index 62ba8a9f5..7e9a023d1 100644
--- a/idp-testing/src/main/java/net/shibboleth/idp/saml/saml2/profile/testing/SAML2ActionTestingSupport.java
+++ b/idp-saml-impl/src/test/java/net/shibboleth/idp/saml/saml2/profile/impl/SAML2ActionTestingSupport.java
@@ -15,7 +15,7 @@
* limitations under the License.
*/
-package net.shibboleth.idp.saml.saml2.profile.testing;
+package net.shibboleth.idp.saml.saml2.profile.impl;
import java.util.ArrayList;
import java.util.Collection;
@@ -27,9 +27,9 @@ import net.shibboleth.profile.config.ProfileConfiguration;
import net.shibboleth.profile.context.RelyingPartyContext;
import net.shibboleth.idp.profile.relyingparty.RelyingPartyConfiguration;
import net.shibboleth.idp.profile.testing.ActionTestingSupport;
-import net.shibboleth.idp.saml.saml2.profile.config.ArtifactResolutionProfileConfiguration;
-import net.shibboleth.idp.saml.saml2.profile.config.AttributeQueryProfileConfiguration;
-import net.shibboleth.idp.saml.saml2.profile.config.BrowserSSOProfileConfiguration;
+import net.shibboleth.idp.saml.saml2.profile.config.impl.ArtifactResolutionProfileConfiguration;
+import net.shibboleth.idp.saml.saml2.profile.config.impl.AttributeQueryProfileConfiguration;
+import net.shibboleth.idp.saml.saml2.profile.config.impl.BrowserSSOProfileConfiguration;
import net.shibboleth.shared.component.ComponentInitializationException;
import net.shibboleth.shared.primitive.StringSupport;
--
To stop receiving notification emails like this one, please contact
the administrator of this repository.
More information about the commits
mailing list