Bringing together the Apache Cassandra experts from the community and DataStax.

Want to learn? Have a question? Want to share your expertise? You are in the right place!

Not sure where to begin? Getting Started

 

question

pranauro_16383 avatar image
pranauro_16383 asked Erick Ramirez answered

How do I connect to Astra using the standalone cqlsh with new tokens?

For months, I have been successfully utilizing a standalone cqlsh on Windows with a secure connect bundle to access Astra. Now, with the new authentication token model, this no longer works. Is there an example of how to utilize cqlsh.py with the new authentication tokens?

astracqlsh
10 |1000 characters needed characters left characters exceeded

Up to 8 attachments (including images) can be used with a maximum of 1.0 MiB each and 10.0 MiB total.

1 Answer

Erick Ramirez avatar image
Erick Ramirez answered

If you've generated an application token for your Astra database, you need to use the client ID + secret in place of the username and password.

The command format is:

$ cd /path/to/cqlsh-astra
$ bin/cqlsh -u client_id -p client_secret -b /path/to/secure-connect-bundle.zip

Note that you need to use a token with appropriate permissions such as R/W User or R/W Svc Acct. Tokens with API* roles will not have cqlsh access.

For full details, see Using the Standalone CQL shell with Astra. Cheers!

Share
10 |1000 characters needed characters left characters exceeded

Up to 8 attachments (including images) can be used with a maximum of 1.0 MiB each and 10.0 MiB total.