Class EncryptionSecretOperations

java.lang.Object
org.apache.hadoop.fs.s3a.auth.delegation.EncryptionSecretOperations

public final class EncryptionSecretOperations extends Object
These support operations on EncryptionSecrets which use the AWS SDK operations. Isolating them here ensures that that class is not required on the classpath.
  • Method Details

    • getSSECustomerKey

      public static Optional<String> getSSECustomerKey(EncryptionSecrets secrets)
      Gets the SSE-C client side key if present.
      Parameters:
      secrets - source of the encryption secrets.
      Returns:
      an optional key to attach to a request.
    • getSSEAwsKMSKey

      public static Optional<String> getSSEAwsKMSKey(EncryptionSecrets secrets)
      Gets the SSE-KMS key if present, else let S3 use AWS managed key.
      Parameters:
      secrets - source of the encryption secrets.
      Returns:
      an optional key to attach to a request.
    • getSSEAwsKMSEncryptionContext

      public static Optional<String> getSSEAwsKMSEncryptionContext(EncryptionSecrets secrets)
      Gets the SSE-KMS context if present, else don't set it in the S3 request.
      Parameters:
      secrets - source of the encryption secrets.
      Returns:
      an optional AWS KMS encryption context to attach to a request.