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

ASF GitHub Bot logged work on BEAM-6292:
----------------------------------------

                Author: ASF GitHub Bot
            Created on: 13/Feb/19 10:05
            Start Date: 13/Feb/19 10:05
    Worklog Time Spent: 10m 
      Work Description: mblmat commented on pull request #7348: [BEAM-6292] 
PasswordDecrypter: Delay decryption / Avoid serialization
URL: https://github.com/apache/beam/pull/7348#discussion_r256323741
 
 

 ##########
 File path: 
sdks/java/io/cassandra/src/main/java/org/apache/beam/sdk/io/cassandra/CassandraServiceImpl.java
 ##########
 @@ -284,12 +287,16 @@ private Cluster getCluster(
       int port,
       String username,
       String password,
+      PasswordDecrypter passwordDecrypter,
       String localDc,
       String consistencyLevel) {
     Cluster.Builder builder =
         Cluster.builder().addContactPoints(hosts.toArray(new 
String[0])).withPort(port);
 
     if (username != null) {
+      if (passwordDecrypter != null) {
+        password = passwordDecrypter.decrypt(password);
 
 Review comment:
   @echauchot You're right, currently the password neither encrypted nor 
decrypted.
   I understand your determination to not expose additional parameters. I can 
provide a default password decrypter, such an encryption system based on a key 
(AES, RSA, ...) but in this case and without configuration, the (private) key 
will also be serialized in the pipeline.
   Therefore, with any encryption system, we must configure an external 
parameter, otherwise the encryption information will be serialized in the 
pipeline.
 
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
[email protected]


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

    Worklog Id:     (was: 198007)
    Time Spent: 3h  (was: 2h 50m)

> PasswordDecrypter: Delay decryption / Avoid serialization
> ---------------------------------------------------------
>
>                 Key: BEAM-6292
>                 URL: https://issues.apache.org/jira/browse/BEAM-6292
>             Project: Beam
>          Issue Type: Improvement
>          Components: io-java-cassandra
>            Reporter: Mathieu Blanchard
>            Assignee: Mathieu Blanchard
>            Priority: Minor
>              Labels: triaged
>          Time Spent: 3h
>  Remaining Estimate: 0h
>
> Currently, the password is decrypted before the serialization of the pipeline 
> and this causes the raw version to be visible to everyone on the staging 
> location.
> To avoid this, we delayed the decryption of the password when connecting to 
> the cluster, which ensures that the raw password is never serialized in the 
> pipeline.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

Reply via email to