@Prototype public class DecorateDelegatedAssertion extends AbstractProfileAction
Assertion appropriately for use as delegation tokens.
An instance of DelegationContext is resolved via the strategy set via
setDelegationContextLookupStrategy(Function). If no delegation context is found
or if DelegationContext.isIssuingDelegatedAssertion() is false, then no decoration
occurs.
The decoration consists of 3 primary parts:
SubjectConfirmation is added to the assertion's Subject. The credentials used
are taken from DelegationContext.getSubjectConfirmationCredentials().
Audience is added to the assertion condition AudienceRestriction, indicating
the IdP's own entityID as an acceptable audience. The IdP entityID is resolved from the active
RelyingPartyContext, which is resolved via the strategy set by
setRelyingPartyContextLookupStrategy(Function).
Attribute is added to the assertion's AttributeStatement containing an
EndpointReference, indicating the location and other info necessary for the recipient to present
the delegated assertion at the IdP for delegated SSO. The attribute name is a URI type with name
LibertyConstants.SERVICE_TYPE_SSOS. The endpoint URL is either set directly on this action via
setLibertySSOSEndpointURL(String), or is resolved via the strategy
setLibertySSOSEndpointURLLookupStrategy(Function).
EventIds.INVALID_PROFILE_CTX| Modifier and Type | Class and Description |
|---|---|
private class |
DecorateDelegatedAssertion.AssertionStrategy
Default strategy for obtaining assertion to modify.
|
static class |
DecorateDelegatedAssertion.LibertySSOSEndpointURLStrategy
Strategy that builds the SSOS endpoint URL based on the current HTTP request
using default values for scheme, port and URI path suffix.
|
| Modifier and Type | Field and Description |
|---|---|
private com.google.common.base.Function<ProfileRequestContext,List<Assertion>> |
assertionLookupStrategy
Strategy used to locate the
Assertions on which to operate. |
private List<Assertion> |
assertions
The list of assertions on which to operate.
|
private DelegationContext |
delegationContext
The delegation context instance to be populated.
|
private com.google.common.base.Function<ProfileRequestContext,DelegationContext> |
delegationContextLookupStrategy
Strategy used to lookup the
DelegationContext. |
private NamedKeyInfoGeneratorManager |
keyInfoGeneratorManager
The manager used to generate KeyInfo instances from Credentials.
|
private String |
libertySSOSEndpointURL
The URL at which the IdP will accept Liberty ID-WSF SSOS requests.
|
private com.google.common.base.Function<Pair<ProfileRequestContext,javax.servlet.http.HttpServletRequest>,String> |
libertySSOSEndpointURLLookupStrategy
The strategy used to resolve the URL at which the IdP will accept Liberty ID-WSF SSOS requests.
|
private org.slf4j.Logger |
log
Class logger.
|
private RelyingPartyContext |
relyingPartyContext
The current RelyingPartyContext.
|
private com.google.common.base.Function<ProfileRequestContext,RelyingPartyContext> |
relyingPartyContextLookupStrategy
Strategy used to lookup the RelyingPartyContext.
|
private String |
relyingPartyId
The entityID of the SAML relying party.
|
private String |
responderId
The entityID of the local responder entity.
|
| Constructor and Description |
|---|
DecorateDelegatedAssertion()
Constructor.
|
| Modifier and Type | Method and Description |
|---|---|
private void |
addIdPAudienceRestriction(ProfileRequestContext requestContext,
Assertion assertion)
An an AudienceRestriction condition indicating the IdP as an acceptable Audience.
|
private void |
addLibertySSOSEPRAttribute(ProfileRequestContext requestContext,
Assertion assertion)
Add Liberty SSOS service Endpoint Reference (EPR) attribute to Assertion's AttributeStatement.
|
private void |
addSAMLPeerSubjectConfirmation(ProfileRequestContext requestContext,
Assertion assertion)
Add SubjectConfirmation to the Assertion Subject to allow confirmation when wielded by the SAML requester.
|
private XMLObject |
buildLibertSSOSEPRAttributeValue(ProfileRequestContext requestContext,
Assertion assertion)
Build the Liberty SSOS EPR AttributeValue object.
|
private void |
decorateDelegatedAssertion(ProfileRequestContext requestContext)
Decorate the Assertion to allow use as a delegated security token by the SAML requester.
|
protected void |
doExecute(ProfileRequestContext profileRequestContext) |
protected void |
doInitialize() |
protected boolean |
doPreExecute(ProfileRequestContext profileRequestContext) |
protected boolean |
doPreExecuteDelegationInfo(ProfileRequestContext profileRequestContext)
Pre-execute actions on the delegation-specific info.
|
protected boolean |
doPreExecuteRelyingParty(ProfileRequestContext profileRequestContext)
Pre-execute actions on the relying party context info.
|
private void |
resolveLibertySSOSEndpointURL(ProfileRequestContext profileRequestContext)
Resolve and store the effective Liberty SSOS endpoint URL to use.
|
void |
setAssertionLookupStrategy(com.google.common.base.Function<ProfileRequestContext,List<Assertion>> strategy)
Set the strategy used to locate the
Assertion to operate on. |
void |
setDelegationContextLookupStrategy(com.google.common.base.Function<ProfileRequestContext,DelegationContext> strategy)
Set the strategy used to locate the current
DelegationContext. |
void |
setKeyInfoGeneratorManager(NamedKeyInfoGeneratorManager manager)
|
void |
setLibertySSOSEndpointURL(String url)
Set the statically-configured URL at which the IdP will accept Liberty ID-WSF SSOS requests.
|
void |
setLibertySSOSEndpointURLLookupStrategy(com.google.common.base.Function<Pair<ProfileRequestContext,javax.servlet.http.HttpServletRequest>,String> strategy)
Set strategy used to resolve the URL at which the IdP will accept Liberty ID-WSF SSOS requests.
|
void |
setRelyingPartyContextLookupStrategy(com.google.common.base.Function<ProfileRequestContext,RelyingPartyContext> strategy)
Set the strategy used to locate the current
RelyingPartyContext. |
doExecute, execute, getMessage, getMessage, getMessage, getProfileContextLookupStrategy, getRequestContext, getResult, setMessageSource, setProfileContextLookupStrategygetActivationCondition, setActivationConditiondoPostExecute, doPostExecute, execute, getHttpServletRequest, getHttpServletResponse, getLogPrefix, setHttpServletRequest, setHttpServletResponsedestroy, doDestroy, initialize, isDestroyed, isInitializedclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitinitialize, isInitializedprivate final org.slf4j.Logger log
private String libertySSOSEndpointURL
@Nullable private com.google.common.base.Function<Pair<ProfileRequestContext,javax.servlet.http.HttpServletRequest>,String> libertySSOSEndpointURLLookupStrategy
@Nonnull private com.google.common.base.Function<ProfileRequestContext,RelyingPartyContext> relyingPartyContextLookupStrategy
@Nonnull private com.google.common.base.Function<ProfileRequestContext,DelegationContext> delegationContextLookupStrategy
DelegationContext.@Nonnull private com.google.common.base.Function<ProfileRequestContext,List<Assertion>> assertionLookupStrategy
Assertions on which to operate.@Nonnull private NamedKeyInfoGeneratorManager keyInfoGeneratorManager
private DelegationContext delegationContext
private RelyingPartyContext relyingPartyContext
private String responderId
private String relyingPartyId
public void setLibertySSOSEndpointURL(@Nullable String url)
url - the Liberty ID-WSF SSOS endpoint URL, or nullpublic void setLibertySSOSEndpointURLLookupStrategy(@Nullable com.google.common.base.Function<Pair<ProfileRequestContext,javax.servlet.http.HttpServletRequest>,String> strategy)
strategy - the Liberty ID-WSF SSOS endpoint URL lookup strategy, or nullpublic void setRelyingPartyContextLookupStrategy(@Nonnull com.google.common.base.Function<ProfileRequestContext,RelyingPartyContext> strategy)
RelyingPartyContext.strategy - strategy used to locate the current RelyingPartyContextpublic void setDelegationContextLookupStrategy(@Nonnull com.google.common.base.Function<ProfileRequestContext,DelegationContext> strategy)
DelegationContext.strategy - strategy used to locate the current DelegationContextpublic void setAssertionLookupStrategy(@Nonnull com.google.common.base.Function<ProfileRequestContext,List<Assertion>> strategy)
Assertion to operate on.strategy - strategy used to locate the Assertion to operate onpublic void setKeyInfoGeneratorManager(@Nonnull NamedKeyInfoGeneratorManager manager)
manager - the manager instance to useprotected void doInitialize()
throws ComponentInitializationException
doInitialize in class AbstractInitializableComponentComponentInitializationExceptionprotected boolean doPreExecute(@Nonnull ProfileRequestContext profileRequestContext)
doPreExecute in class AbstractConditionalProfileActionprotected boolean doPreExecuteDelegationInfo(@Nonnull ProfileRequestContext profileRequestContext)
profileRequestContext - the current profile request contextdoExecute(ProfileRequestContext) should proceedprotected boolean doPreExecuteRelyingParty(@Nonnull ProfileRequestContext profileRequestContext)
profileRequestContext - the current profile request contextdoExecute(ProfileRequestContext) should proceedprotected void doExecute(@Nonnull ProfileRequestContext profileRequestContext)
doExecute in class AbstractProfileActionprivate void resolveLibertySSOSEndpointURL(ProfileRequestContext profileRequestContext)
profileRequestContext - the current request contextprivate void decorateDelegatedAssertion(@Nonnull ProfileRequestContext requestContext)
requestContext - the current request contextprivate void addLibertySSOSEPRAttribute(@Nonnull ProfileRequestContext requestContext, @Nonnull Assertion assertion)
requestContext - the current request contextassertion - the delegated assertion being issued@Nonnull private XMLObject buildLibertSSOSEPRAttributeValue(@Nonnull ProfileRequestContext requestContext, @Nonnull Assertion assertion)
requestContext - the current request contextassertion - the delegated assertion being issuedprivate void addIdPAudienceRestriction(@Nonnull ProfileRequestContext requestContext, @Nonnull Assertion assertion)
requestContext - the current request contextassertion - the assertion being isuedprivate void addSAMLPeerSubjectConfirmation(@Nonnull ProfileRequestContext requestContext, @Nonnull Assertion assertion)
requestContext - the current request contextassertion - the assertion being issuedCopyright © 1999–2018 Shibboleth Consortium. All rights reserved.