public class DirectKmsMaterialProvider extends Object implements EncryptionMaterialsProvider
AWSKMS. Currently, the HashKey, RangeKey, and TableName will be
included in the KMS EncryptionContext for wrapping/unwrapping the key. This
means that records cannot be copied/moved between tables without re-encryption.| Constructor and Description |
|---|
DirectKmsMaterialProvider(com.amazonaws.services.kms.AWSKMS kms) |
DirectKmsMaterialProvider(com.amazonaws.services.kms.AWSKMS kms,
String encryptionKeyId) |
DirectKmsMaterialProvider(com.amazonaws.services.kms.AWSKMS kms,
String encryptionKeyId,
Map<String,String> materialDescription) |
| Modifier and Type | Method and Description |
|---|---|
DecryptionMaterials |
getDecryptionMaterials(EncryptionContext context)
Retrieves encryption materials matching the specified description from some source.
|
protected String |
getEncryptionKeyId()
Get encryption key id.
|
EncryptionMaterials |
getEncryptionMaterials(EncryptionContext context)
Returns EncryptionMaterials which the caller can use for encryption.
|
void |
refresh()
Forces this encryption materials provider to refresh its encryption
material.
|
protected String |
selectEncryptionKeyId(EncryptionContext context)
Select encryption key id to be used to generate data key.
|
protected void |
validateEncryptionKeyId(String encryptionKeyId,
EncryptionContext context)
Validate the encryption key id.
|
public DirectKmsMaterialProvider(com.amazonaws.services.kms.AWSKMS kms)
public DirectKmsMaterialProvider(com.amazonaws.services.kms.AWSKMS kms,
String encryptionKeyId,
Map<String,String> materialDescription)
public DirectKmsMaterialProvider(com.amazonaws.services.kms.AWSKMS kms,
String encryptionKeyId)
public DecryptionMaterials getDecryptionMaterials(EncryptionContext context)
EncryptionMaterialsProvidergetDecryptionMaterials in interface EncryptionMaterialsProvidercontext - Information to assist in selecting a the proper return value. The implementation
is free to determine the minimum necessary for successful processing.public EncryptionMaterials getEncryptionMaterials(EncryptionContext context)
EncryptionMaterialsProvidergetEncryptionMaterials in interface EncryptionMaterialsProvidercontext - Information to assist in selecting a the proper return value. The implementation
is free to determine the minimum necessary for successful processing.protected String getEncryptionKeyId()
protected String selectEncryptionKeyId(EncryptionContext context) throws com.amazonaws.services.dynamodbv2.datamodeling.DynamoDBMappingException
encryptionKeyId.context - encryption context.com.amazonaws.services.dynamodbv2.datamodeling.DynamoDBMappingException - when we fails to select a valid encryption key id.protected void validateEncryptionKeyId(String encryptionKeyId, EncryptionContext context) throws com.amazonaws.services.dynamodbv2.datamodeling.DynamoDBMappingException
encryptionKeyId - encryption key id from DecryptResult.context - encryption context.com.amazonaws.services.dynamodbv2.datamodeling.DynamoDBMappingException - when encryptionKeyId is invalid.public void refresh()
EncryptionMaterialsProviderrefresh in interface EncryptionMaterialsProviderCopyright © 2018. All rights reserved.