Class GenerateSignatureService
- java.lang.Object
-
- com.adaptris.core.ServiceImp
-
- com.adaptris.aws.kms.AWSKMSServiceImpl
-
- com.adaptris.aws.kms.SignatureService
-
- com.adaptris.aws.kms.GenerateSignatureService
-
- All Implemented Interfaces:
AdaptrisComponent,ComponentLifecycle,ComponentLifecycleExtension,ConnectedService,MessageEventGenerator,Service,StateManagedComponent
@ComponentProfile(summary="Signing via AWS KMS", recommended=AWSKMSConnection.class, since="3.10.1") public class GenerateSignatureService extends SignatureServiceGenerate a signature using AWS KMS.In the adapter configuration file this class is aliased as aws-kms-signing which is the preferred alternative to the fully qualified classname when building your configuration.
-
-
Field Summary
-
Fields inherited from class com.adaptris.core.ServiceImp
log
-
-
Constructor Summary
Constructors Constructor Description GenerateSignatureService()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voiddoService(AdaptrisMessage msg)MessageWrapper<byte[]>getInput()The data to be signed.MessageWrapper<java.io.OutputStream>getOutput()Where to store the signature that was generated.voidprepare()voidsetInput(MessageWrapper<byte[]> input)The data to be signed.voidsetOutput(MessageWrapper<java.io.OutputStream> output)Where to store the signature that was generated.GenerateSignatureServicewithInput(MessageWrapper<byte[]> w)GenerateSignatureServicewithOutput(MessageWrapper<java.io.OutputStream> w)-
Methods inherited from class com.adaptris.aws.kms.SignatureService
extendedLogging, getExtendedLogging, getMessageType, getSigningAlgorithm, messageType, setExtendedLogging, setMessageType, setSigningAlgorithm, signingAlgorithm, withMessageType, withSigningAlgorithm
-
Methods inherited from class com.adaptris.aws.kms.AWSKMSServiceImpl
awsClient, closeService, getConnection, getKeyId, initService, setConnection, setKeyId, start, stop, withConnection, withKeyId
-
Methods inherited from class com.adaptris.core.ServiceImp
changeState, close, continueOnFailure, createName, createQualifier, getContinueOnFail, getIsTrackingEndpoint, getUniqueId, init, isBranching, isTrackingEndpoint, requestClose, requestInit, requestStart, requestStop, retrieveComponentState, setContinueOnFail, setIsTrackingEndpoint, setUniqueId
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface com.adaptris.core.AdaptrisComponent
getUniqueId
-
Methods inherited from interface com.adaptris.core.ComponentLifecycle
close, init
-
Methods inherited from interface com.adaptris.core.MessageEventGenerator
createName, createQualifier, isTrackingEndpoint
-
Methods inherited from interface com.adaptris.core.Service
continueOnFailure, isBranching, setUniqueId
-
Methods inherited from interface com.adaptris.core.StateManagedComponent
changeState, requestClose, requestInit, requestStart, requestStop, retrieveComponentState
-
-
-
-
Method Detail
-
prepare
public void prepare() throws CoreException- Specified by:
preparein interfaceComponentLifecycleExtension- Overrides:
preparein classAWSKMSServiceImpl- Throws:
CoreException
-
doService
public void doService(AdaptrisMessage msg) throws ServiceException
- Throws:
ServiceException
-
withInput
public GenerateSignatureService withInput(MessageWrapper<byte[]> w)
-
withOutput
public GenerateSignatureService withOutput(MessageWrapper<java.io.OutputStream> w)
-
getInput
public MessageWrapper<byte[]> getInput()
The data to be signed.Since KMS enforces a 4096 byte max on the data that can be used with it; this is likely to be a hash of the payload, so again a
ByteArrayFromMetadataor similar where you have previously generated a hash of the data.
-
setInput
public void setInput(MessageWrapper<byte[]> input)
The data to be signed.Since KMS enforces a 4096 byte max on the data that can be used with it; this is likely to be a hash of the payload, so again a
ByteArrayFromMetadataor similar where you have previously generated a hash of the data.
-
getOutput
public MessageWrapper<java.io.OutputStream> getOutput()
Where to store the signature that was generated.Since the signature will be an opaque set of bytes; you probably want to use
MetadataStreamOutputor similar to encode the signature before storing it as metadata.
-
setOutput
public void setOutput(MessageWrapper<java.io.OutputStream> output)
Where to store the signature that was generated.Since the signature will be an opaque set of bytes; you probably want to use
MetadataStreamOutputor similar to encode the signature before storing it as metadata.
-
-