Class VerifySignatureService
- java.lang.Object
-
- com.adaptris.core.ServiceImp
-
- com.adaptris.aws.kms.AWSKMSServiceImpl
-
- com.adaptris.aws.kms.SignatureService
-
- com.adaptris.aws.kms.VerifySignatureService
-
- All Implemented Interfaces:
AdaptrisComponent,ComponentLifecycle,ComponentLifecycleExtension,ConnectedService,MessageEventGenerator,Service,StateManagedComponent
@ComponentProfile(summary="Verify a signature using AWS KMS", recommended=AWSKMSConnection.class, since="3.10.1") public class VerifySignatureService extends SignatureServiceVerify a signature using AWS KMS.If the signature does not verify for any reason then a normal
ServiceExceptionwill be thrown.In the adapter configuration file this class is aliased as aws-kms-verify-signature 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 VerifySignatureService()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voiddoService(AdaptrisMessage msg)MessageWrapper<byte[]>getDataToBeVerified()The data that needs to be checked against the signature.MessageWrapper<byte[]>getSignature()The source of the signature.voidprepare()voidsetDataToBeVerified(MessageWrapper<byte[]> dataToBeVerified)The data that needs to be checked against the signature.voidsetSignature(MessageWrapper<byte[]> signature)The source of the signature.VerifySignatureServicewithDataToBeVerified(MessageWrapper<byte[]> w)VerifySignatureServicewithSignature(MessageWrapper<byte[]> 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
-
withSignature
public VerifySignatureService withSignature(MessageWrapper<byte[]> w)
-
withDataToBeVerified
public VerifySignatureService withDataToBeVerified(MessageWrapper<byte[]> w)
-
getSignature
public MessageWrapper<byte[]> getSignature()
The source of the signature.Where the signature is stored; it's probably going to be a
ByteArrayFromMetadataor similar.
-
setSignature
public void setSignature(MessageWrapper<byte[]> signature)
The source of the signature.Where the signature is stored; it's probably going to be a
ByteArrayFromMetadataor similar.
-
getDataToBeVerified
public MessageWrapper<byte[]> getDataToBeVerified()
The data that needs to be checked against the signature.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.
-
setDataToBeVerified
public void setDataToBeVerified(MessageWrapper<byte[]> dataToBeVerified)
The data that needs to be checked against the signature.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.
-
-