Skip to content

CASSANDRA-20405 Update and syncronize cql_singlefile.adoc with CQL.textile updates #4112

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: trunk
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 11 additions & 1 deletion doc/modules/cassandra/examples/BNF/alter_role_statement.bnf
Original file line number Diff line number Diff line change
@@ -1 +1,11 @@
alter_role_statement ::= ALTER ROLE [ IF EXISTS ] role_name WITH role_options
alter_role_statement ::= ALTER ROLE [ IF EXISTS ] role_name ( WITH <option> ( AND <option> )* )?

<option> ::= ("HASHED")? PASSWORD = <string>
| GENERATED PASSWORD
| LOGIN = <boolean>
| SUPERUSER = <boolean>
| OPTIONS = <map_literal>
| ACCESS TO DATACENTERS set_literal
| ACCESS TO ALL DATACENTERS
| ACCESS FROM CIDRS set_literal
| ACCESS FROM ALL CIDRS
7 changes: 6 additions & 1 deletion doc/modules/cassandra/examples/BNF/alter_user_statement.bnf
Original file line number Diff line number Diff line change
@@ -1 +1,6 @@
alter_user_statement ::= ALTER USER [ IF EXISTS ] role_name [ WITH [ HASHED ] PASSWORD string] [ user_option]
alter_user_statement ::= ALTER USER ( IF EXISTS ) role_name ( WITH <option> ( AND <option> )* )?

<option> ::= ("HASHED")? PASSWORD = <string>
| GENERATED PASSWORD
| SUPERUSER
| NOSUPERUSER
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ create_role_statement ::= CREATE ROLE [ IF NOT EXISTS ] role_name
role_options ::= role_option ( AND role_option)*
role_option ::= PASSWORD '=' string
| HASHED PASSWORD '=' string
| GENERATED PASSWORD
| LOGIN '=' boolean
| SUPERUSER '=' boolean
| OPTIONS '=' map_literal
Expand Down
9 changes: 5 additions & 4 deletions doc/modules/cassandra/examples/BNF/create_user_statement.bnf
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
create_user_statement ::= CREATE USER [ IF NOT EXISTS ] role_name
[ WITH [ HASHED ] PASSWORD string ]
[ user_option ]
user_option: SUPERUSER | NOSUPERUSER
create_user_statement ::= CREATE USER ( IF NOT EXISTS ) role_name ( WITH <option> ( AND <option> )* )?
<option> ::= ("HASHED")? PASSWORD = <string>
| GENERATED PASSWORD
| SUPERUSER
| NOSUPERUSER
3 changes: 2 additions & 1 deletion doc/modules/cassandra/examples/CQL/alter_role.cql
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
ALTER ROLE bob WITH PASSWORD = 'PASSWORD_B' AND SUPERUSER = false;
ALTER ROLE bob WITH HASHED PASSWORD = '$2a$10$JSJEMFm6GeaW9XxT5JIheuEtPvat6i7uKbnTcxX3c1wshIIsGyUtG' AND SUPERUSER = false;
ALTER ROLE rob WITH LOGIN = true and PASSWORD = 'password_c' AND ACCESS FROM ALL CIDRS;
ALTER ROLE hob WITH LOGIN = true and PASSWORD = 'password_d' AND ACCESS FROM CIDRS { 'region1' };
ALTER ROLE IF EXISTS hob WITH LOGIN = true and PASSWORD = 'password_d' AND ACCESS FROM CIDRS { 'region1' };
ALTER ROLE IF EXISTS hob WITH LOGIN = true and GENERATED PASSWORD;
1 change: 1 addition & 0 deletions doc/modules/cassandra/examples/CQL/create_role.cql
Original file line number Diff line number Diff line change
Expand Up @@ -7,3 +7,4 @@ CREATE ROLE alice WITH PASSWORD = 'password_a' AND LOGIN = true AND ACCESS TO DA
CREATE ROLE alice WITH PASSWORD = 'password_a' AND LOGIN = true AND ACCESS TO ALL DATACENTERS;
CREATE ROLE bob WITH LOGIN = true and PASSWORD = 'password_d' AND ACCESS FROM CIDRS { 'region1', 'region2' };
CREATE ROLE hob WITH LOGIN = true and PASSWORD = 'password_c' AND ACCESS FROM ALL CIDRS;
CREATE ROLE tom WITH LOGIN = true and GENERATED PASSWORD;
1 change: 1 addition & 0 deletions doc/modules/cassandra/examples/CQL/create_user.cql
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
CREATE USER alice WITH PASSWORD 'password_a' SUPERUSER;
CREATE USER bob WITH PASSWORD 'password_b' NOSUPERUSER;
CREATE USER bob WITH HASHED PASSWORD '$2a$10$JSJEMFm6GeaW9XxT5JIheuEtPvat6i7uKbnTcxX3c1wshIIsGyUtG' NOSUPERUSER;
CREATE USER tom WITH GENERATED PASSWORD;
Loading