steveloughran commented on code in PR #6874:
URL: https://github.com/apache/hadoop/pull/6874#discussion_r1677840394
##########
hadoop-tools/hadoop-aws/src/test/java/org/apache/hadoop/fs/s3a/auth/delegation/TestS3ADelegationTokenSupport.java:
##########
@@ -76,7 +76,7 @@ public void testSessionTokenDecode() throws Throwable {
renewer,
new URI("s3a://anything/"),
new MarshalledCredentials("a", "b", ""),
- new EncryptionSecrets(S3AEncryptionMethods.SSE_S3, ""),
+ new EncryptionSecrets(S3AEncryptionMethods.SSE_S3, "", ""),
Review Comment:
extend test to verify the secrets are round tripped correctly
##########
hadoop-tools/hadoop-aws/src/main/java/org/apache/hadoop/fs/s3a/S3AUtils.java:
##########
@@ -1402,6 +1406,79 @@ public static String getS3EncryptionKey(
}
}
+ /**
+ * Get any SSE context, without propagating exceptions from
+ * JCEKs files.
+ * @param bucket bucket to query for
+ * @param conf configuration to examine
+ * @return the encryption context value or ""
+ * @throws IllegalArgumentException bad arguments.
+ */
+ public static String getS3EncryptionContext(
Review Comment:
1. `FunctionalIO.uncheckIOExceptions()` can do the wrapping now. Though If
it is for tests, why bother?
2. If new methods in production code are needed, lets start a new
S3AEncryption class in fs.s3a.impl for this stuff, S3AUtils is too big and
while leaving it alone helps backports, there's no need to make things worse
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]