Class AbstractSAMLProfileConfiguration
java.lang.Object
net.shibboleth.utilities.java.support.component.AbstractInitializableComponent
net.shibboleth.utilities.java.support.component.AbstractIdentifiedInitializableComponent
net.shibboleth.utilities.java.support.component.AbstractIdentifiableInitializableComponent
net.shibboleth.idp.profile.config.AbstractProfileConfiguration
net.shibboleth.idp.profile.config.AbstractConditionalProfileConfiguration
net.shibboleth.idp.saml.profile.config.AbstractSAMLProfileConfiguration
- All Implemented Interfaces:
ConditionalProfileConfiguration
,ProfileConfiguration
,SAMLProfileConfiguration
,Component
,DestructableComponent
,IdentifiableComponent
,IdentifiedComponent
,InitializableComponent
- Direct Known Subclasses:
AbstractSAML1ArtifactAwareProfileConfiguration
,AbstractSAML2ProfileConfiguration
,ArtifactResolutionProfileConfiguration
public abstract class AbstractSAMLProfileConfiguration
extends AbstractConditionalProfileConfiguration
implements SAMLProfileConfiguration
Base class for SAML profile configurations.
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate Function<ProfileRequestContext,
Set<String>> Lookup function to supply assertionAudiences property.private Function<ProfileRequestContext,
Duration> Lookup function to supply assertionLifetime property.static final Duration
Default assertion lifetime.private Predicate<ProfileRequestContext>
Controls whether to include a NotBefore attribute in the Conditions of generated assertions.private final org.slf4j.Logger
Class logger.private Predicate<ProfileRequestContext>
Predicate used to determine if the generated assertion should be signed.private Predicate<ProfileRequestContext>
Predicate used to determine if the generated request should be signed.private Predicate<ProfileRequestContext>
Predicate used to determine if the generated response should be signed.Fields inherited from class net.shibboleth.idp.profile.config.AbstractProfileConfiguration
DEFAULT_DISALLOWED_FEATURES
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptiongetAdditionalAudiencesForAssertion
(ProfileRequestContext profileRequestContext) Get an unmodifiable set of audiences, in addition to the relying party(ies) to which the IdP is issuing the assertion, with which an assertion may be shared.getAssertionLifetime
(ProfileRequestContext profileRequestContext) Get the lifetime of generated assertions.boolean
isIncludeConditionsNotBefore
(ProfileRequestContext profileRequestContext) Get whether to include a NotBefore attribute in the Conditions of generated assertions.boolean
isSignAssertions
(ProfileRequestContext profileRequestContext) Get the predicate used to determine if generated assertions should be signed.boolean
isSignRequests
(ProfileRequestContext profileRequestContext) Get the predicate used to determine if generated requests should be signed.boolean
isSignResponses
(ProfileRequestContext profileRequestContext) Get the predicate used to determine if generated responses should be signed.void
setAdditionalAudiencesForAssertion
(Collection<String> audiences) Set the set of audiences, in addition to the relying party(ies) to which the IdP is issuing the assertion, with which an assertion may be shared.void
setAdditionalAudiencesForAssertionLookupStrategy
(Function<ProfileRequestContext, Set<String>> strategy) Set a lookup strategy for the set of audiences, in addition to the relying party(ies) to which the IdP is issuing the assertion, with which an assertion may be shared.void
setAssertionLifetime
(Duration lifetime) Set the lifetime of an assertion.void
Set a lookup strategy for the lifetime of an assertion.void
setIncludeConditionsNotBefore
(boolean flag) Set whether to include a NotBefore attribute in the Conditions of generated assertions.void
Set a condition to determine whether to include a NotBefore attribute in the Conditions of generated assertions.void
setSignAssertions
(boolean flag) Set whether generated assertions should be signed.void
setSignAssertionsPredicate
(Predicate<ProfileRequestContext> predicate) Set the predicate used to determine if generated assertions should be signed.void
setSignRequests
(boolean flag) Set whether generated requests should be signed.void
setSignRequestsPredicate
(Predicate<ProfileRequestContext> predicate) Set the predicate used to determine if generated requests should be signed.void
setSignResponses
(boolean flag) Set whether generated responses should be signed.void
setSignResponsesPredicate
(Predicate<ProfileRequestContext> predicate) Set the predicate used to determine if generated responses should be signed.Methods inherited from class net.shibboleth.idp.profile.config.AbstractConditionalProfileConfiguration
getActivationCondition, setActivationCondition
Methods inherited from class net.shibboleth.idp.profile.config.AbstractProfileConfiguration
equals, getDisallowedFeatures, getInboundInterceptorFlows, getOutboundInterceptorFlows, getSecurityConfiguration, hashCode, isFeatureDisallowed, setDisallowedFeatures, setDisallowedFeaturesLookupStrategy, setInboundFlowsLookupStrategy, setInboundInterceptorFlows, setInboundInterceptorFlowsLookupStrategy, setOutboundFlowsLookupStrategy, setOutboundInterceptorFlows, setOutboundInterceptorFlowsLookupStrategy, setSecurityConfiguration, setSecurityConfigurationLookupStrategy
Methods inherited from class net.shibboleth.utilities.java.support.component.AbstractIdentifiableInitializableComponent
setId
Methods inherited from class net.shibboleth.utilities.java.support.component.AbstractIdentifiedInitializableComponent
doInitialize, getId
Methods inherited from class net.shibboleth.utilities.java.support.component.AbstractInitializableComponent
destroy, doDestroy, initialize, isDestroyed, isInitialized
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface net.shibboleth.utilities.java.support.component.IdentifiedComponent
getId
Methods inherited from interface net.shibboleth.idp.profile.config.ProfileConfiguration
getInboundInterceptorFlows, getOutboundInterceptorFlows, getSecurityConfiguration
-
Field Details
-
DEFAULT_ASSERTION_LIFETIME
Default assertion lifetime. -
log
@Nonnull private final org.slf4j.Logger logClass logger. -
signRequestsPredicate
Predicate used to determine if the generated request should be signed. Default returns false. -
signResponsesPredicate
Predicate used to determine if the generated response should be signed. Default returns false. -
signAssertionsPredicate
Predicate used to determine if the generated assertion should be signed. Default returns false. -
includeNotBeforePredicate
Controls whether to include a NotBefore attribute in the Conditions of generated assertions. -
assertionLifetimeLookupStrategy
Lookup function to supply assertionLifetime property. -
assertionAudiencesLookupStrategy
Lookup function to supply assertionAudiences property.
-
-
Constructor Details
-
AbstractSAMLProfileConfiguration
Constructor.- Parameters:
profileId
- ID of the communication profile
-
-
Method Details
-
isSignAssertions
Get the predicate used to determine if generated assertions should be signed.- Specified by:
isSignAssertions
in interfaceSAMLProfileConfiguration
- Parameters:
profileRequestContext
- current profile request context- Returns:
- predicate used to determine if generated assertions should be signed
-
setSignAssertions
public void setSignAssertions(boolean flag) Set whether generated assertions should be signed.- Parameters:
flag
- flag to set
-
setSignAssertionsPredicate
Set the predicate used to determine if generated assertions should be signed.- Parameters:
predicate
- predicate used to determine if generated assertions should be signed- Since:
- 4.0.0
-
isSignRequests
Get the predicate used to determine if generated requests should be signed.- Specified by:
isSignRequests
in interfaceSAMLProfileConfiguration
- Parameters:
profileRequestContext
- current profile request context- Returns:
- predicate used to determine if generated requests should be signed
-
setSignRequests
public void setSignRequests(boolean flag) Set whether generated requests should be signed.- Parameters:
flag
- flag to set
-
setSignRequestsPredicate
Set the predicate used to determine if generated requests should be signed.- Parameters:
predicate
- predicate used to determine if generated requests should be signed- Since:
- 4.0.0
-
isSignResponses
Get the predicate used to determine if generated responses should be signed.- Specified by:
isSignResponses
in interfaceSAMLProfileConfiguration
- Parameters:
profileRequestContext
- current profile request context- Returns:
- predicate used to determine if generated responses should be signed
-
setSignResponses
public void setSignResponses(boolean flag) Set whether generated responses should be signed.- Parameters:
flag
- flag to set
-
setSignResponsesPredicate
Set the predicate used to determine if generated responses should be signed.- Parameters:
predicate
- predicate used to determine if generated responses should be signed- Since:
- 4.0.0
-
getAssertionLifetime
@Nonnull public Duration getAssertionLifetime(@Nullable ProfileRequestContext profileRequestContext) Get the lifetime of generated assertions.- Specified by:
getAssertionLifetime
in interfaceSAMLProfileConfiguration
- Parameters:
profileRequestContext
- current profile request context- Returns:
- lifetime of generated assertions
-
setAssertionLifetime
Set the lifetime of an assertion.- Parameters:
lifetime
- lifetime of an assertion
-
setAssertionLifetimeLookupStrategy
public void setAssertionLifetimeLookupStrategy(@Nonnull Function<ProfileRequestContext, Duration> strategy) Set a lookup strategy for the lifetime of an assertion.- Parameters:
strategy
- lookup strategy- Since:
- 3.3.0
-
isIncludeConditionsNotBefore
Get whether to include a NotBefore attribute in the Conditions of generated assertions.- Specified by:
isIncludeConditionsNotBefore
in interfaceSAMLProfileConfiguration
- Parameters:
profileRequestContext
- current profile request context- Returns:
- whether to include a NotBefore attribute in the Conditions of generated assertions
-
setIncludeConditionsNotBefore
public void setIncludeConditionsNotBefore(boolean flag) Set whether to include a NotBefore attribute in the Conditions of generated assertions.- Parameters:
flag
- flag to set
-
setIncludeConditionsNotBeforePredicate
public void setIncludeConditionsNotBeforePredicate(@Nonnull Predicate<ProfileRequestContext> condition) Set a condition to determine whether to include a NotBefore attribute in the Conditions of generated assertions.- Parameters:
condition
- lookup strategy- Since:
- 3.3.0
-
getAdditionalAudiencesForAssertion
@Nonnull @NonnullElements @NotLive public Set<String> getAdditionalAudiencesForAssertion(@Nullable ProfileRequestContext profileRequestContext) Get an unmodifiable set of audiences, in addition to the relying party(ies) to which the IdP is issuing the assertion, with which an assertion may be shared.- Specified by:
getAdditionalAudiencesForAssertion
in interfaceSAMLProfileConfiguration
- Parameters:
profileRequestContext
- current profile request context- Returns:
- additional audiences to which an assertion may be shared
-
setAdditionalAudiencesForAssertion
public void setAdditionalAudiencesForAssertion(@Nullable @NonnullElements Collection<String> audiences) Set the set of audiences, in addition to the relying party(ies) to which the IdP is issuing the assertion, with which an assertion may be shared.- Parameters:
audiences
- the additional audiences
-
setAdditionalAudiencesForAssertionLookupStrategy
public void setAdditionalAudiencesForAssertionLookupStrategy(@Nonnull Function<ProfileRequestContext, Set<String>> strategy) Set a lookup strategy for the set of audiences, in addition to the relying party(ies) to which the IdP is issuing the assertion, with which an assertion may be shared.- Parameters:
strategy
- lookup strategy- Since:
- 4.0.0
-