public class PopulateEncryptionParameters extends AbstractProfileAction
EncryptionParameters on an EncryptionContext
created/accessed via a lookup function, by default on a RelyingPartyContext child of the
profile request context.
The resolution process is contingent on the active profile configuration requesting encryption
of some kind, and an EncryptionContext is also created to capture these requirements.
The OpenSAML default, per-RelyingParty, and default per-profile EncryptionConfiguration
objects are input to the resolution process, along with the relying party's SAML metadata, which in
most cases will be the source of the eventual encryption key.
EventIds.PROCEED_EVENT_ID, EventIds.INVALID_PROFILE_CTX, EventIds.INVALID_SEC_CFG, IdPEventIds.INVALID_RELYING_PARTY_CTX, IdPEventIds.INVALID_PROFILE_CONFIG| Modifier and Type | Field and Description |
|---|---|
private Function<org.opensaml.profile.context.ProfileRequestContext,List<org.opensaml.xmlsec.EncryptionConfiguration>> |
configurationLookupStrategy
Strategy used to look up a per-request
EncryptionConfiguration list. |
private org.opensaml.xmlsec.EncryptionParametersResolver |
encParamsresolver
Resolver for parameters to store into context.
|
private boolean |
encryptAssertions
Flag tracking whether assertion encryption is required.
|
private boolean |
encryptAttributes
Flag tracking whether assertion encryption is required.
|
private boolean |
encryptIdentifiers
Flag tracking whether assertion encryption is required.
|
private List<org.opensaml.xmlsec.EncryptionConfiguration> |
encryptionConfigurations
Active configurations to feed into resolver.
|
private Function<org.opensaml.profile.context.ProfileRequestContext,org.opensaml.saml.saml2.profile.context.EncryptionContext> |
encryptionContextLookupStrategy
Strategy used to look up the
EncryptionContext to store parameters in. |
private boolean |
encryptionOptional
Is encryption optional in the case no parameters can be resolved?
|
private org.slf4j.Logger |
log
Class logger.
|
private Function<org.opensaml.profile.context.ProfileRequestContext,org.opensaml.saml.common.messaging.context.SAMLPeerEntityContext> |
peerContextLookupStrategy
Strategy used to look up a SAML peer context.
|
private QName |
peerRole
Metadata role type to provide to resolver.
|
private Function<org.opensaml.profile.context.ProfileRequestContext,RelyingPartyContext> |
relyingPartyContextLookupStrategy
Strategy used to look up a
RelyingPartyContext for configuration options. |
private Function<org.opensaml.profile.context.ProfileRequestContext,org.opensaml.saml.saml2.core.AuthnRequest> |
requestLookupStrategy
Strategy used to locate the
AuthnRequest to operate on, if any. |
private String |
samlProtocol
Metadata protocolSupportEnumeration value to provide to resolver.
|
| Constructor and Description |
|---|
PopulateEncryptionParameters()
Constructor.
|
| Modifier and Type | Method and Description |
|---|---|
private CriteriaSet |
buildCriteriaSet(org.opensaml.profile.context.ProfileRequestContext profileRequestContext)
Build the criteria used as input to the
EncryptionParametersResolver. |
protected void |
doExecute(org.opensaml.profile.context.ProfileRequestContext profileRequestContext) |
protected void |
doInitialize() |
protected boolean |
doPreExecute(org.opensaml.profile.context.ProfileRequestContext profileRequestContext) |
void |
setConfigurationLookupStrategy(Function<org.opensaml.profile.context.ProfileRequestContext,List<org.opensaml.xmlsec.EncryptionConfiguration>> strategy)
Set the strategy used to look up a per-request
EncryptionConfiguration list. |
void |
setEncryptionContextLookupStrategy(Function<org.opensaml.profile.context.ProfileRequestContext,org.opensaml.saml.saml2.profile.context.EncryptionContext> strategy)
Set the strategy used to look up the
EncryptionContext to set the flags for. |
void |
setEncryptionParametersResolver(org.opensaml.xmlsec.EncryptionParametersResolver newResolver)
Set the encParamsresolver to use for the parameters to store into the context.
|
void |
setPeerContextLookupStrategy(Function<org.opensaml.profile.context.ProfileRequestContext,org.opensaml.saml.common.messaging.context.SAMLPeerEntityContext> strategy)
Set lookup strategy for
SAMLPeerEntityContext for input to resolution. |
void |
setProtocol(String protocol)
Set the protocol constant to use during resolution.
|
void |
setRelyingPartyContextLookupStrategy(Function<org.opensaml.profile.context.ProfileRequestContext,RelyingPartyContext> strategy)
Set the strategy used to return the
RelyingPartyContext for configuration options. |
void |
setRequestLookupStrategy(Function<org.opensaml.profile.context.ProfileRequestContext,org.opensaml.saml.saml2.core.AuthnRequest> strategy)
Set the strategy used to locate the
AuthnRequest to examine, if any. |
void |
setRole(QName role)
Set the operational role to use during resolution.
|
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, isInitialized@Nonnull private final org.slf4j.Logger log
@Nonnull private Function<org.opensaml.profile.context.ProfileRequestContext,org.opensaml.saml.saml2.core.AuthnRequest> requestLookupStrategy
AuthnRequest to operate on, if any.@Nonnull private Function<org.opensaml.profile.context.ProfileRequestContext,RelyingPartyContext> relyingPartyContextLookupStrategy
RelyingPartyContext for configuration options.@Nonnull private Function<org.opensaml.profile.context.ProfileRequestContext,org.opensaml.saml.saml2.profile.context.EncryptionContext> encryptionContextLookupStrategy
EncryptionContext to store parameters in.@Nullable private Function<org.opensaml.profile.context.ProfileRequestContext,org.opensaml.saml.common.messaging.context.SAMLPeerEntityContext> peerContextLookupStrategy
@Nullable private String samlProtocol
@NonnullAfterInit private Function<org.opensaml.profile.context.ProfileRequestContext,List<org.opensaml.xmlsec.EncryptionConfiguration>> configurationLookupStrategy
EncryptionConfiguration list.@NonnullAfterInit private org.opensaml.xmlsec.EncryptionParametersResolver encParamsresolver
@Nullable @NonnullElements private List<org.opensaml.xmlsec.EncryptionConfiguration> encryptionConfigurations
private boolean encryptionOptional
private boolean encryptAssertions
private boolean encryptIdentifiers
private boolean encryptAttributes
public void setRequestLookupStrategy(@Nonnull Function<org.opensaml.profile.context.ProfileRequestContext,org.opensaml.saml.saml2.core.AuthnRequest> strategy)
AuthnRequest to examine, if any.strategy - strategy used to locate the AuthnRequestpublic void setRelyingPartyContextLookupStrategy(@Nonnull Function<org.opensaml.profile.context.ProfileRequestContext,RelyingPartyContext> strategy)
RelyingPartyContext for configuration options.strategy - lookup strategypublic void setEncryptionContextLookupStrategy(@Nonnull Function<org.opensaml.profile.context.ProfileRequestContext,org.opensaml.saml.saml2.profile.context.EncryptionContext> strategy)
EncryptionContext to set the flags for.strategy - lookup strategypublic void setProtocol(@Nullable String protocol)
protocol - the protocol constant to setpublic void setRole(@Nullable QName role)
role - the operational role to setpublic void setConfigurationLookupStrategy(@Nonnull Function<org.opensaml.profile.context.ProfileRequestContext,List<org.opensaml.xmlsec.EncryptionConfiguration>> strategy)
EncryptionConfiguration list.strategy - lookup strategypublic void setPeerContextLookupStrategy(@Nullable Function<org.opensaml.profile.context.ProfileRequestContext,org.opensaml.saml.common.messaging.context.SAMLPeerEntityContext> strategy)
SAMLPeerEntityContext for input to resolution.strategy - lookup strategypublic void setEncryptionParametersResolver(@Nonnull org.opensaml.xmlsec.EncryptionParametersResolver newResolver)
newResolver - encParamsresolver to useprotected void doInitialize()
throws ComponentInitializationException
doInitialize in class AbstractInitializableComponentComponentInitializationExceptionprotected boolean doPreExecute(@Nonnull org.opensaml.profile.context.ProfileRequestContext profileRequestContext)
doPreExecute in class org.opensaml.profile.action.AbstractConditionalProfileActionprotected void doExecute(@Nonnull org.opensaml.profile.context.ProfileRequestContext profileRequestContext)
doExecute in class org.opensaml.profile.action.AbstractProfileAction@Nonnull private CriteriaSet buildCriteriaSet(@Nonnull org.opensaml.profile.context.ProfileRequestContext profileRequestContext)
EncryptionParametersResolver.profileRequestContext - current profile request contextCopyright © 1999–2017 Shibboleth Consortium. All rights reserved.