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_r319744512
##########
File path:
hadoop-ozone/client/src/main/java/org/apache/hadoop/ozone/client/rpc/RpcClient.java
##########
@@ -1099,6 +1126,23 @@ private OzoneOutputStream
createOutputStream(OpenKeySession openKey,
decrypted.getMaterial(), feInfo.getIV());
return new OzoneOutputStream(cryptoOut);
} else {
+ try{
+ GDPRSymmetricKey gk;
+ Map<String, String> openKeyMetadata =
+ openKey.getKeyInfo().getMetadata();
+ if(Boolean.valueOf(openKeyMetadata.get(OzoneConsts.GDPR_FLAG))){
+ gk = new GDPRSymmetricKey(
+ openKeyMetadata.get(OzoneConsts.GDPR_SECRET),
+ openKeyMetadata.get(OzoneConsts.GDPR_ALGORITHM)
+ );
+ gk.getCipher().init(Cipher.ENCRYPT_MODE, gk.getSecretKey());
Review comment:
This is because the environment where these tests are failing may not have
the Java Cryptography Extension (JCE) Unlimited Strength Jurisdiction Policy
Files for the JDK.
@anuengineer Looks like this error may be happening on your local machine. I
do not see this issue in Jenkins run. Can you try installing the JCE policy
jars and let me know if the error resurfaces?
----------------------------------------------------------------
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]