hadoop-hdfs-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "ASF GitHub Bot (Jira)" <j...@apache.org>
Subject [jira] [Work logged] (HDDS-2015) Encrypt/decrypt key using symmetric key while writing/reading
Date Sat, 31 Aug 2019 19:26:00 GMT

     [ https://issues.apache.org/jira/browse/HDDS-2015?focusedWorklogId=304870&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-304870
]

ASF GitHub Bot logged work on HDDS-2015:
----------------------------------------

                Author: ASF GitHub Bot
            Created on: 31/Aug/19 19:25
            Start Date: 31/Aug/19 19:25
    Worklog Time Spent: 10m 
      Work Description: anuengineer commented on pull request #1386: HDDS-2015. Encrypt/decrypt
key using symmetric key while writing/reading
URL: https://github.com/apache/hadoop/pull/1386#discussion_r319734108
 
 

 ##########
 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 call is failing in the default tests with 
   `java.security.InvalidKeyException: Illegal key size or default parameters`
 
----------------------------------------------------------------
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:
users@infra.apache.org


Issue Time Tracking
-------------------

    Worklog Id:     (was: 304870)
    Time Spent: 0.5h  (was: 20m)

> Encrypt/decrypt key using symmetric key while writing/reading
> -------------------------------------------------------------
>
>                 Key: HDDS-2015
>                 URL: https://issues.apache.org/jira/browse/HDDS-2015
>             Project: Hadoop Distributed Data Store
>          Issue Type: Sub-task
>            Reporter: Dinesh Chitlangia
>            Assignee: Dinesh Chitlangia
>            Priority: Major
>              Labels: pull-request-available
>          Time Spent: 0.5h
>  Remaining Estimate: 0h
>
> *Key Write Path (Encryption)*
> When a bucket metadata has gdprEnabled=true, we generate the GDPRSymmetricKey and add
it to Key Metadata before we create the Key.
> This ensures that key is encrypted before writing.
> *Key Read Path(Decryption)*
> While reading the Key, we check for gdprEnabled=true and they get the GDPRSymmetricKey
based on secret/algorithm as fetched from Key Metadata.
> Create a stream to decrypt the key and pass it on to client.
> *Test*
> Create Key in GDPR Enabled Bucket -> Read Key -> Verify content is as expected
-> Update Key Metadata to remove the gdprEnabled flag -> Read Key -> Confirm the
content is not as expected.



--
This message was sent by Atlassian Jira
(v8.3.2#803003)

---------------------------------------------------------------------
To unsubscribe, e-mail: hdfs-issues-unsubscribe@hadoop.apache.org
For additional commands, e-mail: hdfs-issues-help@hadoop.apache.org


Mime
View raw message