Apache Cassandra 2019 Authentication

阅读更多
Apache Cassandra 2019 Authentication

Before
authenticator: AllowAllAuthenticator
After
authenticator: PasswordAuthenticator
Restart the Cassandra Service
Connect to it with the default username and password
> cqlsh -u cassandra -p cassandra 127.0.0.1 9042
Change the default user and password
> CREATE ROLE sillycat WITH PASSWORD = 'kaishi' AND SUPERUSER = true AND LOGIN = true;
Then I can login with the new info
> cqlsh -u sillycat -p kaishi 127.0.0.1 9042
Put the information similar to /.aws/
Create the directory if not exists
> mkdir ~/.cassandra
> cat ~/.cassandra/cqlshrc
[authentication]
username = sillycat
password = kaishi
Do not need to type username and password anymore
> cqlsh 127.0.0.1 9042

References:
https://docs.datastax.com/en/cassandra/3.0/cassandra/configuration/secureConfigNativeAuth.html
https://docs.datastax.com/en/cassandra/3.0/cassandra/configuration/secureLoginCqlsh.html

你可能感兴趣的:(Apache Cassandra 2019 Authentication)