Class GenerateSignatureService
- All Implemented Interfaces:
AdaptrisComponent,ComponentLifecycle,ComponentLifecycleExtension,ConnectedService,MessageEventGenerator,Service,StateManagedComponent
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 -
Method Summary
Modifier and TypeMethodDescriptionvoiddoService(AdaptrisMessage msg) MessageWrapper<byte[]>getInput()The data to be signed.Where to store the signature that was generated.voidprepare()voidsetInput(MessageWrapper<byte[]> input) The data to be signed.voidsetOutput(MessageWrapper<OutputStream> output) Where to store the signature that was generated.withInput(MessageWrapper<byte[]> w) Methods inherited from class com.adaptris.aws.kms.SignatureService
extendedLogging, getExtendedLogging, getMessageType, getSigningAlgorithm, messageType, setExtendedLogging, setMessageType, setSigningAlgorithm, signingAlgorithm, withMessageType, withSigningAlgorithmMethods inherited from class com.adaptris.aws.kms.AWSKMSServiceImpl
awsClient, closeService, getConnection, getKeyId, initService, setConnection, setKeyId, start, stop, withConnection, withKeyIdMethods 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, setUniqueIdMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface com.adaptris.core.AdaptrisComponent
getUniqueIdMethods inherited from interface com.adaptris.core.ComponentLifecycle
close, initMethods inherited from interface com.adaptris.core.MessageEventGenerator
createName, createQualifier, isTrackingEndpointMethods inherited from interface com.adaptris.core.Service
continueOnFailure, isBranching, setUniqueIdMethods inherited from interface com.adaptris.core.StateManagedComponent
changeState, requestClose, requestInit, requestStart, requestStop, retrieveComponentState
-
Constructor Details
-
GenerateSignatureService
public GenerateSignatureService()
-
-
Method Details
-
prepare
- Specified by:
preparein interfaceComponentLifecycleExtension- Overrides:
preparein classAWSKMSServiceImpl- Throws:
CoreException
-
doService
- Throws:
ServiceException
-
withInput
-
withOutput
-
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
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
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
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.
-