anuengineer 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_r321372069
 
 

 ##########
 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:
   Yes, And see my comment above. The fact that Illegal key size is the result 
of Java Security policy is not very obvious. If you can add that to your throw 
or log statement, it would be really good. Then the user realizes why it is 
failing. The issue more precisely is that this is client code; we have no 
control over where or on what machines this code is run. It is quite possible 
that when the Ozone cluster is being setup the Admins installed the right 
policy; but some client machine may not have that. If the key has been written 
by a client with 256 bits length, then the new client has no choice but the use 
the same algorithm to decode it. Communicating that issue to the user might 
save some pain for them.

----------------------------------------------------------------
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]

Reply via email to