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 TypeMethodDescriptionvoidgetObjectSecurely(GetObjectRequest req, File destinationFile) voidputLocalObjectSecurely(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:
putObjectSecurelyin classS3CryptoModule<MultipartUploadContext>- Returns:
- the result of the putting the S3 object.
-
getObjectSecurely
- Specified by:
getObjectSecurelyin classS3CryptoModule<MultipartUploadContext>
-
getObjectSecurely
- Specified by:
getObjectSecurelyin classS3CryptoModule<MultipartUploadContext>
-
completeMultipartUploadSecurely
public CompleteMultipartUploadResult completeMultipartUploadSecurely(CompleteMultipartUploadRequest req) throws AmazonClientException, AmazonServiceException - Specified by:
completeMultipartUploadSecurelyin classS3CryptoModule<MultipartUploadContext>- Throws:
AmazonClientExceptionAmazonServiceException
-
abortMultipartUploadSecurely
- Specified by:
abortMultipartUploadSecurelyin classS3CryptoModule<MultipartUploadContext>
-
initiateMultipartUploadSecurely
public InitiateMultipartUploadResult initiateMultipartUploadSecurely(InitiateMultipartUploadRequest req) throws AmazonClientException, AmazonServiceException - Specified by:
initiateMultipartUploadSecurelyin classS3CryptoModule<MultipartUploadContext>- Throws:
AmazonClientExceptionAmazonServiceException
-
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:
uploadPartSecurelyin classS3CryptoModule<MultipartUploadContext>- Throws:
AmazonClientExceptionAmazonServiceException
-
copyPartSecurely
- Specified by:
copyPartSecurelyin classS3CryptoModule<MultipartUploadContext>
-
putInstructionFileSecurely
- Specified by:
putInstructionFileSecurelyin 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:
putLocalObjectSecurelyin classS3CryptoModule<MultipartUploadContext>- Parameters:
uploadId- multipart upload idos- output stream which will be closed upon method completion.- Throws:
IOException
-