Apache Cassandra 2019 Authentication
ApacheCassandra2019Authentication
Before
authenticator:AllowAllAuthenticator
After
authenticator:PasswordAuthenticator
RestarttheCassandraService
Connecttoitwiththedefaultusernameandpassword
>cqlsh-ucassandra-pcassandra127.0.0.19042
Changethedefaultuserandpassword
>CREATEROLEsillycatWITHPASSWORD='kaishi'ANDSUPERUSER=trueANDLOGIN=true;
ThenIcanloginwiththenewinfo
>cqlsh-usillycat-pkaishi127.0.0.19042
Puttheinformationsimilarto/.aws/
Createthedirectoryifnotexists
>mkdir~/.cassandra
>cat~/.cassandra/cqlshrc
[authentication]
username=sillycat
password=kaishi
Donotneedtotypeusernameandpasswordanymore
>cqlsh127.0.0.19042
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