Configuring Authentication
Some Cassandra databases require authentication for access, while all Astra databases require authentication. You can configure the Simba Cassandra JDBC Connector to authenticate your connection to the database by providing the necessary credentials.For more information, see the following:
- Configuring Authentication for Cassandra Databases
- Configuring Authentication for Astra Databases
- Configuring Kerberos Authentication
You provide this information to the connector in the connection URL. For more information about the syntax of the connection URL, see Building the Connection URL.
Configuring Authentication for Cassandra Databases
Some Cassandra databases require you to authenticate your connection by providing a user name and password.
To configure authentication for Cassandra databases:
- Set the
AuthMech
property to1
. - Set the
UID
property to an appropriate user name for accessing the database. - Set the
PWD
property to the password corresponding to the user name you provided.
For example:
jdbc:cassandra://localhost:9000;AuthMech=1;UID=simba;PWD=simba123
Configuring Authentication for Astra Databases
To connect to an Astra database, you must authenticate your connection by providing a user name, password, and secure connection bundle.
To obtain the secure connection bundle associated with your Astra database, download it from the DataStax Constellation console. For more information, see "Obtaining database credentials" in the DataStax Astra documentation: https://docs.datastax.com/en/astra/aws/doc/dscloud/astra/dscloudObtainingCredentials.html.
To configure authentication for Astra databases:
- Set the
AuthMech
property to2
. - Set the
UID
property to an appropriate user name for accessing the database. - Set the
PWD
property to the password corresponding to the user name you provided. - Set the
SecureConnectionBundlePath
property to the full path and name of the secure connection bundle associated with your Astra database. To make sure that the connection URL is compatible with all JDBC applications, escape the backslashes (\
) in your file path by typing another backslash.
For example:
jdbc:cassandra://;AuthMech=2;UID=simba;PWD=simba123;SecureConnectionBundlePath="C:\\Users\\admin\\Documents\\Astra\\secure-connect-simba_database.zip"