Class VerifySignatureService
- All Implemented Interfaces:
AdaptrisComponent,ComponentLifecycle,ComponentLifecycleExtension,ConfigComment,ConnectedService,MessageEventGenerator,Service,StateManagedComponent
If the signature does not verify for any reason then a normal ServiceException will 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 -
Method Summary
Modifier and TypeMethodDescriptionvoiddoService(AdaptrisMessage msg) MessageWrapper<byte[]>The data that needs to be checked against the signature.MessageWrapper<byte[]>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.withDataToBeVerified(MessageWrapper<byte[]> w) withSignature(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, getComments, getContinueOnFail, getIsTrackingEndpoint, getUniqueId, init, isBranching, isTrackingEndpoint, requestClose, requestInit, requestStart, requestStop, retrieveComponentState, setComments, 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.ConfigComment
getComments, setCommentsMethods 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
-
VerifySignatureService
public VerifySignatureService()
-
-
Method Details
-
prepare
- Specified by:
preparein interfaceComponentLifecycleExtension- Overrides:
preparein classAWSKMSServiceImpl- Throws:
CoreException
-
doService
- Throws:
ServiceException
-
withSignature
-
withDataToBeVerified
-
getSignature
The source of the signature.Where the signature is stored; it's probably going to be a
ByteArrayFromMetadataor similar. -
setSignature
The source of the signature.Where the signature is stored; it's probably going to be a
ByteArrayFromMetadataor similar. -
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
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.
-