Class S3AEncryption

java.lang.Object
org.apache.hadoop.fs.s3a.impl.S3AEncryption

public final class S3AEncryption extends Object
Utility methods for S3A encryption properties.
  • Method Details

    • getS3EncryptionContext

      public static String getS3EncryptionContext(String bucket, org.apache.hadoop.conf.Configuration conf) throws IOException
      Get any SSE context from a configuration/credential provider.
      Parameters:
      bucket - bucket to query for
      conf - configuration to examine
      Returns:
      the encryption context value or ""
      Throws:
      IOException - if reading a JCEKS file raised an IOE
      IllegalArgumentException - bad arguments.
    • getS3EncryptionContextBase64Encoded

      public static String getS3EncryptionContextBase64Encoded(String bucket, org.apache.hadoop.conf.Configuration conf, boolean propagateExceptions) throws IOException
      Get any SSE context from a configuration/credential provider. This includes converting the values to a base64-encoded UTF-8 string holding JSON with the encryption context key-value pairs
      Parameters:
      bucket - bucket to query for
      conf - configuration to examine
      propagateExceptions - should IO exceptions be rethrown?
      Returns:
      the Base64 encryption context or ""
      Throws:
      IllegalArgumentException - bad arguments.
      IOException - if propagateExceptions==true and reading a JCEKS file raised an IOE