Database Reference
In-Depth Information
The following code snippet is the way to connect via a Cassandra Thrift Java-based cli-
ent with a secure server:
TSSLTransportFactory.TSSLTransportParameters params =
new
TSSLTransportFactory.TSSLTransportParameters();
params.setTrustStore("path to .truststore",
"trustore password");
transport =
TSSLTransportFactory.getClientSocket("localhost", 7001,
10000, params);
TProtocol protocol = new TBinaryProtocol(transport);
Cassandra.Client client = new Cassandra.Client(protocol);
Here 7011 is the SSL port. The rest is similar to the Cassandra-cli way. Open the
client socket using SSL-configured transport parameters (e.g., configure truststore path,
password, and SSL transport factory).
That's how we can connect to the Cassandra server via command-line clients and
the Java-based Thrift client.
Summary
To summarize, the topics discussed in this chapter are as follows:
Managing user roles and privileges via super and non-superusers
Preparing SSL encryption certificates for client-server and internode
communication
Connecting via various clients to secure a Cassandra server.
That ends our discussion around data security and user management with Cas-
sandra.
The next chapter will move closer to large data analytics by discussing batch pro-
cessing using Hadoop's MapReduce algorithm and how to run the MapReduce pro-
gram over Cassandra using the Cassandra file system as both input and output!
Search WWH ::




Custom Search