Package net.shibboleth.sp.profile.impl
Class DoSealerOperation
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.sp.profile.AbstractAgentRequestAction
net.shibboleth.sp.profile.AbstractAgentAction
net.shibboleth.sp.profile.impl.DoSealerOperation
- All Implemented Interfaces:
Component,DestructableComponent,InitializableComponent,ProfileAction,Aware,MessageSource,MessageSourceAware,Action
Action that implements a remote API for SP agents to leverage a
DataSealer.
All contexts are prefixed with IdentifiedComponent.getId() to prevent conflicts across agents.
- Event:
EventIds.PROCEED_EVENT_ID,EventIds.INVALID_MSG_CTX,EventIds.ACCESS_DENIED,EventIds.INVALID_MESSAGE,EventIds.MESSAGE_PROC_ERROR- Precondition:
AgentRequestContext.getOutput().isstruct()
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate DataSealerDataSealerto use.static final StringMember for data to decrypt.static final StringMember for decrypted data.static final StringMember for data to encrypt.static final StringMember for encrypted data.static final StringMember for storage expiration.private DDFInput message.private org.slf4j.LoggerClass logger.private DDFOutput message. -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected voiddoExecute(ProfileRequestContext profileRequestContext) protected voidprotected booleandoPreExecute(ProfileRequestContext profileRequestContext) private DDFdoUnwrap(ProfileRequestContext profileRequestContext, DDF toUnwrap) Perform unwrap operation.private DDFdoWrap(ProfileRequestContext profileRequestContext, DDF toWrap) Perform wrap operation.voidsetDataSealer(DataSealer sealer) Sets theDataSealerto use.Methods inherited from class net.shibboleth.sp.profile.AbstractAgentAction
ensureAgent, getAgentMethods inherited from class net.shibboleth.sp.profile.AbstractAgentRequestAction
ensureAgentRequestContext, getAgentRequestContext, setAgentRequestContextLookupStrategyMethods 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
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
-
ENCRYPT
Member for data to encrypt.- See Also:
-
DECRYPT
Member for data to decrypt.- See Also:
-
EXP
Member for storage expiration.- See Also:
-
ENCRYPTED
Member for encrypted data.- See Also:
-
DECRYPTED
Member for decrypted data.- See Also:
-
log
@Nonnull private org.slf4j.Logger logClass logger. -
dataSealer
DataSealerto use. -
input
Input message. -
output
Output message.
-
-
Constructor Details
-
DoSealerOperation
public DoSealerOperation()
-
-
Method Details
-
doInitialize
- Overrides:
doInitializein classAbstractInitializableComponent- Throws:
ComponentInitializationException
-
doPreExecute
- Overrides:
doPreExecutein classAbstractAgentAction
-
doExecute
- Overrides:
doExecutein classAbstractProfileAction
-
doWrap
@Nonnull private DDF doWrap(@Nonnull ProfileRequestContext profileRequestContext, @Nonnull DDF toWrap) throws DataSealerException Perform wrap operation.- Parameters:
profileRequestContext- profile request contexttoWrap- list of nodes containing data to wrap- Returns:
- a list node containing the encrypted data strings
- Throws:
DataSealerException- if an error is raised
-
doUnwrap
@Nonnull private DDF doUnwrap(@Nonnull ProfileRequestContext profileRequestContext, @Nonnull DDF toUnwrap) throws DataSealerException Perform unwrap operation.- Parameters:
profileRequestContext- profile request contexttoUnwrap- list of nodes containing data to unwrap- Returns:
- a list node containing the decrypted data strings
- Throws:
DataSealerException- if an error is raised