Package org.soulwing.s2ks.aws
Class AwsKeyStorage
- java.lang.Object
-
- org.soulwing.s2ks.base.AbstractKeyStorage
-
- org.soulwing.s2ks.base.AbstractMutableKeyStorage
-
- org.soulwing.s2ks.aws.AwsKeyStorage
-
- All Implemented Interfaces:
KeyStorage
,MutableKeyStorage
public class AwsKeyStorage extends AbstractMutableKeyStorage
AMutableKeyStorage
implementation that uses the AWS KMS service as the source for wrapper keys and stores wrapped, encoded keys in an S3 bucket.- Author:
- Carl Harris
-
-
Constructor Summary
Constructors Constructor Description AwsKeyStorage(BlobEncoder blobEncoder, KeyWrapOperator keyWrapOperator, KeyEncoder keyEncoder, MetadataWrapOperator metadataWrapOperator, MetadataEncoder metadataEncoder, MetadataRecognizer metadataRecognizer, MasterKeyService masterKeyService, StorageService storageService)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected java.io.InputStream
getContentStream(java.lang.String path)
protected KeyDescriptor
getSubjectKey(java.util.List<KeyDescriptor> descriptors)
protected java.security.Key
getWrapperKey(java.util.List<KeyDescriptor> descriptors)
protected java.lang.String
idToPath(java.lang.String id, java.lang.String suffix)
protected WrapperKeyResponse
nextWrapperKey()
protected void
storeContent(java.util.List<Blob> blobs, java.lang.String path)
-
Methods inherited from class org.soulwing.s2ks.base.AbstractMutableKeyStorage
store, store
-
Methods inherited from class org.soulwing.s2ks.base.AbstractKeyStorage
getBlobEncoder, retrieve, retrieveWithMetadata
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface org.soulwing.s2ks.KeyStorage
retrieve, retrieveWithMetadata
-
-
-
-
Constructor Detail
-
AwsKeyStorage
public AwsKeyStorage(BlobEncoder blobEncoder, KeyWrapOperator keyWrapOperator, KeyEncoder keyEncoder, MetadataWrapOperator metadataWrapOperator, MetadataEncoder metadataEncoder, MetadataRecognizer metadataRecognizer, MasterKeyService masterKeyService, StorageService storageService)
-
-
Method Detail
-
idToPath
protected java.lang.String idToPath(java.lang.String id, java.lang.String suffix)
- Specified by:
idToPath
in classAbstractKeyStorage
-
getContentStream
protected java.io.InputStream getContentStream(java.lang.String path) throws java.io.IOException
- Specified by:
getContentStream
in classAbstractKeyStorage
- Throws:
java.io.IOException
-
getWrapperKey
protected java.security.Key getWrapperKey(java.util.List<KeyDescriptor> descriptors) throws KeyUnwrapException
- Specified by:
getWrapperKey
in classAbstractKeyStorage
- Throws:
KeyUnwrapException
-
getSubjectKey
protected KeyDescriptor getSubjectKey(java.util.List<KeyDescriptor> descriptors) throws KeyUnwrapException
- Specified by:
getSubjectKey
in classAbstractKeyStorage
- Throws:
KeyUnwrapException
-
nextWrapperKey
protected WrapperKeyResponse nextWrapperKey() throws KeyWrapException
- Specified by:
nextWrapperKey
in classAbstractMutableKeyStorage
- Throws:
KeyWrapException
-
storeContent
protected void storeContent(java.util.List<Blob> blobs, java.lang.String path) throws java.io.IOException
- Specified by:
storeContent
in classAbstractMutableKeyStorage
- Throws:
java.io.IOException
-
-