[ 
https://issues.apache.org/jira/browse/CASSANDRA-18092?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17854664#comment-17854664
 ] 

Ling Mao commented on CASSANDRA-18092:
--------------------------------------

You need to do something like the following. IIRC, mysql 8.0+ also have the 
same rule.

 
{code:java}
cassandra@cqlsh> CREATE ROLE IF NOT EXISTS '123test' WITH 
PASSWORD='somepassword' AND LOGIN=true;
cassandra@cqlsh> list roles;
 role      | super | login | options | datacenters
-----------+-------+-------+---------+-------------
   123test | False |  True |        {} |         ALL
 cassandra |  True |  True |        {} |         ALL
      test | False |  True |        {} |         ALL
   test123 | False |  True |        {} |         ALL
(4 rows)
{code}
 

> Allow DB role names to prefix with a number
> -------------------------------------------
>
>                 Key: CASSANDRA-18092
>                 URL: https://issues.apache.org/jira/browse/CASSANDRA-18092
>             Project: Cassandra
>          Issue Type: Improvement
>          Components: Feature/Authorization
>            Reporter: Johnny Miller
>            Priority: Normal
>             Fix For: 4.0.x, 4.1.x, 5.x
>
>
> {{*Works -* CREATE ROLE IF NOT EXISTS test WITH PASSWORD='somepassword' AND 
> LOGIN=true;}}
>  
> {{*Works* - CREATE ROLE IF NOT EXISTS test123 WITH PASSWORD='somepassword' 
> AND LOGIN=true;}}
>  
> {{*Breaks* - CREATE ROLE IF NOT EXISTS 123test WITH PASSWORD='somepassword' 
> AND LOGIN=true;}}
> {color:#de350b}{{SyntaxException: line 1:26 no viable alternative at input 
> '123' (CREATE ROLE IF NOT EXISTS [123]...)}}{color}{{{{}}{}}}
>  
> It would be helpful and more consistent to be able to prefix roles with a 
> numeric value instead of only being able to do this as a suffix.
> Env Details are:
> [cqlsh 6.0.0 | Cassandra 4.0.3 | CQL spec 3.4.5 | Native protocol v5]
>  
>  
>  
>  



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to