How do you create the first user in Cassandra DB

后端 未结 4 575
逝去的感伤
逝去的感伤 2021-01-01 13:37

How does one create the first user in a cassandra database?

I tried:

CREATE USER username WITH PASSWORD \"\";

and its says:

4条回答
  •  情深已故
    2021-01-01 14:19

    Re: Once you have enabled Authentication and Authorization (from the Mar 6 at 14:41 comment by BryceAtNetwork23)

    First, is changing authorization required in order to setup authentication? I'm guessing not.

    Second, setting up authorization is not exactly trivial if you have data center style replication setup. I setup authorization using the following steps:

    • In conf/cassandra.yaml, changed authenticator from AllowAllAuthenticator to PasswordAuthenticator for all nodes
    • Rebooted all nodes
    • Changed the default 'cassandra' password as described above and added other superusers
    • Altered the system_auth keyspace to be redundant (as per instructions in the cassandra.yaml file) by running: "ALTER KEYSPACE system_auth WITH REPLICATION = {'class': 'NetworkTopologyStrategy', 'MY_DATACENTER_NAME':N }"
    • I set N was set to the number of nodes in my datacenter (ie., fully redundant)
    • Ran bin/nodetool repair on each node serially

    Does this sound reasonable to people who know what they're doing?

提交回复
热议问题