diff --git a/README.md b/README.md index 16a1b402..7f0aa15f 100644 --- a/README.md +++ b/README.md @@ -103,7 +103,7 @@ You can download the [latest snapshot release][download] or pick it up from Mave com.amazonaws aws-dynamodb-encryption-java - 0.0.9-SNAPSHOT + 1.11.0 ``` @@ -163,4 +163,4 @@ For signing, the user specified signing key can be either symmetric or asymmetri [materialprovider]: src/main/java/com/amazonaws/services/dynamodbv2/datamodeling/encryption/providers/EncryptionMaterialsProvider.java [privatekey]: http://docs.oracle.com/javase/7/docs/api/java/security/PrivateKey.html [secretkey]: http://docs.oracle.com/javase/7/docs/api/javax/crypto/SecretKey.html -[download]: https://github.com/awslabs/aws-dynamodb-encryption-java/releases/tag/0.0.9-SNAPSHOT +[download]: https://github.com/awslabs/aws-dynamodb-encryption-java/releases/tag/1.11.0 diff --git a/pom.xml b/pom.xml index 79af6e6b..06724c4f 100644 --- a/pom.xml +++ b/pom.xml @@ -3,7 +3,7 @@ com.amazonaws aws-dynamodb-encryption-java - 0.0.9-SNAPSHOT + 1.11.0 jar aws-dynamodb-encryption-java @@ -39,7 +39,7 @@ com.amazonaws aws-java-sdk-bom - 1.10.63 + 1.11.15 pom import diff --git a/src/test/java/com/amazonaws/services/dynamodbv2/testing/FakeKMS.java b/src/test/java/com/amazonaws/services/dynamodbv2/testing/FakeKMS.java index eea69c8b..d1e457bf 100644 --- a/src/test/java/com/amazonaws/services/dynamodbv2/testing/FakeKMS.java +++ b/src/test/java/com/amazonaws/services/dynamodbv2/testing/FakeKMS.java @@ -25,7 +25,7 @@ import com.amazonaws.AmazonWebServiceRequest; import com.amazonaws.ResponseMetadata; import com.amazonaws.regions.Region; -import com.amazonaws.services.kms.AWSKMS; +import com.amazonaws.services.kms.AbstractAWSKMS; import com.amazonaws.services.kms.model.CancelKeyDeletionRequest; import com.amazonaws.services.kms.model.CancelKeyDeletionResult; import com.amazonaws.services.kms.model.CreateAliasRequest; @@ -77,28 +77,11 @@ import com.amazonaws.services.kms.model.UpdateAliasRequest; import com.amazonaws.services.kms.model.UpdateKeyDescriptionRequest; -public class FakeKMS implements AWSKMS { +public class FakeKMS extends AbstractAWSKMS { private static final SecureRandom rnd = new SecureRandom(); private static final String ACCOUNT_ID = "01234567890"; private final Map results_ = new HashMap<>(); - @Override - public void createAlias(CreateAliasRequest arg0) throws AmazonServiceException, - AmazonClientException { - throw new UnsupportedOperationException(); - } - - @Override - public CreateGrantResult createGrant(CreateGrantRequest arg0) throws AmazonServiceException, - AmazonClientException { - throw new UnsupportedOperationException(); - } - - @Override - public CreateKeyResult createKey() throws AmazonServiceException, AmazonClientException { - return createKey(new CreateKeyRequest()); - } - @Override public CreateKeyResult createKey(CreateKeyRequest req) throws AmazonServiceException, AmazonClientException { @@ -123,42 +106,6 @@ public DecryptResult decrypt(DecryptRequest req) throws AmazonServiceException, } } - @Override - public void deleteAlias(DeleteAliasRequest arg0) throws AmazonServiceException, - AmazonClientException { - throw new UnsupportedOperationException(); - } - - @Override - public DescribeKeyResult describeKey(DescribeKeyRequest arg0) throws AmazonServiceException, - AmazonClientException { - throw new UnsupportedOperationException(); - } - - @Override - public void disableKey(DisableKeyRequest arg0) throws AmazonServiceException, - AmazonClientException { - throw new UnsupportedOperationException(); - } - - @Override - public void disableKeyRotation(DisableKeyRotationRequest arg0) throws AmazonServiceException, - AmazonClientException { - throw new UnsupportedOperationException(); - } - - @Override - public void enableKey(EnableKeyRequest arg0) throws AmazonServiceException, - AmazonClientException { - throw new UnsupportedOperationException(); - } - - @Override - public void enableKeyRotation(EnableKeyRotationRequest arg0) throws AmazonServiceException, - AmazonClientException { - throw new UnsupportedOperationException(); - } - @Override public EncryptResult encrypt(EncryptRequest req) throws AmazonServiceException, AmazonClientException { @@ -208,123 +155,6 @@ public GenerateDataKeyWithoutPlaintextResult generateDataKeyWithoutPlaintext( generateDataKey.getCiphertextBlob()).withKeyId(req.getKeyId()); } - @Override - public GenerateRandomResult generateRandom() throws AmazonServiceException, - AmazonClientException { - throw new UnsupportedOperationException(); - } - - @Override - public GenerateRandomResult generateRandom(GenerateRandomRequest arg0) - throws AmazonServiceException, AmazonClientException { - throw new UnsupportedOperationException(); - } - - @Override - public ResponseMetadata getCachedResponseMetadata(AmazonWebServiceRequest arg0) { - throw new UnsupportedOperationException(); - } - - @Override - public GetKeyPolicyResult getKeyPolicy(GetKeyPolicyRequest arg0) throws AmazonServiceException, - AmazonClientException { - throw new UnsupportedOperationException(); - } - - @Override - public GetKeyRotationStatusResult getKeyRotationStatus(GetKeyRotationStatusRequest arg0) - throws AmazonServiceException, AmazonClientException { - throw new UnsupportedOperationException(); - } - - @Override - public ListAliasesResult listAliases() throws AmazonServiceException, AmazonClientException { - throw new UnsupportedOperationException(); - } - - @Override - public ListAliasesResult listAliases(ListAliasesRequest arg0) throws AmazonServiceException, - AmazonClientException { - throw new UnsupportedOperationException(); - } - - @Override - public ListGrantsResult listGrants(ListGrantsRequest arg0) throws AmazonServiceException, - AmazonClientException { - throw new UnsupportedOperationException(); - } - - @Override - public ListKeyPoliciesResult listKeyPolicies(ListKeyPoliciesRequest arg0) - throws AmazonServiceException, AmazonClientException { - throw new UnsupportedOperationException(); - } - - @Override - public ListKeysResult listKeys() throws AmazonServiceException, AmazonClientException { - throw new UnsupportedOperationException(); - } - - @Override - public ListKeysResult listKeys(ListKeysRequest arg0) throws AmazonServiceException, - AmazonClientException { - throw new UnsupportedOperationException(); - } - - @Override - public void putKeyPolicy(PutKeyPolicyRequest arg0) throws AmazonServiceException, - AmazonClientException { - throw new UnsupportedOperationException(); - } - - @Override - public ReEncryptResult reEncrypt(ReEncryptRequest arg0) throws AmazonServiceException, - AmazonClientException { - throw new UnsupportedOperationException(); - } - - @Override - public void retireGrant() throws AmazonServiceException, - AmazonClientException { - throw new UnsupportedOperationException(); - } - - @Override - public void retireGrant(RetireGrantRequest arg0) throws AmazonServiceException, - AmazonClientException { - throw new UnsupportedOperationException(); - } - - @Override - public void revokeGrant(RevokeGrantRequest arg0) throws AmazonServiceException, - AmazonClientException { - throw new UnsupportedOperationException(); - } - - @Override - public void updateAlias(UpdateAliasRequest req) throws AmazonServiceException, - AmazonClientException { - throw new UnsupportedOperationException(); - } - - @Override - public ScheduleKeyDeletionResult scheduleKeyDeletion(ScheduleKeyDeletionRequest scheduleKeyDeletionRequest) - throws AmazonServiceException, AmazonClientException { - throw new UnsupportedOperationException(); - } - - @Override - public ListRetirableGrantsResult listRetirableGrants(ListRetirableGrantsRequest listRetirableGrantsRequest) - throws AmazonServiceException, AmazonClientException { - throw new UnsupportedOperationException(); - } - - @Override - public CancelKeyDeletionResult cancelKeyDeletion(CancelKeyDeletionRequest cancelKeyDeletionRequest) - throws AmazonServiceException, AmazonClientException { - throw new UnsupportedOperationException(); - } - @Override public void setEndpoint(String arg0) throws IllegalArgumentException { // Do nothing @@ -340,12 +170,6 @@ public void shutdown() { // Do nothing } - @Override - public void updateKeyDescription(UpdateKeyDescriptionRequest arg0) - throws AmazonServiceException, AmazonClientException { - throw new UnsupportedOperationException(); - } - public void dump() { System.out.println(results_); }