Cassandra sign-in authentication authorization

Source: Internet
Author: User
Tags cassandra

The login verification mechanism of Cassandra is independent and the data is shared by the cluster

Reference: http://blog.csdn.net/y_y_y_k_k_k_k/article/category/5943357

1, the initial installation after the login is like this:

2, in the relational database, we generally have a user name, password login, then Cassandra How to configure, you must use the user name password login it.

Very simple, modify the configuration file Cassandra.yaml

Vim Confg/cassandra.yaml

Authenticator:passwordauthenticator

Authorizer:cassandraauthorizer

Restart Cassandra and use the./cqlsh 192.168.0.101 again, this time the login failed, the system prompts as follows:

3, use the following script to specify the user name password to log on successfully

With Passwordauthenticator, Cassandra will create a super user by default, with both username and password: Cassandra

4, then, how to modify the Super user's password?

After executing the CQL statement, the password is immediately modified to take effect.

5. CQL syntax for operation user is listed below

6. Authorization

Object Rights Management is based on internal authorization and is similar to the relational database Grant/revoke syntax.

Grammar

GRANT permission_name Permission

| (GRANT all PERMISSIONS) On (Resource) to (USER_NAME)

REVOKE (Permission_name permission)

| (REVOKE all PERMISSIONS)

On resource from user_name

LIST permission_name Permission

| (LIST all PERMISSIONS)

On resource of user_name

Norecursive

where Permission_name is

All

Alter

Authorize

CREATE

DROP

MODIFY

SELECT

Resource for

All Keyspaces

Keyspace Keyspace_name

TABLE Keyspace_name.table_name

Cassandra sign-in authentication authorization

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.