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
Refcards Trend Reports Events Over 2 million developers have joined DZone. Join Today! Thanks for visiting DZone today,
Edit Profile Manage Email Subscriptions Moderation Admin Console How to Post to DZone Article Submission Guidelines
View Profile
Sign Out
Refcards
Trend Reports
Events
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
Partner Zones AWS Cloud
by AWS Developer Relations
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
Partner Zones
AWS Cloud
by AWS Developer Relations
The Latest "Software Integration: The Intersection of APIs, Microservices, and Cloud-Based Systems" Trend Report
Get the report
  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.

Justin Cameron user avatar by
Justin Cameron
·
Dec. 04, 18 · News
Like (4)
Save
Tweet
Share
7.51K 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.

Popular on DZone

  • Stop Using Spring Profiles Per Environment
  • What Are the Benefits of Java Module With Example
  • Tracking Software Architecture Decisions
  • Building Microservice in Golang

Comments

Partner Resources

X

ABOUT US

  • About DZone
  • Send feedback
  • Careers
  • Sitemap

ADVERTISE

  • Advertise with DZone

CONTRIBUTE ON DZONE

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

LEGAL

  • Terms of Service
  • Privacy Policy

CONTACT US

  • 600 Park Offices Drive
  • Suite 300
  • Durham, NC 27709
  • support@dzone.com
  • +1 (919) 678-0300

Let's be friends: