cassandra-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Sam Tunnicliffe (JIRA)" <j...@apache.org>
Subject [jira] [Updated] (CASSANDRA-8850) clean up options syntax for create/alter role
Date Tue, 03 Mar 2015 15:49:05 GMT

     [ https://issues.apache.org/jira/browse/CASSANDRA-8850?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]

Sam Tunnicliffe updated CASSANDRA-8850:
---------------------------------------
    Attachment: 8850.txt

Attached patch removes the ordering constraints on options supplied to {{(CREATE|ALTER) ROLE}}
statements. Also, the {{WITH}} and {{AND}} become optional, allowing for syntax like:

{code}
CREATE ROLE r WITH LOGIN AND PASSWORD = 'foo';
CREATE ROLE r WITH PASSWORD 'foo' AND LOGIN AND SUPERUSER;
CREATE ROLE r WITH SUPERUSER LOGIN PASSWORD = 'foo';
CREATE ROLE r NOLOGIN; // compatibility with existing syntax
CREATE ROLE r WITH PASSWORD = 'foo' LOGIN SUPERUSER;  // compatibility with existing syntax
{code}

All of the existing dtests in test_auth.py & test_auth_roles.py still pass and I added
some unit tests to verify the various permutations of the syntax.

{{(CREATE|ALTER) USER}} remains as before. That is, only the following form is supported:

{code}
CREATE USER u WITH PASSWORD 'foo' SUPERUSER;
{code}

> clean up options syntax for create/alter role 
> ----------------------------------------------
>
>                 Key: CASSANDRA-8850
>                 URL: https://issues.apache.org/jira/browse/CASSANDRA-8850
>             Project: Cassandra
>          Issue Type: Improvement
>            Reporter: Sam Tunnicliffe
>            Assignee: Sam Tunnicliffe
>            Priority: Minor
>             Fix For: 3.0
>
>         Attachments: 8850.txt
>
>
> {{CREATE/ALTER ROLE}} syntax would be improved by using {{WITH}} and {{AND}} in a way
more consistent with other statements.
> e.g. {{CREATE ROLE foo WITH LOGIN AND SUPERUSER AND PASSWORD 'password'}}



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Mime
View raw message