Class CryptoModuleDispatcher
java.lang.Object
com.amazonaws.services.s3.internal.crypto.S3CryptoModule<MultipartUploadContext>
com.amazonaws.services.s3.internal.crypto.CryptoModuleDispatcher
A proxy cryptographic module used to dispatch method calls to the appropriate
underlying cryptographic module depending on the current configuration.
-
Constructor Summary
ConstructorsConstructorDescriptionCryptoModuleDispatcher
(AWSKMSClient kms, com.amazonaws.services.s3.internal.S3Direct s3, AWSCredentialsProvider credentialsProvider, EncryptionMaterialsProvider encryptionMaterialsProvider, CryptoConfiguration cryptoConfig) -
Method Summary
Modifier and TypeMethodDescriptionvoid
getObjectSecurely
(GetObjectRequest req, File destinationFile) void
putLocalObjectSecurely
(UploadObjectRequest req, String uploadId, OutputStream os) putObjectSecurely
(PutObjectRequest putObjectRequest)
-
Constructor Details
-
CryptoModuleDispatcher
public CryptoModuleDispatcher(AWSKMSClient kms, com.amazonaws.services.s3.internal.S3Direct s3, AWSCredentialsProvider credentialsProvider, EncryptionMaterialsProvider encryptionMaterialsProvider, CryptoConfiguration cryptoConfig)
-
-
Method Details
-
putObjectSecurely
- Specified by:
putObjectSecurely
in classS3CryptoModule<MultipartUploadContext>
- Returns:
- the result of the putting the S3 object.
-
getObjectSecurely
- Specified by:
getObjectSecurely
in classS3CryptoModule<MultipartUploadContext>
-
getObjectSecurely
- Specified by:
getObjectSecurely
in classS3CryptoModule<MultipartUploadContext>
-
completeMultipartUploadSecurely
public CompleteMultipartUploadResult completeMultipartUploadSecurely(CompleteMultipartUploadRequest req) throws AmazonClientException, AmazonServiceException - Specified by:
completeMultipartUploadSecurely
in classS3CryptoModule<MultipartUploadContext>
- Throws:
AmazonClientException
AmazonServiceException
-
abortMultipartUploadSecurely
- Specified by:
abortMultipartUploadSecurely
in classS3CryptoModule<MultipartUploadContext>
-
initiateMultipartUploadSecurely
public InitiateMultipartUploadResult initiateMultipartUploadSecurely(InitiateMultipartUploadRequest req) throws AmazonClientException, AmazonServiceException - Specified by:
initiateMultipartUploadSecurely
in classS3CryptoModule<MultipartUploadContext>
- Throws:
AmazonClientException
AmazonServiceException
-
uploadPartSecurely
public UploadPartResult uploadPartSecurely(UploadPartRequest req) throws AmazonClientException, AmazonServiceException NOTE: Because the encryption process requires context from block N-1 in order to encrypt block N, parts uploaded with the AmazonS3EncryptionClient (as opposed to the normal AmazonS3Client) must be uploaded serially, and in order. Otherwise, the previous encryption context isn't available to use when encrypting the current part.
- Specified by:
uploadPartSecurely
in classS3CryptoModule<MultipartUploadContext>
- Throws:
AmazonClientException
AmazonServiceException
-
copyPartSecurely
- Specified by:
copyPartSecurely
in classS3CryptoModule<MultipartUploadContext>
-
putInstructionFileSecurely
- Specified by:
putInstructionFileSecurely
in classS3CryptoModule<MultipartUploadContext>
- Returns:
- the result of putting the instruction file in S3; or null if the
specified S3 object doesn't exist. The S3 object can be
subsequently retrieved using the new instruction file via the
usual get operation by specifying a
EncryptedGetObjectRequest
.
-
putLocalObjectSecurely
public void putLocalObjectSecurely(UploadObjectRequest req, String uploadId, OutputStream os) throws IOException - Specified by:
putLocalObjectSecurely
in classS3CryptoModule<MultipartUploadContext>
- Parameters:
uploadId
- multipart upload idos
- output stream which will be closed upon method completion.- Throws:
IOException
-