[ https://issues.apache.org/jira/browse/BEAM-6292?focusedWorklogId=184750&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-184750 ]
ASF GitHub Bot logged work on BEAM-6292: ---------------------------------------- Author: ASF GitHub Bot Created on: 14/Jan/19 11:02 Start Date: 14/Jan/19 11:02 Worklog Time Spent: 10m Work Description: echauchot commented on pull request #7348: [BEAM-6292] PasswordDecrypter: Delay decryption / Avoid serialization URL: https://github.com/apache/beam/pull/7348#discussion_r247443594 ########## File path: sdks/java/io/cassandra/src/test/java/org/apache/beam/sdk/io/cassandra/CassandraIOIT.java ########## @@ -105,40 +110,76 @@ public static void tearDown() { dropTable(options, KEYSPACE, TABLE); } - /** Tests writing then reading data for a HBase database. */ + /** Tests writing then reading data for a Cassandra database. */ @Test - public void testWriteThenRead() { - runWrite(); - runRead(); + public void test_writeThenRead_nominalCase() { + runWrite( + CassandraIO.<Scientist>write() + .withHosts(options.getCassandraHost()) + .withPort(options.getCassandraPort()) + .withKeyspace(KEYSPACE) + .withEntity(Scientist.class)); + + runRead( + CassandraIO.<Scientist>read() + .withHosts(options.getCassandraHost()) + .withPort(options.getCassandraPort()) + .withMinNumberOfSplits(20) + .withKeyspace(KEYSPACE) + .withTable(TABLE) + .withEntity(Scientist.class) + .withCoder(SerializableCoder.of(Scientist.class))); + } + + /** Tests writing then reading data for a Cassandra database with password decryption. */ + @Test + public void test_writeThenRead_withPasswordDecryption() { Review comment: This test asserts (with a clever way :) ) that the decrypter was used. I would like that you add a default decrypter (as discussed above) and test it also (as UTest this time) ---------------------------------------------------------------- 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: us...@infra.apache.org Issue Time Tracking ------------------- Worklog Id: (was: 184750) Time Spent: 1h 50m (was: 1h 40m) > 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 > Time Spent: 1h 50m > 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)