Class AddDelegationPolicyToAssertion
java.lang.Object
net.shibboleth.utilities.java.support.component.AbstractInitializableComponent
org.opensaml.profile.action.AbstractProfileAction
org.opensaml.profile.action.AbstractConditionalProfileAction
net.shibboleth.idp.profile.AbstractProfileAction
net.shibboleth.idp.saml.saml2.profile.delegation.impl.AddDelegationPolicyToAssertion
- All Implemented Interfaces:
Component
,DestructableComponent
,InitializableComponent
,ProfileAction
,Aware
,MessageSource
,MessageSourceAware
,Action
Action which adds a
DelegationPolicy
element to the Advice
of an Assertion
.
The assertion to modify is determined by the strategy set by setAssertionLookupStrategy(Function)
.
The maximum chain delegation length value for the added policy element is as follows:
- If an inbound assertion token is present as determined by the strategy set by
setAssertionTokenStrategy(Function)
, the value is obtained from the policy contained within the firstDelegationPolicy
element of that assertion'sAdvice
element. - Otherwise the request is assumed to be the initial SSO request, so the value is determined by
the requesting SP's profile configuration value
BrowserSSOProfileConfiguration.getMaximumTokenDelegationChainLength(ProfileRequestContext)
. - If neither of these approaches produces a value, a default value is used
DEFAULT_POLICY_MAX_CHAIN_LENGTH
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionprivate class
Default strategy for obtaining assertion to modify. -
Field Summary
FieldsModifier and TypeFieldDescriptionprivate Assertion
The assertion to modify.private Function<ProfileRequestContext,
Assertion> Strategy used to locate theAssertion
to operate on.private Function<ProfileRequestContext,
Assertion> Function used to resolve the inbound assertion token to process.private Assertion
The inbound delegated Assertion that was attested.static final Long
Default policy max chain length, when can't otherwise be derived.private org.slf4j.Logger
Logger.private Long
The max token delegation chain length value to add.Strategy used to lookup the RelyingPartyContext. -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected void
doExecute
(ProfileRequestContext profileRequestContext) protected boolean
doPreExecute
(ProfileRequestContext profileRequestContext) protected Long
resolveMaxChainLength
(ProfileRequestContext profileRequestContext) Resolve the max token delegation chain length value to add to the assertion.void
Set the strategy used to locate theAssertion
to operate on.void
Set the strategy used to locate the inbound assertion token to process.void
Set the strategy used to locate the currentRelyingPartyContext
.Methods inherited from class net.shibboleth.idp.profile.AbstractProfileAction
doExecute, execute, getBean, getBean, getMessage, getMessage, getMessage, getParameter, getParameter, getProfileContextLookupStrategy, getRequestContext, getResult, setMessageSource, setProfileContextLookupStrategy
Methods inherited from class org.opensaml.profile.action.AbstractConditionalProfileAction
getActivationCondition, setActivationCondition
Methods inherited from class org.opensaml.profile.action.AbstractProfileAction
doPostExecute, doPostExecute, execute, getHttpServletRequest, getHttpServletRequestSupplier, getHttpServletResponse, getHttpServletResponseSupplier, getLogPrefix, setHttpServletRequest, setHttpServletRequestSupplier, setHttpServletResponse, setHttpServletResponseSupplier
Methods inherited from class net.shibboleth.utilities.java.support.component.AbstractInitializableComponent
destroy, doDestroy, doInitialize, initialize, isDestroyed, isInitialized
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface net.shibboleth.utilities.java.support.component.InitializableComponent
initialize, isInitialized
-
Field Details
-
DEFAULT_POLICY_MAX_CHAIN_LENGTH
Default policy max chain length, when can't otherwise be derived. -
log
@Nonnull private org.slf4j.Logger logLogger. -
assertionLookupStrategy
Strategy used to locate theAssertion
to operate on. -
assertionTokenStrategy
Function used to resolve the inbound assertion token to process. -
relyingPartyContextLookupStrategy
@Nonnull private Function<ProfileRequestContext,RelyingPartyContext> relyingPartyContextLookupStrategyStrategy used to lookup the RelyingPartyContext. -
assertion
The assertion to modify. -
attestedAssertion
The inbound delegated Assertion that was attested. -
maxChainLength
The max token delegation chain length value to add.
-
-
Constructor Details
-
AddDelegationPolicyToAssertion
public AddDelegationPolicyToAssertion()Constructor.
-
-
Method Details
-
setAssertionTokenStrategy
Set the strategy used to locate the inbound assertion token to process.- Parameters:
strategy
- lookup strategy
-
setRelyingPartyContextLookupStrategy
public void setRelyingPartyContextLookupStrategy(@Nonnull Function<ProfileRequestContext, RelyingPartyContext> strategy) Set the strategy used to locate the currentRelyingPartyContext
.- Parameters:
strategy
- strategy used to locate the currentRelyingPartyContext
-
setAssertionLookupStrategy
Set the strategy used to locate theAssertion
to operate on.- Parameters:
strategy
- strategy used to locate theAssertion
to operate on
-
doPreExecute
- Overrides:
doPreExecute
in classAbstractConditionalProfileAction
-
doExecute
- Overrides:
doExecute
in classAbstractProfileAction
-
resolveMaxChainLength
Resolve the max token delegation chain length value to add to the assertion.- Parameters:
profileRequestContext
- the current profile request context- Returns:
- the max chain length value
-