Skip to content

ability to enable audits in SSL enabled cassandra backend#23

Open
chaitrarao04 wants to merge 1 commit intoapache:masterfrom
chaitrarao04:master
Open

ability to enable audits in SSL enabled cassandra backend#23
chaitrarao04 wants to merge 1 commit intoapache:masterfrom
chaitrarao04:master

Conversation

@chaitrarao04
Copy link
Copy Markdown

@chaitrarao04 chaitrarao04 commented Feb 4, 2019

The existing code in CassandraBasedAuditRepository can write audits only to cassandra that does not have SSL enabled and credentials setup.

The fix in this PR reads the truststore certificate location, truststore password, cassandra username, cassandra password from the application properties and establishes connection to cassandra over SSL. Thus enabling enabling audits to be persisted in SSL/Credentials enabled Cassandra datastore.


Cluster cluster = null;
if (isSSLEnabled) {
if (StringUtils.isNotEmpty(username) && StringUtils.isNotEmpty(password)) {
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

User credentials should not be locked into ssl, there are scenarios where only authentication is enought.

public static final String CASSANDRA_SSL_TRUSTSTORE_PASSWORD = "atlas.graph.storage.cassandra.ssl.truststore.password";

// cassandra login credentials
public static final String CASSANDRA_USERNAME = "atlas.graph.storage.username";
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The user credentials could use different properties, so you can have different users for audit and atlas keyspaces.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants