jojochuang commented on code in PR #6219:
URL: https://github.com/apache/ozone/pull/6219#discussion_r1490269870
##########
hadoop-ozone/ozone-manager/src/main/java/org/apache/hadoop/ozone/om/request/file/OMFileCreateRequest.java:
##########
@@ -250,6 +251,12 @@ public OMClientResponse
validateAndUpdateCache(OzoneManager ozoneManager, TermIn
omBucketInfo.getDefaultReplicationConfig(),
ozoneManager);
+ if (omBucketInfo.getEncryptionKeyInfo() != null &&
+ !keyArgs.hasFileEncryptionInfo()) {
+ throw new OMException("Attempting to create unencrypted file " +
+ keyName + " in encrypted bucket " + bucketName, INTERNAL_ERROR);
+ }
Review Comment:
Yeah good point. I thought OMFileCreateRequest and
OMFileCreateRequestWithFSO shares the same validateAndUpdateCache() but they
aren't. Will do add the same check in
OMKeyCreateRequest/OMKeyCreateRequestWithFSO
--
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]