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.
| Modifier and Type | Field and Description |
|---|---|
private com.google.common.base.Function<ProfileRequestContext,List<EncryptionConfiguration>> |
configurationLookupStrategy
Strategy used to look up a per-request
EncryptionConfiguration list. |
private 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<EncryptionConfiguration> |
encryptionConfigurations
Active configurations to feed into resolver.
|
private com.google.common.base.Function<ProfileRequestContext,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 com.google.common.base.Function<ProfileRequestContext,SAMLPeerEntityContext> |
peerContextLookupStrategy
Strategy used to look up a SAML peer context.
|
private QName |
peerRole
Metadata role type to provide to resolver.
|
private com.google.common.base.Function<ProfileRequestContext,RelyingPartyContext> |
relyingPartyContextLookupStrategy
Strategy used to look up a
RelyingPartyContext for configuration options. |
private String |
samlProtocol
Metadata protocolSupportEnumeration value to provide to resolver.
|
| Constructor and Description |
|---|
PopulateEncryptionParameters()
Constructor.
|
| Modifier and Type | Method and Description |
|---|---|
private CriteriaSet |
buildCriteriaSet(ProfileRequestContext profileRequestContext)
Build the criteria used as input to the
EncryptionParametersResolver. |
protected void |
doExecute(ProfileRequestContext profileRequestContext) |
protected void |
doInitialize() |
protected boolean |
doPreExecute(ProfileRequestContext profileRequestContext) |
void |
setConfigurationLookupStrategy(com.google.common.base.Function<ProfileRequestContext,List<EncryptionConfiguration>> strategy)
Set the strategy used to look up a per-request
EncryptionConfiguration list. |
void |
setEncryptionContextLookupStrategy(com.google.common.base.Function<ProfileRequestContext,EncryptionContext> strategy)
Set the strategy used to look up the
EncryptionContext to set the flags for. |
void |
setEncryptionParametersResolver(EncryptionParametersResolver newResolver)
Set the encParamsresolver to use for the parameters to store into the context.
|
void |
setPeerContextLookupStrategy(com.google.common.base.Function<ProfileRequestContext,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(com.google.common.base.Function<ProfileRequestContext,RelyingPartyContext> strategy)
Set the strategy used to return the
RelyingPartyContext for configuration options. |
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 com.google.common.base.Function<ProfileRequestContext,RelyingPartyContext> relyingPartyContextLookupStrategy
RelyingPartyContext for configuration options.@Nonnull private com.google.common.base.Function<ProfileRequestContext,EncryptionContext> encryptionContextLookupStrategy
EncryptionContext to store parameters in.@Nullable private com.google.common.base.Function<ProfileRequestContext,SAMLPeerEntityContext> peerContextLookupStrategy
@Nullable private String samlProtocol
@NonnullAfterInit private com.google.common.base.Function<ProfileRequestContext,List<EncryptionConfiguration>> configurationLookupStrategy
EncryptionConfiguration list.@NonnullAfterInit private EncryptionParametersResolver encParamsresolver
@Nullable @NonnullElements private List<EncryptionConfiguration> encryptionConfigurations
private boolean encryptionOptional
private boolean encryptAssertions
private boolean encryptIdentifiers
private boolean encryptAttributes
public void setRelyingPartyContextLookupStrategy(@Nonnull com.google.common.base.Function<ProfileRequestContext,RelyingPartyContext> strategy)
RelyingPartyContext for configuration options.strategy - lookup strategypublic void setEncryptionContextLookupStrategy(@Nonnull com.google.common.base.Function<ProfileRequestContext,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 com.google.common.base.Function<ProfileRequestContext,List<EncryptionConfiguration>> strategy)
EncryptionConfiguration list.strategy - lookup strategypublic void setPeerContextLookupStrategy(@Nullable com.google.common.base.Function<ProfileRequestContext,SAMLPeerEntityContext> strategy)
SAMLPeerEntityContext for input to resolution.strategy - lookup strategypublic void setEncryptionParametersResolver(@Nonnull EncryptionParametersResolver newResolver)
newResolver - encParamsresolver to useprotected void doInitialize()
throws ComponentInitializationException
doInitialize in class AbstractInitializableComponentComponentInitializationExceptionprotected boolean doPreExecute(@Nonnull ProfileRequestContext profileRequestContext)
doPreExecute in class AbstractConditionalProfileActionprotected void doExecute(@Nonnull ProfileRequestContext profileRequestContext)
doExecute in class AbstractProfileAction@Nonnull private CriteriaSet buildCriteriaSet(@Nonnull ProfileRequestContext profileRequestContext)
EncryptionParametersResolver.profileRequestContext - current profile request contextCopyright © 1999–2018 Shibboleth Consortium. All rights reserved.