Package net.shibboleth.oidc.profile.impl
Class PopulateJWTDecryptionParameters
java.lang.Object
net.shibboleth.shared.component.AbstractInitializableComponent
org.opensaml.profile.action.AbstractProfileAction
org.opensaml.profile.action.AbstractConditionalProfileAction
net.shibboleth.idp.profile.AbstractProfileAction
net.shibboleth.oidc.profile.impl.PopulateJWTDecryptionParameters
- All Implemented Interfaces:
Component,DestructableComponent,InitializableComponent,ProfileAction,Aware,MessageSource,MessageSourceAware,Action
Action that resolves and populates
DecryptionParameters on an SecurityParametersContext
created/accessed via a lookup function, by default on a child of the outbound message context.
The default, per-RelyingParty, and default per-profile EncryptionConfiguration
objects are input to the resolution process, along with any static, symmetric key credentials
configured on the relying party i.e. the client_secret.
- Since:
- 2.2.0
- Event:
EventIds.PROCEED_EVENT_ID,EventIds.INVALID_PROFILE_CTX,EventIds.INVALID_SEC_CFG- Postcondition:
- set the decryption parameters onto the security parameters context
-
Field Summary
FieldsModifier and TypeFieldDescriptionStrategy used to lookup a per-requestDecryptionConfigurationlist.private final org.slf4j.LoggerClass logger.Strategy used to look up a OIDC client metadata context.Lookup function for relying party context.private DecryptionParametersResolverResolver for parameters to store into context.Strategy used to look up theSecurityParametersContextto set the parameters for. -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprivate CriteriaSetbuildCriteriaSet(ProfileRequestContext profileRequestContext, List<DecryptionConfiguration> configs) Build the criteria used as input to theDecryptionParametersResolver.protected voiddoExecute(ProfileRequestContext profileRequestContext) protected voidvoidsetClientMetadataContextLookupStrategy(Function<ProfileRequestContext, OIDCMetadataContext> strategy) Set lookup strategy forOIDCMetadataContextfor input to resolution.voidsetConfigurationLookupStrategy(Function<ProfileRequestContext, List<DecryptionConfiguration>> strategy) Set the strategy used to look up a per-requestDecryptionConfigurationlist.voidSet the resolver to use for the parameters to store into the context.voidSet lookup strategy for relying party context.voidsetSecurityParametersContextLookupStrategy(Function<ProfileRequestContext, SecurityParametersContext> strategy) Set the strategy used to look up theSecurityParametersContextto set the parameters for.Methods inherited from class net.shibboleth.idp.profile.AbstractProfileAction
doExecute, execute, getBean, getBean, getMessage, getMessage, getMessage, getParameter, getParameter, getProfileContextLookupStrategy, getRequestContext, getResult, setMessageSource, setProfileContextLookupStrategyMethods inherited from class org.opensaml.profile.action.AbstractConditionalProfileAction
doPreExecute, getActivationCondition, setActivationConditionMethods inherited from class org.opensaml.profile.action.AbstractProfileAction
doPostExecute, doPostExecute, ensureHttpServletRequest, ensureHttpServletResponse, execute, getHttpServletRequest, getHttpServletRequestSupplier, getHttpServletResponse, getHttpServletResponseSupplier, getLogPrefix, isPreExecuteCalled, setHttpServletRequestSupplier, setHttpServletResponseSupplierMethods inherited from class net.shibboleth.shared.component.AbstractInitializableComponent
checkComponentActive, checkSetterPreconditions, destroy, doDestroy, ifDestroyedThrowDestroyedComponentException, ifInitializedThrowUnmodifiabledComponentException, ifNotInitializedThrowUninitializedComponentException, initialize, isDestroyed, isInitializedMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface net.shibboleth.shared.component.InitializableComponent
initialize, isInitialized
-
Field Details
-
log
@Nonnull private final org.slf4j.Logger logClass logger. -
securityParametersContextLookupStrategy
@Nonnull private Function<ProfileRequestContext,SecurityParametersContext> securityParametersContextLookupStrategyStrategy used to look up theSecurityParametersContextto set the parameters for. -
configurationLookupStrategy
@NonnullAfterInit private Function<ProfileRequestContext,List<DecryptionConfiguration>> configurationLookupStrategyStrategy used to lookup a per-requestDecryptionConfigurationlist. -
oidcClientMetadataContextLookupStrategy
@Nullable private Function<ProfileRequestContext,OIDCMetadataContext> oidcClientMetadataContextLookupStrategyStrategy used to look up a OIDC client metadata context. -
relyingPartyContextLookupStrategy
@Nonnull private Function<ProfileRequestContext,RelyingPartyContext> relyingPartyContextLookupStrategyLookup function for relying party context. -
resolver
Resolver for parameters to store into context.
-
-
Constructor Details
-
PopulateJWTDecryptionParameters
public PopulateJWTDecryptionParameters()Constructor.
-
-
Method Details
-
setRelyingPartyContextLookupStrategy
public void setRelyingPartyContextLookupStrategy(@Nonnull Function<ProfileRequestContext, RelyingPartyContext> strategy) Set lookup strategy for relying party context.- Parameters:
strategy- lookup strategy
-
setDecryptionParametersResolver
Set the resolver to use for the parameters to store into the context.- Parameters:
newResolver- resolver to use
-
setConfigurationLookupStrategy
public void setConfigurationLookupStrategy(@Nonnull Function<ProfileRequestContext, List<DecryptionConfiguration>> strategy) Set the strategy used to look up a per-requestDecryptionConfigurationlist.- Parameters:
strategy- lookup strategy
-
setSecurityParametersContextLookupStrategy
public void setSecurityParametersContextLookupStrategy(@Nonnull Function<ProfileRequestContext, SecurityParametersContext> strategy) Set the strategy used to look up theSecurityParametersContextto set the parameters for.- Parameters:
strategy- lookup strategy
-
setClientMetadataContextLookupStrategy
public void setClientMetadataContextLookupStrategy(@Nullable Function<ProfileRequestContext, OIDCMetadataContext> strategy) Set lookup strategy forOIDCMetadataContextfor input to resolution.- Parameters:
strategy- lookup strategy
-
doInitialize
- Overrides:
doInitializein classAbstractInitializableComponent- Throws:
ComponentInitializationException
-
doExecute
- Overrides:
doExecutein classAbstractProfileAction
-
buildCriteriaSet
@Nonnull private CriteriaSet buildCriteriaSet(@Nonnull ProfileRequestContext profileRequestContext, @Nonnull List<DecryptionConfiguration> configs) Build the criteria used as input to theDecryptionParametersResolver.- Parameters:
profileRequestContext- current profile request contextconfigs- a list ofDecryptionConfigurations to add to the criteria set.- Returns:
- the criteria set to use
-