Source From Here
I’ve recently been working on a project that uses a Cassandra database running in a Docker container, with this image. It works great, but it does not have authentication enabled by default. This is because unless you specify otherwise, the authenticator is set to AllowAllAuthenticator.
To enable authentication, just add this line to your Dockerfile:
Now, when you start up your Cassandra Docker container, you’ll be required to specify a username and password to access the database. The default login’s username is cassandra, and the default password is also cassandra. So, if you want to start a cqlsh session, you’ll have to execute (after starting a shell in the container, of course - see this, unless you’ve mapped the container to a host port):
If you have enabled password authentication, you may also want to consider following the procedure outlined here: