liveBook · Manning

Authentication

As explained in ScyllaDB in Action

Authentication is the process of verifying an application or user's identity before granting access to a database or service.

Authentication verifies an application or user's identity before ScyllaDB grants access. Valid credentials provide a baseline security boundary for database connections and operations. section 9.1.4

ScyllaDB provides three authenticator choices:

  • AllowAllAuthenticator accepts every connection and remains the default. section 9.1.4
  • PasswordAuthenticator requires every connection to present a valid username and password. section 9.1.4
  • TransitionalAuthenticator validates supplied credentials while still permitting anonymous connections, enabling a gradual migration without downtime. section 9.1.4

Enabling password authentication can immediately break applications that lack credentials. Increase the system_auth keyspace replication factor to the cluster's total node count so node unavailability does not prevent login. section 9.1.4

Securing the reviews application

Enable PasswordAuthenticator and CassandraAuthorizer in scylla.yaml, drain and restart the Scylla container, then create a reviews_api role. Configure the Python driver with PlainTextAuthProvider using that role's credentials. The application can connect and query reviews, but cannot drop the reviews keyspace when authorization is configured. section 10.6.1 section 10.6.3

Figure 9.3 In your Scylla cluster are three authenticators: one to allow everything, one that allows only valid users with correct credentials, and one to facilitate transitioning to authentication without downtime.
figure

Compare the three connection paths: unrestricted access, credential-enforced access, and transitional access. section 9.1.4

How ScyllaDB in Action covers it

How deep it goes
Explains authenticator behavior, migration risks, replication requirements, configuration changes, restarts, roles, and driver credentials.
Examples
Uses AllowAllAuthenticator, PasswordAuthenticator, TransitionalAuthenticator, a reviews_api role, Docker configuration, and PlainTextAuthProvider.
What it assumes
Assumes access to a ScyllaDB cluster and its configuration, while teaching credential setup and application connection from the default open configuration.
What you can do after
Configure ScyllaDB authentication and connect an application through the Python driver with valid credentials.
How it connects
Connects authentication with authorization, credentials, roles, the Python database driver, and CassandraAuthorizer.

Also explained in

Compare how 34 books explain authentication →

Related concepts

This explainer was generated by Manning's knowledge graph from the text of ScyllaDB in Action. The section links point to the parts of the book it draws on.