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_r320893985
##########
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:
@ajayydv The only time this line would create an exception is when the host
does not have JCE policy jars installed as the default secret is 32 chars and
without the JCE policy jars it would throw "java.security.InvalidKeyException:
Illegal key size or default parameters". Since we are throwing the exception
and not bypassing it without successful key generation, a debug statement won't
add much value.
----------------------------------------------------------------
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]