public abstract class AbstractEncryptAction extends AbstractConditionalProfileAction
The EncryptionContext
governing the encryption process is located by a lookup
strategy, by default a child of the outbound message context.
An optional recipient name is also obtained from a lookup strategy.
Modifier and Type | Field and Description |
---|---|
private Encrypter |
encrypter
The encryption object.
|
private com.google.common.base.Function<ProfileRequestContext,EncryptionContext> |
encryptionCtxLookupStrategy
Strategy used to locate the
EncryptionContext . |
private com.google.common.base.Predicate<ProfileRequestContext> |
encryptToSelf
Predicate used to determine whether to perform encrypt-to-self.
|
private com.google.common.base.Function<net.shibboleth.utilities.java.support.collection.Pair<ProfileRequestContext,org.opensaml.xmlsec.EncryptionParameters>,List<org.opensaml.xmlsec.EncryptionParameters>> |
encryptToSelfParametersStrategy
Strategy used to resolve the encrypt-to-self parameters.
|
private com.google.common.base.Function<ProfileRequestContext,Encrypter.KeyPlacement> |
keyPlacementLookupStrategy
Strategy used to determine encrypted key placement.
|
private org.slf4j.Logger |
log
Class logger.
|
private com.google.common.base.Function<ProfileRequestContext,String> |
recipientLookupStrategy
Strategy used to locate the encryption recipient.
|
private com.google.common.base.Function<ProfileRequestContext,String> |
selfRecipientLookupStrategy
Strategy used to obtain the self recipient value.
|
Constructor and Description |
---|
AbstractEncryptAction()
Constructor.
|
Modifier and Type | Method and Description |
---|---|
protected boolean |
doPreExecute(ProfileRequestContext profileRequestContext) |
protected abstract org.opensaml.xmlsec.EncryptionParameters |
getApplicableParameters(EncryptionContext ctx)
Return the right set of parameters for the operation to be performed, or none if no encryption should occur.
|
Encrypter |
getEncrypter()
Get the encrypter.
|
void |
setEncryptionContextLookupStrategy(com.google.common.base.Function<ProfileRequestContext,EncryptionContext> strategy)
Set the strategy used to locate the
EncryptionContext associated with a given
ProfileRequestContext . |
void |
setEncryptToSelf(com.google.common.base.Predicate<ProfileRequestContext> predicate)
Set the predicate used to determine whether to perform encrypt-to-self.
|
void |
setEncryptToSelfParametersStrategy(com.google.common.base.Function<net.shibboleth.utilities.java.support.collection.Pair<ProfileRequestContext,org.opensaml.xmlsec.EncryptionParameters>,List<org.opensaml.xmlsec.EncryptionParameters>> strategy)
Set the strategy used to resolve the encrypt-to-self parameters.
|
void |
setKeyPlacementLookupStrategy(com.google.common.base.Function<ProfileRequestContext,Encrypter.KeyPlacement> strategy)
Set the strategy used to determine the encrypted key placement strategy.
|
void |
setRecipientLookupStrategy(com.google.common.base.Function<ProfileRequestContext,String> strategy)
Set the strategy used to locate the encryption recipient.
|
void |
setSelfRecipientLookupStrategy(com.google.common.base.Function<ProfileRequestContext,String> strategy)
Set the strategy used to locate the self identity value to use.
|
getActivationCondition, setActivationCondition
doExecute, doPostExecute, doPostExecute, execute, getHttpServletRequest, getHttpServletResponse, getLogPrefix, setHttpServletRequest, setHttpServletResponse
destroy, doDestroy, doInitialize, initialize, isDestroyed, isInitialized
@Nonnull private final org.slf4j.Logger log
@Nonnull private com.google.common.base.Function<ProfileRequestContext,EncryptionContext> encryptionCtxLookupStrategy
EncryptionContext
.@Nullable private com.google.common.base.Function<ProfileRequestContext,String> recipientLookupStrategy
@Nonnull private com.google.common.base.Function<ProfileRequestContext,Encrypter.KeyPlacement> keyPlacementLookupStrategy
@Nonnull private com.google.common.base.Predicate<ProfileRequestContext> encryptToSelf
@Nullable private com.google.common.base.Function<net.shibboleth.utilities.java.support.collection.Pair<ProfileRequestContext,org.opensaml.xmlsec.EncryptionParameters>,List<org.opensaml.xmlsec.EncryptionParameters>> encryptToSelfParametersStrategy
@Nullable private com.google.common.base.Function<ProfileRequestContext,String> selfRecipientLookupStrategy
public void setEncryptionContextLookupStrategy(@Nonnull com.google.common.base.Function<ProfileRequestContext,EncryptionContext> strategy)
EncryptionContext
associated with a given
ProfileRequestContext
.strategy
- lookup strategypublic void setRecipientLookupStrategy(@Nonnull com.google.common.base.Function<ProfileRequestContext,String> strategy)
strategy
- lookup strategypublic void setKeyPlacementLookupStrategy(@Nonnull com.google.common.base.Function<ProfileRequestContext,Encrypter.KeyPlacement> strategy)
strategy
- lookup strategypublic void setEncryptToSelf(@Nonnull com.google.common.base.Predicate<ProfileRequestContext> predicate)
predicate
- the encrypt-to-self predicatepublic void setEncryptToSelfParametersStrategy(@Nullable com.google.common.base.Function<net.shibboleth.utilities.java.support.collection.Pair<ProfileRequestContext,org.opensaml.xmlsec.EncryptionParameters>,List<org.opensaml.xmlsec.EncryptionParameters>> strategy)
strategy
- the encrypt-to-self predicatepublic void setSelfRecipientLookupStrategy(@Nullable com.google.common.base.Function<ProfileRequestContext,String> strategy)
strategy
- lookup strategyprotected boolean doPreExecute(@Nonnull ProfileRequestContext profileRequestContext)
doPreExecute
in class AbstractConditionalProfileAction
@Nullable protected abstract org.opensaml.xmlsec.EncryptionParameters getApplicableParameters(@Nullable EncryptionContext ctx)
ctx
- possibly null input context to pull parameters fromCopyright © 1999–2020 Shibboleth Consortium. All rights reserved.