public class MetaStore extends ProviderStore
Currently, this only supports AES-256 in AESWrap mode and HmacSHA256 for the providers persisted in the table.
| Modifier and Type | Class and Description |
|---|---|
static interface |
MetaStore.ExtraDataSupplier
Provides extra data that should be persisted along with the standard material data.
|
| Constructor and Description |
|---|
MetaStore(com.amazonaws.services.dynamodbv2.AmazonDynamoDB ddb,
java.lang.String tableName,
DynamoDBEncryptor encryptor)
Create a new MetaStore with specified table name.
|
MetaStore(com.amazonaws.services.dynamodbv2.AmazonDynamoDB ddb,
java.lang.String tableName,
DynamoDBEncryptor encryptor,
MetaStore.ExtraDataSupplier extraDataSupplier)
Create a new MetaStore with specified table name and extra data supplier.
|
| Modifier and Type | Method and Description |
|---|---|
static com.amazonaws.services.dynamodbv2.model.CreateTableResult |
createTable(com.amazonaws.services.dynamodbv2.AmazonDynamoDB ddb,
java.lang.String tableName,
com.amazonaws.services.dynamodbv2.model.ProvisionedThroughput provisionedThroughput)
Creates a DynamoDB Table with the correct properties to be used with a ProviderStore.
|
long |
getMaxVersion(java.lang.String materialName)
Returns the maximum version number associated with
materialName. |
EncryptionMaterialsProvider |
getOrCreate(java.lang.String materialName,
long nextId)
Returns the provider with the specified name and version and creates it if it doesn't exist.
|
EncryptionMaterialsProvider |
getProvider(java.lang.String materialName,
long version)
Returns the provider with the specified name and version.
|
long |
getVersionFromMaterialDescription(java.util.Map<java.lang.String,java.lang.String> description)
Extracts the material version from
description. |
void |
replicate(java.lang.String materialName,
long version,
MetaStore targetMetaStore)
This API retrieves the intermediate keys from the source region and replicates it in the target
region.
|
getProvider, newProviderpublic MetaStore(com.amazonaws.services.dynamodbv2.AmazonDynamoDB ddb,
java.lang.String tableName,
DynamoDBEncryptor encryptor)
ddb - Interface for accessing DynamoDB.tableName - DynamoDB table name for this MetaStore.encryptor - used to perform crypto operations on the record attributes.public MetaStore(com.amazonaws.services.dynamodbv2.AmazonDynamoDB ddb,
java.lang.String tableName,
DynamoDBEncryptor encryptor,
MetaStore.ExtraDataSupplier extraDataSupplier)
ddb - Interface for accessing DynamoDB.tableName - DynamoDB table name for this MetaStore.encryptor - used to perform crypto operations on the record attributesextraDataSupplier - provides extra data that should be stored along with the material.public EncryptionMaterialsProvider getProvider(java.lang.String materialName, long version)
ProviderStoregetProvider in class ProviderStorepublic EncryptionMaterialsProvider getOrCreate(java.lang.String materialName, long nextId)
ProviderStoregetOrCreate in class ProviderStorepublic long getMaxVersion(java.lang.String materialName)
ProviderStorematerialName. If there are no
versions, returns -1.getMaxVersion in class ProviderStorepublic long getVersionFromMaterialDescription(java.util.Map<java.lang.String,java.lang.String> description)
ProviderStoredescription.getVersionFromMaterialDescription in class ProviderStorepublic void replicate(java.lang.String materialName,
long version,
MetaStore targetMetaStore)
materialName - material name of the encryption material.version - version of the encryption material.targetMetaStore - target MetaStore where the encryption material to be stored.public static com.amazonaws.services.dynamodbv2.model.CreateTableResult createTable(com.amazonaws.services.dynamodbv2.AmazonDynamoDB ddb,
java.lang.String tableName,
com.amazonaws.services.dynamodbv2.model.ProvisionedThroughput provisionedThroughput)
ddb - interface for accessing DynamoDBtableName - name of table that stores the meta data of the material.provisionedThroughput - required provisioned throughput of the this table.