dineshchitlangia commented on a change in pull request #1386: HDDS-2015.
Encrypt/decrypt key using symmetric key while writing/reading
URL: https://github.com/apache/hadoop/pull/1386#discussion_r321430004
##########
File path:
hadoop-ozone/client/src/main/java/org/apache/hadoop/ozone/client/rpc/RpcClient.java
##########
@@ -601,6 +605,16 @@ public OzoneOutputStream createKey(
HddsClientUtils.verifyResourceName(volumeName, bucketName);
HddsClientUtils.checkNotNull(keyName, type, factor);
String requestId = UUID.randomUUID().toString();
+
+ if(Boolean.valueOf(metadata.get(OzoneConsts.GDPR_FLAG))){
+ try{
+ GDPRSymmetricKey gKey = new GDPRSymmetricKey();
+ metadata.putAll(gKey.getKeyDetails());
+ }catch (Exception e) {
+ throw new IOException(e);
Review comment:
@anuengineer thanks for elaborating, @ajayydv thanks for original suggestion.
I have added an ERROR message before throwing the exception.
----------------------------------------------------------------
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.
For queries about this service, please contact Infrastructure at:
[email protected]
With regards,
Apache Git Services
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]