public class AddDelegationRestrictionToAssertions extends AbstractProfileAction
DelegationRestrictionType Condition to each Assertion
contained within the outbound Response.
If the inbound assertion token specified in LibertySSOSContext contains an existing
DelegationRestrictionType condition, it is cloned, and the current SAML presenter entityID
is added as a new Delegate. Otherwise a new instance of DelegationRestrictionType
is created and a single new Delegate added.
In both cases the new delegate entityID is obtained from the SAMLPresenterEntityContext located
using the corresponding lookup function. The new delegate is augmented with the SAML subject confirmation method
obtained from the current LibertySSOSContext.
| Modifier and Type | Field and Description |
|---|---|
private List<Assertion> |
assertions
List of assertions to modify.
|
private Assertion |
attestedAssertion
The delegated Assertion that was attested.
|
private String |
attestedSubjectConfirmationMethod
The subject confirmation method successfully used to confirm the assertion by the presenter.
|
private org.joda.time.DateTime |
delegationInstant
The instant of delegation.
|
private com.google.common.base.Function<ProfileRequestContext,LibertySSOSContext> |
libertyContextLookupStrategy
Function used to resolve the Liberty context to populate.
|
private org.slf4j.Logger |
log
Class logger.
|
private com.google.common.base.Function<ProfileRequestContext,SAMLPresenterEntityContext> |
presenterContextLookupStrategy
Strategy used to locate the SAMLPresenterEntityContext.
|
private String |
presenterEntityID
The presenting entity which successfully attested the Assertion token.
|
private com.google.common.base.Function<ProfileRequestContext,Response> |
responseLookupStrategy
Strategy used to locate the Response to operate on.
|
| Constructor and Description |
|---|
AddDelegationRestrictionToAssertions()
Constructor.
|
| Modifier and Type | Method and Description |
|---|---|
protected void |
addDelegationRestriction(ProfileRequestContext profileRequestContext,
Conditions conditions)
Add a delegation restriction condition to the specified conditions.
|
protected Delegate |
buildDelegate(ProfileRequestContext profileRequestContext)
Build the Delegate child for the DelegationRestrictionType Condition,
based on the current request context.
|
protected DelegationRestrictionType |
buildDelegationRestriction(ProfileRequestContext profileRequestContext)
Using the existing attested Assertion from the presenter as a context, build the
appropriate DelegationRestrictionType Condition.
|
protected void |
doExecute(ProfileRequestContext profileRequestContext) |
protected boolean |
doPreExecute(ProfileRequestContext profileRequestContext) |
protected DelegationRestrictionType |
getDelegationRestrictionCondition(Conditions conditions)
Get the DelegationRestrictionType Condition from the supplied Conditions, if present.
|
void |
setLibertyContextLookupStrategy(com.google.common.base.Function<ProfileRequestContext,LibertySSOSContext> strategy)
Set the strategy used to locate the
LibertySSOSContext to populate. |
void |
setPresenterLookupStrategy(com.google.common.base.Function<ProfileRequestContext,SAMLPresenterEntityContext> strategy)
Set the strategy used to locate the
SAMLPresenterEntityContext. |
void |
setResponseLookupStrategy(com.google.common.base.Function<ProfileRequestContext,Response> strategy)
Set the strategy used to locate the Response to operate on.
|
doExecute, execute, getMessage, getMessage, getMessage, getProfileContextLookupStrategy, getRequestContext, getResult, setMessageSource, setProfileContextLookupStrategygetActivationCondition, setActivationConditiondoPostExecute, doPostExecute, execute, getHttpServletRequest, getHttpServletResponse, getLogPrefix, setHttpServletRequest, setHttpServletResponsedestroy, doDestroy, doInitialize, initialize, isDestroyed, isInitializedclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitinitialize, isInitialized@Nonnull private final org.slf4j.Logger log
@Nonnull private com.google.common.base.Function<ProfileRequestContext,Response> responseLookupStrategy
@Nonnull private com.google.common.base.Function<ProfileRequestContext,SAMLPresenterEntityContext> presenterContextLookupStrategy
@Nonnull private com.google.common.base.Function<ProfileRequestContext,LibertySSOSContext> libertyContextLookupStrategy
@Nullable private Assertion attestedAssertion
@Nullable private String attestedSubjectConfirmationMethod
@Nullable private String presenterEntityID
@Nullable private org.joda.time.DateTime delegationInstant
public AddDelegationRestrictionToAssertions()
public void setLibertyContextLookupStrategy(@Nonnull com.google.common.base.Function<ProfileRequestContext,LibertySSOSContext> strategy)
LibertySSOSContext to populate.strategy - lookup strategypublic void setResponseLookupStrategy(@Nonnull com.google.common.base.Function<ProfileRequestContext,Response> strategy)
strategy - lookup strategypublic void setPresenterLookupStrategy(@Nonnull com.google.common.base.Function<ProfileRequestContext,SAMLPresenterEntityContext> strategy)
SAMLPresenterEntityContext.strategy - lookup strategyprotected boolean doPreExecute(@Nonnull ProfileRequestContext profileRequestContext)
doPreExecute in class AbstractConditionalProfileActionprotected void doExecute(@Nonnull ProfileRequestContext profileRequestContext)
doExecute in class AbstractProfileActionprotected void addDelegationRestriction(@Nonnull ProfileRequestContext profileRequestContext, @Nonnull Conditions conditions)
profileRequestContext - the current profile request contextconditions - the conditions instance to modify@Nullable protected DelegationRestrictionType buildDelegationRestriction(@Nonnull ProfileRequestContext profileRequestContext)
profileRequestContext - the current profile request context@Nullable protected DelegationRestrictionType getDelegationRestrictionCondition(@Nullable Conditions conditions)
conditions - the Assertion Conditions to process@Nonnull protected Delegate buildDelegate(@Nonnull ProfileRequestContext profileRequestContext)
profileRequestContext - theCopyright © 1999–2018 Shibboleth Consortium. All rights reserved.