Was this page helpful?
ScyllaDB Java Driver is available under the Apache v2 License. ScyllaDB Java Driver is a fork of DataStax Java Driver. See Copyright here.
Caution
You're viewing documentation for a previous version of Scylla Java Driver. Switch to the latest stable version.
Cassandra’s binary protocol supports SASL-based authentication.  To enable it, use
Cluster.Builder.withCredentials when building your Cluster instance to provide the credentials
you wish to authenticate with:
Cluster.builder()
  .withCredentials("bob", "mypassword")
  .build();
This is a shortcut for using PlainTextAuthProvider for simple username/password authentication
(intended to work with the server-side PasswordAuthenticator).  This may alternatively be
provided using the Cluster.Builder.withAuthProvider method:
Cluster.builder()
  .withAuthProvider(new PlainTextAuthProvider("bob", "mypassword"))
  .build();
Authentication must be configured before opening a session, it cannot be changed at runtime.
You can also write your own provider; it must implement AuthProvider.
Was this page helpful?
ScyllaDB Java Driver is available under the Apache v2 License. ScyllaDB Java Driver is a fork of DataStax Java Driver. See Copyright here.