DZone
Thanks for visiting DZone today,
Edit Profile
  • Manage Email Subscriptions
  • How to Post to DZone
  • Article Submission Guidelines
Sign Out View Profile
  • Post an Article
  • Manage My Drafts
Over 2 million developers have joined DZone.
Log In / Join
Please enter at least three characters to search
Refcards Trend Reports
Events Video Library
Refcards
Trend Reports

Events

View Events Video Library

Zones

Culture and Methodologies Agile Career Development Methodologies Team Management
Data Engineering AI/ML Big Data Data Databases IoT
Software Design and Architecture Cloud Architecture Containers Integration Microservices Performance Security
Coding Frameworks Java JavaScript Languages Tools
Testing, Deployment, and Maintenance Deployment DevOps and CI/CD Maintenance Monitoring and Observability Testing, Tools, and Frameworks
Culture and Methodologies
Agile Career Development Methodologies Team Management
Data Engineering
AI/ML Big Data Data Databases IoT
Software Design and Architecture
Cloud Architecture Containers Integration Microservices Performance Security
Coding
Frameworks Java JavaScript Languages Tools
Testing, Deployment, and Maintenance
Deployment DevOps and CI/CD Maintenance Monitoring and Observability Testing, Tools, and Frameworks

Because the DevOps movement has redefined engineering responsibilities, SREs now have to become stewards of observability strategy.

Apache Cassandra combines the benefits of major NoSQL databases to support data management needs not covered by traditional RDBMS vendors.

The software you build is only as secure as the code that powers it. Learn how malicious code creeps into your software supply chain.

Generative AI has transformed nearly every industry. How can you leverage GenAI to improve your productivity and efficiency?

Related

  • Solving the Enduring Pain of Authorization With Aserto’s Co-Founder and CEO, Omri Gazitt
  • Apache Cassandra Horizontal Scalability for Java Applications [Book]
  • Attribute Based Access Control for Mulesoft APIs
  • 10 Node.js Security Practices

Trending

  • Advancing Your Software Engineering Career in 2025
  • Chat With Your Knowledge Base: A Hands-On Java and LangChain4j Guide
  • Build a Simple REST API Using Python Flask and SQLite (With Tests)
  • Efficient API Communication With Spring WebClient
  1. DZone
  2. Data Engineering
  3. Databases
  4. Kerberos Authenticator for Apache Cassandra

Kerberos Authenticator for Apache Cassandra

Explore the Kerberos authenticator for Apache Cassandra.

By 
Justin Cameron user avatar
Justin Cameron
·
Dec. 04, 18 · News
Likes (4)
Comment
Save
Tweet
Share
9.3K Views

Join the DZone community and get the full member experience.

Join For Free

Coming right on the heels of announcing an open source LDAP authenticator for Apache Cassandra, we’re proud to now release an open source Kerberos authenticator. The new project makes Kerberos’ celebrated single sign-on and secure authentication capabilities available to all Apache Cassandra users.

For developers with an existing Kerberos environment, it’ll be pretty darn simple to configure a cluster to use the Kerberos authenticator. But you’ll first need to have a DNS server and a working Kerberos Key Distribution Center (KDC), and to issue each Cassandra node a Kerberos service principal, forward DNS record, and reverse DNS record.

Every Cassandra node and client application must have the ability to reach the DNS server in order to resolve both forward and reverse DNS records. The GSS-API/Kerberos5 SASL mechanism necessitates this by requiring SASL servers (the Cassandra nodes) to include a fully-qualified hostname in their configurations.

Cassandra bases node discovery on the broadcast_rpc_address, making reverse-DNS entries a requirement so that Cassandra nodes and clients can use these IP addresses to establish the fully-qualified hostname of each node. These reverse-DNS entries should have the same value as the broadcast_rpc_address. Because broadcast_rpc_address defaults to the rpc_address if not set, rpc_address should be set to something other than localhost.

After meeting these configuration pre-requisites, installing the Kerberos authenticator is simple: detailed instructions for installing and configuring the authenticator are available on GitHub.

Kerberos Authenticator Plugin for the Cassandra Java Driver

We’ve also published an open-source Kerberos authenticator plugin for the Cassandra Java driver. This plugin supports multiple Kerberos quality-of-protection (QOP) levels, which users can specify in the authenticator’s configuration. The QOP level of the driver and the server authenticator configuration must match, and will only be used during the authentication exchange. Where traffic between the client and Cassandra requires confidentiality and/or integrity protection, devs should rely on Cassandra’s built-in SSL/TLS (when enabled, TLS protects the Kerberos authentication exchange as well).

The Java driver also optionally supports an SASL authorization ID. When used, the Cassandra role specified by this ID will be assumed after the Kerberos client principal is authenticated (as long as the user has permission for that role). Use the GRANT ROLE CQL statement to grant access to other roles.

If no authorization ID is provided, the user will assume the client principal’s Cassandra user or role. Where no Cassandra user or role matches the client principal – and authorization ID when provided – access will not be granted.

This Java driver plugin allows for flexible configuration of the GSS-API mechanism via JAAS. Users can specify the mechanism for providing client credentials to the driver plugin separately from the implementation. Therefore, the client principal’s authentication material can be sourced from a keytab or a valid TGT in the local Kerberos ticket cache, in accordance with the JAAS configuration file contents.

Migrate With Zero Downtime

By using a rolling restart once the configuration is complete, devs can migrate existing clusters from other authentication mechanisms to the Kerberos authenticator without Cassandra experiencing downtime. Importantly, client applications need to be updated to make sure they’re properly configured to use the Kerberos authenticator. Also, to migrate with zero downtime, applications must support Cassandra authentication via both mechanisms. Applications can be modified to attempt to authenticate using the Kerberos authenticator when authentication via the original mechanism fails, thus achieving a zero-downtime transition.

The Cassandra authenticator and Java driver plugin are both available on GitHub and completely free to use under the Apache License v2. The Kerberos authenticator currently supports Cassandra 3.0.x and 3.11.x branches. We welcome improvements and feedback: feel free to open a pull request or an issue ticket on GitHub to report any bugs or suggest features you would like to see included.

Justin Cameron is a Senior Software Engineer at Instaclustr, which provides a managed service platform of open source technologies such as Apache Cassandra, Apache Spark, Elasticsearch and Apache Kafka.

Kerberos (protocol) Apache Cassandra Open source authentication

Opinions expressed by DZone contributors are their own.

Related

  • Solving the Enduring Pain of Authorization With Aserto’s Co-Founder and CEO, Omri Gazitt
  • Apache Cassandra Horizontal Scalability for Java Applications [Book]
  • Attribute Based Access Control for Mulesoft APIs
  • 10 Node.js Security Practices

Partner Resources

×

Comments
Oops! Something Went Wrong

The likes didn't load as expected. Please refresh the page and try again.

ABOUT US

  • About DZone
  • Support and feedback
  • Community research
  • Sitemap

ADVERTISE

  • Advertise with DZone

CONTRIBUTE ON DZONE

  • Article Submission Guidelines
  • Become a Contributor
  • Core Program
  • Visit the Writers' Zone

LEGAL

  • Terms of Service
  • Privacy Policy

CONTACT US

  • 3343 Perimeter Hill Drive
  • Suite 100
  • Nashville, TN 37211
  • support@dzone.com

Let's be friends:

Likes
There are no likes...yet! 👀
Be the first to like this post!
It looks like you're not logged in.
Sign in to see who liked this post!