SlideShare a Scribd company logo
Securing Cassandra
Not as hard as it sounds
#CassandraSummit
instaclustr.com
Who am I and what do I do?
• Ben Bromhead
• Co-founder and CTO of Instaclustr -> www.instaclustr.com
<sales>
• Instaclustr provides Cassandra-as-a-Service in the cloud.
• Currently in AWS, Azure and IBM Softlayer with more to come.
• We currently manage 150+ nodes for various customers, who do various things with
it.
</sales>
What this talk will cover
• Why do we care about security?
• A meandering tour of Cassandra security controls
• Tips and tricks
Why do we care about security?
Why do we care about security
• Hackers
• Compliance…
• We now have a information security officer / architect
• Some sort of misguided sense of obligation to protecting end user
information?
But I run C* behind a firewall…
• Stops dumb mistakes (running dev scripts on prod)
• Stops malicious internal actors
• Multi data-centre clusters (GL with that VPN…)
• Run in the cloud?
So what do I need to care about?
Confidentiality Integrity
Availability
So what do I need to care about?
Confidentiality
Integrity
Availability
Consistency
PartitionTolerance
Availability
So what do I need to care about?
Confidentiality
Integrity
Availability
Consistency
PartitionTolerance
Availability
So what do I need to care about?
Confidentiality
Integrity
Availability
Consistency
PartitionTolerance
Availability
Access Control
Access Control
• Authentication: org.apache.cassandra.auth.IAuthenticator
• AllowAllAuthenticator - no auth, default
• PasswordAuthentication - username and password auth,
standard db stuff, uses ISaslAuthenticator
• DSE has some others (Kerberos, LDAP)
Access Control
• Authentication:
org.apache.cassandra.auth.IAuthenti
cator
• AllowAllAuthenticator - no auth,
default
Access Control
• Authentication:
org.apache.cassandra.auth.IAuthenti
cator
• AllowAllAuthenticator - no auth,
default
• PasswordAuthentication - username
and password auth, standard db
stuff, uses ISaslAuthenticator
Authentication - General flow
• ServerConnection maintains QueryState, three states:
• UNINITIALIZED
• AUTHENTICATION
• READY
• Driver sends a STARTUP message, then CREDENTIALS/AUTH_RESPONSE.
• CredentialsMessage class calls the defined Authenticators authenticate method and then sets the state
to ready.
• You are then ready to start executing queries and authenticate does not get called again for the life of
the connection. The authenticated user gets stored in the ClientState.
• If your app uses short lived connections, uses a driver that does not pool them (e.g. php), this will hurt.
Authentication -
PasswordAuthentication
• CredentialsMessage calls authenticate which is implemented by
PasswordAuthentication:
• Checks whether you have actually provided a username / password combo
• Queries Cassandra with: SELECT salted_hash FROM system_auth.credentials
WHERE username = ?
• Queries using LOCAL_ONE for all users, except the user “cassandra” which
occurs at QUORUM
• default system_auth keyspace replication is set to 1… this should be set to
all nodes
Access Control
• Authorisation:
org.apache.cassandra.auth.IAuth
orizer
• AllowAllAuthorizer - no
permissions, default
• CassandraAuthorizer - extends
IAuthorizer, must be used with
PasswordAuthenticator
Authorisation - General flow
• CredentialsMessage calls state.getClientState().login(user). Which
checks again if the user exists.
• ClientState provides an authorize method to get permissions for the
logged in user against a specific resource.
• Alter, CreateIndex, DropIndex, Insert/Update, Select and Truncate
all call hasColumnFamilyAccess (or hasKeyspaceAccess) on the
client state to check if an operation is permitted.
• If it isn’t an UnauthorizedException is raised
Authentication - CassandraAuthorizer
• CassandraAuthorizer gets called to return a set of permissions by
Auth.
• Auth wraps these calls in a permissions Cache, otherwise the
authorizer gets called for every single operation.
• CassandraAuthorizer gets passed a user and a resource (keyspace
or cf) and returns the permissions it can find for that user, resource
pair.
• ALL KEYSPACES is treated as the root data resource.
CassandraAuthorizer +
PasswordAuthenticator
• Run these together
• Currently the user lookups and the permissions checks are in the read/write path
(even with the permissions cache).
• Be vigilant with your system_auth replication and keeping it repaired.
• Poorly configured/maintained system_auth keyspace can and will create 0%
availability in your other keyspaces… irrespective of their replication factor
• Don’t use the cassandra user
Auth changes in 2.2
• API has changed to support the concept of roles
• This includes inheritance!
• Roles are first class resources (like keyspaces and tables), so you
can grant permissions on certain roles.
• AuthZ in Cassandra has finally grown up!
Internode Authentication
• Yes it does exist!
• Currently the only provided internode authenticator is AllowAll
• Can be extended to authenticate based on remoteAddress and
port.
• No ability atm to use a shared secret or not, at best would support a
whitelist
Confidentiality
• Internode encryption
• Client <> Node encryption
• Whole disk encryption
ENCRYPTION!!1!
Internode Encryption
• Leverages SSLServerSockets from Netty (native)
• Server certificate stored in KeyStore, trust certificates stored in
TrustStore
• If requires_client_auth == true, the client must provide a certificate
the SSL context can build a chain of trust back to a cert in the
TrustStore.
• This can either be the provided certificate itself, or the CA that
signed that cert.
Configuring encryption
server_encryption_options:	
  
	
  	
  	
  	
  internode_encryption:	
  none	
  #	
  all,	
  none,	
  dc,	
  rack	
  
	
  	
  	
  	
  keystore:	
  conf/.keystore	
  
	
  	
  	
  	
  keystore_password:	
  cassandra	
  
	
  	
  	
  	
  truststore:	
  conf/.truststore	
  
	
  	
  	
  	
  truststore_password:	
  cassandra
Configuring encryption
server_encryption_options:	
  
	
  	
  	
  	
  internode_encryption:	
  none	
  #	
  all,	
  none,	
  dc,	
  rack	
  
	
  	
  	
  	
  keystore:	
  conf/.keystore	
  
	
  	
  	
  	
  keystore_password:	
  cassandra	
  
	
  	
  	
  	
  truststore:	
  conf/.truststore	
  
	
  	
  	
  	
  truststore_password:	
  cassandra
Configuring encryption
server_encryption_options:	
  
…	
  
	
  	
  	
  	
  protocol:	
  TLS	
  #	
  TLSv1.2,	
  SSLv3.0	
  etc	
  
	
  	
  	
  	
  algorithm:	
  SunX509	
  #	
  PKIK	
  
	
  	
  	
  	
  store_type:	
  JKS	
  #	
  support	
  for	
  different	
  
keystrokes	
  
	
  	
  	
  	
  cipher_suites:	
  [TLS_RSA_WITH_AES_128_CBC_SHA,…]	
  
	
  	
  	
  	
  require_client_auth:	
  true
Configuring encryption
• Strongly recommend you download the full strength JCE otherwise
Cassandra will not start with the default cipher suites
• Distribute the CA public cert in the truststore rather than individual
public certificates.
• troubleshooting certificate issues? use the openssl client
Client Encryption
• Pretty much the same as internode encryption under the hood.
• Supports require_client_auth as well
• Must be able to build a chain of trust to a valid certificate within the
truststore
• Does not actually set the AuthenticatedUser based on certificate
CN or anything like that
Configuring client drivers for
encryption
• Your driver will want the its certificates in either PEM, DER or as a
Keystore. Learn to love the openssl cli
• Cqlsh in some recent versions of Cassandra struggles with
requires_client_auth.
• Just use stunnel and plaintext cqlsh
At rest encryption
• Whole disk/volume
• dmcrypt/LUKS
• DSE Transparent Data Encryption (TDE)
• SSTable encryption
• In app encryption
At rest encryption
• dmcrypt/LUKS - up to a few % difference in throughput, minimal
cpu load if using cpus with AES-NI instruction set
• DSE SSTable encryption, we haven’t done any benchmarking but
according to DS there is a slight hit on perf.
• In app -> Variable… makes slice queries really hard
At rest encryption
• dmcrypt/LUKS -> Up to 8 keys per block device, Requires key
management at boot or via crypttab
• DSE TDE, now supports external KMIP servers for external key
management.
• In app -> Key management -> roll your own
At rest encryption
• Should I do it?
• PCI? Yup probably
• Otherwise… the threats it protects against are fairly low risk
• Vulnerable to cold memory attacks (litterally cool ram modules, to
persist state).
• Decryption key kept in memory
• You need to trust your DC/Cloud provider
Application Level Cryptography
• Encrypt data on the client side before writing to Cassandra
• Most secure, most amount of work
Availability
• This should be pretty simple right? RF = 1,000,000
• There are a few things to keep in mind that an unauthenticated
attacker / unprivileged user can do to make things interesting.
Availability
• native_transport_max_threads …
Availability
• native_transport_max_threads is by default set to 128
• unauthenticated messages will take up one of these threads
• use client-auth as the SSL handler will drop the connection before
the message is dropped into the worker pool
Availability
Availability
• System_auth keyspace replication
• Every new session queries this keyspace
• Every new request queries either system_auth or the permissions
cache
• Increase the credential cache time
• Increase your system_auth rf
Availability
• Resource Scheduler
• Default - none
• RoundRobin
• implements a throttle limit - number of requests in flight
• Weight by keyspace
Addendum - JMX Security
• JMX Security
• Pre Cassandra 2.0.14 - Wide open!
• Post Cassandra 2.0.14
• Bind to localhost only
• JVM_OPTS="$JVM_OPTS -
Dcom.sun.management.jmxremote.authenticate=true"
• JVM_OPTS="$JVM_OPTS -Dcom.sun.management.jmxremote.password.file=/
etc/cassandra/jmxremote.password"
Go forth and conquer!
Questions?
… not get conquered

More Related Content

PDF
Securing Cassandra The Right Way
PDF
Hardening cassandra for compliance or paranoia
PDF
Hardening cassandra q2_2016
PDF
Cassandra Day London 2015: Securing Cassandra and DataStax Enterprise
PPTX
Kafka Security
PDF
Seattle C* Meetup: Hardening cassandra for compliance or paranoia
PDF
Kafka security ssl
PPTX
Apache Kafka Security
Securing Cassandra The Right Way
Hardening cassandra for compliance or paranoia
Hardening cassandra q2_2016
Cassandra Day London 2015: Securing Cassandra and DataStax Enterprise
Kafka Security
Seattle C* Meetup: Hardening cassandra for compliance or paranoia
Kafka security ssl
Apache Kafka Security

What's hot (17)

PDF
Training Slides: 302 - Securing Your Cluster With SSL
PDF
The Unintended Risks of Trusting Active Directory
PDF
Securing Kafka
PDF
Paris FOD meetup - kafka security 101
PDF
Dynamic Database Credentials: Security Contingency Planning
PPTX
Apache Knox setup and hive and hdfs Access using KNOX
PDF
Secret Management with Hashicorp’s Vault
PDF
Chickens & Eggs: Managing secrets in AWS with Hashicorp Vault
PPTX
Techdays Finland 2018 - Building secure cloud applications with Azure Key Vault
PPTX
Hashicorp Vault ppt
PPTX
Managing your secrets in a cloud environment
PDF
Managing secrets at scale
PDF
Attacking and Defending Kubernetes - Nithin Jois
PPTX
Golden ticket, pass the ticket mi tm kerberos attacks explained
PDF
Openstack 101
PDF
Using Vault to decouple MySQL Secrets
PDF
Neil Saunders (Beamly) - Securing your AWS Infrastructure with Hashicorp Vault
Training Slides: 302 - Securing Your Cluster With SSL
The Unintended Risks of Trusting Active Directory
Securing Kafka
Paris FOD meetup - kafka security 101
Dynamic Database Credentials: Security Contingency Planning
Apache Knox setup and hive and hdfs Access using KNOX
Secret Management with Hashicorp’s Vault
Chickens & Eggs: Managing secrets in AWS with Hashicorp Vault
Techdays Finland 2018 - Building secure cloud applications with Azure Key Vault
Hashicorp Vault ppt
Managing your secrets in a cloud environment
Managing secrets at scale
Attacking and Defending Kubernetes - Nithin Jois
Golden ticket, pass the ticket mi tm kerberos attacks explained
Openstack 101
Using Vault to decouple MySQL Secrets
Neil Saunders (Beamly) - Securing your AWS Infrastructure with Hashicorp Vault
Ad

Viewers also liked (8)

PDF
Cassandra SF 2015 - Repeatable, Scalable, Reliable, Observable Cassandra
PDF
Pythian: My First 100 days with a Cassandra Cluster
PPTX
Securing Hadoop's REST APIs with Apache Knox Gateway Hadoop Summit June 6th, ...
PPTX
Cassandra Summit 2015: Real World DTCS For Operators
PDF
Cassandra Summit 2015 - A Change of Seasons
PPTX
Apache Ranger
PDF
Ficstar Software: Cassandra Installation to Optimization
PPTX
Securing Hadoop with Apache Ranger
Cassandra SF 2015 - Repeatable, Scalable, Reliable, Observable Cassandra
Pythian: My First 100 days with a Cassandra Cluster
Securing Hadoop's REST APIs with Apache Knox Gateway Hadoop Summit June 6th, ...
Cassandra Summit 2015: Real World DTCS For Operators
Cassandra Summit 2015 - A Change of Seasons
Apache Ranger
Ficstar Software: Cassandra Installation to Optimization
Securing Hadoop with Apache Ranger
Ad

Similar to Cassandra and security (20)

PDF
Securing Cassandra for Compliance
PDF
201504 securing cassandraanddse
PPTX
Cassandra Lunch #92: Securing Apache Cassandra - Managing Roles and Permissions
PDF
Cassandra Security Configuration
PPTX
Cassandra
PPTX
Cassandra Lunch #90: Securing Apache Cassandra
PDF
The Promise and Perils of Encrypting Cassandra Data (Ameesh Divatia, Baffle, ...
PDF
Slides Cassandra
PPTX
DataStax | Best Practices for Securing DataStax Enterprise (Matt Kennedy) | C...
PDF
The Last Pickle: Hardening Apache Cassandra for Compliance (or Paranoia).
PDF
Building a fence around your Hadoop cluster
PDF
Analyzing The Security Features Of Apache Cassandra Database
PDF
Tokyo Cassandra Summit 2014: Apache Cassandra 2.0 + 2.1 by Jonathan Ellis
PDF
Tokyo cassandra conference 2014
PPTX
Attacking Big Data Land
PDF
An Introduction to Apache Cassandra
PDF
Things YouShould Be Doing When Using Cassandra Drivers
PPTX
DataStax | DSE: Bring Your Own Spark (with Enterprise Security) (Artem Aliev)...
PDF
How to Bulletproof Your Scylla Deployment
PDF
The Easiest Way to Configure Security for Clients AND Servers (Dani Traphagen...
Securing Cassandra for Compliance
201504 securing cassandraanddse
Cassandra Lunch #92: Securing Apache Cassandra - Managing Roles and Permissions
Cassandra Security Configuration
Cassandra
Cassandra Lunch #90: Securing Apache Cassandra
The Promise and Perils of Encrypting Cassandra Data (Ameesh Divatia, Baffle, ...
Slides Cassandra
DataStax | Best Practices for Securing DataStax Enterprise (Matt Kennedy) | C...
The Last Pickle: Hardening Apache Cassandra for Compliance (or Paranoia).
Building a fence around your Hadoop cluster
Analyzing The Security Features Of Apache Cassandra Database
Tokyo Cassandra Summit 2014: Apache Cassandra 2.0 + 2.1 by Jonathan Ellis
Tokyo cassandra conference 2014
Attacking Big Data Land
An Introduction to Apache Cassandra
Things YouShould Be Doing When Using Cassandra Drivers
DataStax | DSE: Bring Your Own Spark (with Enterprise Security) (Artem Aliev)...
How to Bulletproof Your Scylla Deployment
The Easiest Way to Configure Security for Clients AND Servers (Dani Traphagen...

Recently uploaded (20)

PDF
Navsoft: AI-Powered Business Solutions & Custom Software Development
PPTX
L1 - Introduction to python Backend.pptx
PPTX
Agentic AI : A Practical Guide. Undersating, Implementing and Scaling Autono...
PPTX
AMADEUS TRAVEL AGENT SOFTWARE | AMADEUS TICKETING SYSTEM
PPTX
Operating system designcfffgfgggggggvggggggggg
PDF
AutoCAD Professional Crack 2025 With License Key
PDF
Design an Analysis of Algorithms I-SECS-1021-03
PDF
Internet Downloader Manager (IDM) Crack 6.42 Build 42 Updates Latest 2025
PDF
wealthsignaloriginal-com-DS-text-... (1).pdf
PDF
17 Powerful Integrations Your Next-Gen MLM Software Needs
PDF
Digital Systems & Binary Numbers (comprehensive )
PPTX
Advanced SystemCare Ultimate Crack + Portable (2025)
PDF
Adobe Illustrator 28.6 Crack My Vision of Vector Design
PDF
EN-Survey-Report-SAP-LeanIX-EA-Insights-2025.pdf
PPTX
Reimagine Home Health with the Power of Agentic AI​
PDF
Adobe Premiere Pro 2025 (v24.5.0.057) Crack free
PPTX
Oracle E-Business Suite: A Comprehensive Guide for Modern Enterprises
PPTX
CHAPTER 2 - PM Management and IT Context
PDF
medical staffing services at VALiNTRY
PDF
Complete Guide to Website Development in Malaysia for SMEs
Navsoft: AI-Powered Business Solutions & Custom Software Development
L1 - Introduction to python Backend.pptx
Agentic AI : A Practical Guide. Undersating, Implementing and Scaling Autono...
AMADEUS TRAVEL AGENT SOFTWARE | AMADEUS TICKETING SYSTEM
Operating system designcfffgfgggggggvggggggggg
AutoCAD Professional Crack 2025 With License Key
Design an Analysis of Algorithms I-SECS-1021-03
Internet Downloader Manager (IDM) Crack 6.42 Build 42 Updates Latest 2025
wealthsignaloriginal-com-DS-text-... (1).pdf
17 Powerful Integrations Your Next-Gen MLM Software Needs
Digital Systems & Binary Numbers (comprehensive )
Advanced SystemCare Ultimate Crack + Portable (2025)
Adobe Illustrator 28.6 Crack My Vision of Vector Design
EN-Survey-Report-SAP-LeanIX-EA-Insights-2025.pdf
Reimagine Home Health with the Power of Agentic AI​
Adobe Premiere Pro 2025 (v24.5.0.057) Crack free
Oracle E-Business Suite: A Comprehensive Guide for Modern Enterprises
CHAPTER 2 - PM Management and IT Context
medical staffing services at VALiNTRY
Complete Guide to Website Development in Malaysia for SMEs

Cassandra and security

  • 1. Securing Cassandra Not as hard as it sounds #CassandraSummit instaclustr.com
  • 2. Who am I and what do I do? • Ben Bromhead • Co-founder and CTO of Instaclustr -> www.instaclustr.com <sales> • Instaclustr provides Cassandra-as-a-Service in the cloud. • Currently in AWS, Azure and IBM Softlayer with more to come. • We currently manage 150+ nodes for various customers, who do various things with it. </sales>
  • 3. What this talk will cover • Why do we care about security? • A meandering tour of Cassandra security controls • Tips and tricks
  • 4. Why do we care about security?
  • 5. Why do we care about security • Hackers • Compliance… • We now have a information security officer / architect • Some sort of misguided sense of obligation to protecting end user information?
  • 6. But I run C* behind a firewall… • Stops dumb mistakes (running dev scripts on prod) • Stops malicious internal actors • Multi data-centre clusters (GL with that VPN…) • Run in the cloud?
  • 7. So what do I need to care about? Confidentiality Integrity Availability
  • 8. So what do I need to care about? Confidentiality Integrity Availability Consistency PartitionTolerance Availability
  • 9. So what do I need to care about? Confidentiality Integrity Availability Consistency PartitionTolerance Availability
  • 10. So what do I need to care about? Confidentiality Integrity Availability Consistency PartitionTolerance Availability
  • 12. Access Control • Authentication: org.apache.cassandra.auth.IAuthenticator • AllowAllAuthenticator - no auth, default • PasswordAuthentication - username and password auth, standard db stuff, uses ISaslAuthenticator • DSE has some others (Kerberos, LDAP)
  • 14. Access Control • Authentication: org.apache.cassandra.auth.IAuthenti cator • AllowAllAuthenticator - no auth, default • PasswordAuthentication - username and password auth, standard db stuff, uses ISaslAuthenticator
  • 15. Authentication - General flow • ServerConnection maintains QueryState, three states: • UNINITIALIZED • AUTHENTICATION • READY • Driver sends a STARTUP message, then CREDENTIALS/AUTH_RESPONSE. • CredentialsMessage class calls the defined Authenticators authenticate method and then sets the state to ready. • You are then ready to start executing queries and authenticate does not get called again for the life of the connection. The authenticated user gets stored in the ClientState. • If your app uses short lived connections, uses a driver that does not pool them (e.g. php), this will hurt.
  • 16. Authentication - PasswordAuthentication • CredentialsMessage calls authenticate which is implemented by PasswordAuthentication: • Checks whether you have actually provided a username / password combo • Queries Cassandra with: SELECT salted_hash FROM system_auth.credentials WHERE username = ? • Queries using LOCAL_ONE for all users, except the user “cassandra” which occurs at QUORUM • default system_auth keyspace replication is set to 1… this should be set to all nodes
  • 17. Access Control • Authorisation: org.apache.cassandra.auth.IAuth orizer • AllowAllAuthorizer - no permissions, default • CassandraAuthorizer - extends IAuthorizer, must be used with PasswordAuthenticator
  • 18. Authorisation - General flow • CredentialsMessage calls state.getClientState().login(user). Which checks again if the user exists. • ClientState provides an authorize method to get permissions for the logged in user against a specific resource. • Alter, CreateIndex, DropIndex, Insert/Update, Select and Truncate all call hasColumnFamilyAccess (or hasKeyspaceAccess) on the client state to check if an operation is permitted. • If it isn’t an UnauthorizedException is raised
  • 19. Authentication - CassandraAuthorizer • CassandraAuthorizer gets called to return a set of permissions by Auth. • Auth wraps these calls in a permissions Cache, otherwise the authorizer gets called for every single operation. • CassandraAuthorizer gets passed a user and a resource (keyspace or cf) and returns the permissions it can find for that user, resource pair. • ALL KEYSPACES is treated as the root data resource.
  • 20. CassandraAuthorizer + PasswordAuthenticator • Run these together • Currently the user lookups and the permissions checks are in the read/write path (even with the permissions cache). • Be vigilant with your system_auth replication and keeping it repaired. • Poorly configured/maintained system_auth keyspace can and will create 0% availability in your other keyspaces… irrespective of their replication factor • Don’t use the cassandra user
  • 21. Auth changes in 2.2 • API has changed to support the concept of roles • This includes inheritance! • Roles are first class resources (like keyspaces and tables), so you can grant permissions on certain roles. • AuthZ in Cassandra has finally grown up!
  • 22. Internode Authentication • Yes it does exist! • Currently the only provided internode authenticator is AllowAll • Can be extended to authenticate based on remoteAddress and port. • No ability atm to use a shared secret or not, at best would support a whitelist
  • 23. Confidentiality • Internode encryption • Client <> Node encryption • Whole disk encryption ENCRYPTION!!1!
  • 24. Internode Encryption • Leverages SSLServerSockets from Netty (native) • Server certificate stored in KeyStore, trust certificates stored in TrustStore • If requires_client_auth == true, the client must provide a certificate the SSL context can build a chain of trust back to a cert in the TrustStore. • This can either be the provided certificate itself, or the CA that signed that cert.
  • 25. Configuring encryption server_encryption_options:          internode_encryption:  none  #  all,  none,  dc,  rack          keystore:  conf/.keystore          keystore_password:  cassandra          truststore:  conf/.truststore          truststore_password:  cassandra
  • 26. Configuring encryption server_encryption_options:          internode_encryption:  none  #  all,  none,  dc,  rack          keystore:  conf/.keystore          keystore_password:  cassandra          truststore:  conf/.truststore          truststore_password:  cassandra
  • 27. Configuring encryption server_encryption_options:   …          protocol:  TLS  #  TLSv1.2,  SSLv3.0  etc          algorithm:  SunX509  #  PKIK          store_type:  JKS  #  support  for  different   keystrokes          cipher_suites:  [TLS_RSA_WITH_AES_128_CBC_SHA,…]          require_client_auth:  true
  • 28. Configuring encryption • Strongly recommend you download the full strength JCE otherwise Cassandra will not start with the default cipher suites • Distribute the CA public cert in the truststore rather than individual public certificates. • troubleshooting certificate issues? use the openssl client
  • 29. Client Encryption • Pretty much the same as internode encryption under the hood. • Supports require_client_auth as well • Must be able to build a chain of trust to a valid certificate within the truststore • Does not actually set the AuthenticatedUser based on certificate CN or anything like that
  • 30. Configuring client drivers for encryption • Your driver will want the its certificates in either PEM, DER or as a Keystore. Learn to love the openssl cli • Cqlsh in some recent versions of Cassandra struggles with requires_client_auth. • Just use stunnel and plaintext cqlsh
  • 31. At rest encryption • Whole disk/volume • dmcrypt/LUKS • DSE Transparent Data Encryption (TDE) • SSTable encryption • In app encryption
  • 32. At rest encryption • dmcrypt/LUKS - up to a few % difference in throughput, minimal cpu load if using cpus with AES-NI instruction set • DSE SSTable encryption, we haven’t done any benchmarking but according to DS there is a slight hit on perf. • In app -> Variable… makes slice queries really hard
  • 33. At rest encryption • dmcrypt/LUKS -> Up to 8 keys per block device, Requires key management at boot or via crypttab • DSE TDE, now supports external KMIP servers for external key management. • In app -> Key management -> roll your own
  • 34. At rest encryption • Should I do it? • PCI? Yup probably • Otherwise… the threats it protects against are fairly low risk • Vulnerable to cold memory attacks (litterally cool ram modules, to persist state). • Decryption key kept in memory • You need to trust your DC/Cloud provider
  • 35. Application Level Cryptography • Encrypt data on the client side before writing to Cassandra • Most secure, most amount of work
  • 36. Availability • This should be pretty simple right? RF = 1,000,000 • There are a few things to keep in mind that an unauthenticated attacker / unprivileged user can do to make things interesting.
  • 38. Availability • native_transport_max_threads is by default set to 128 • unauthenticated messages will take up one of these threads • use client-auth as the SSL handler will drop the connection before the message is dropped into the worker pool
  • 40. Availability • System_auth keyspace replication • Every new session queries this keyspace • Every new request queries either system_auth or the permissions cache • Increase the credential cache time • Increase your system_auth rf
  • 41. Availability • Resource Scheduler • Default - none • RoundRobin • implements a throttle limit - number of requests in flight • Weight by keyspace
  • 42. Addendum - JMX Security • JMX Security • Pre Cassandra 2.0.14 - Wide open! • Post Cassandra 2.0.14 • Bind to localhost only • JVM_OPTS="$JVM_OPTS - Dcom.sun.management.jmxremote.authenticate=true" • JVM_OPTS="$JVM_OPTS -Dcom.sun.management.jmxremote.password.file=/ etc/cassandra/jmxremote.password"
  • 43. Go forth and conquer! Questions? … not get conquered