[
https://issues.apache.org/jira/browse/CASSANDRA-19749?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17863788#comment-17863788
]
Stefan Miklosovic commented on CASSANDRA-19749:
-----------------------------------------------
[CASSANDRA-19749-5.0|https://github.com/instaclustr/cassandra/tree/CASSANDRA-19749-5.0]
{noformat}
java17_pre-commit_tests
✓ j17_build 3m 52s
✓ j17_cqlsh_dtests_py311 5m 50s
✓ j17_cqlsh_dtests_py311_vnode 7m 2s
✓ j17_cqlsh_dtests_py38 6m 3s
✓ j17_cqlsh_dtests_py38_vnode 5m 52s
✓ j17_cqlshlib_cython_tests 9m 44s
✓ j17_cqlshlib_tests 6m 33s
✓ j17_dtests 31m 52s
✓ j17_dtests_latest 33m 10s
✓ j17_dtests_vnode 33m 45s
✓ j17_jvm_dtests 24m 42s
✓ j17_jvm_dtests_latest_vnode 15m 25s
✓ j17_unit_tests 13m 50s
✓ j17_unit_tests_repeat 4m 17s
✓ j17_utests_latest 14m 56s
✓ j17_utests_latest_repeat 4m 2s
✓ j17_utests_oa 13m 34s
✓ j17_utests_oa_repeat 3m 56s
{noformat}
[java17_pre-commit_tests|https://app.circleci.com/pipelines/github/instaclustr/cassandra/4471/workflows/b16a0998-8b98-4335-8aa9-181ac46a9624]
> ALTER USER | ROLE IF EXISTS creates a user / role if it does not exist
> ----------------------------------------------------------------------
>
> Key: CASSANDRA-19749
> URL: https://issues.apache.org/jira/browse/CASSANDRA-19749
> Project: Cassandra
> Issue Type: Bug
> Components: Legacy/CQL
> Reporter: Stefan Miklosovic
> Assignee: Stefan Miklosovic
> Priority: Normal
> Fix For: 4.1.x, 5.0.x, 5.x
>
> Time Spent: 10m
> Remaining Estimate: 0h
>
> Let's have:
> {code}
> authenticator:
> class_name : org.apache.cassandra.auth.PasswordAuthenticator
> authorizer: CassandraAuthorizer
> role_manager: CassandraRoleManager
> {code}
> and do this:
> {code}
> cassandra@cqlsh> select * from system_auth.roles;
> role | can_login | is_superuser | member_of | salted_hash
> -----------+-----------+--------------+-----------+--------------------------------------------------------------
> cassandra | True | True | null |
> $2a$10$sFCKeluid5MlW/Z0CU1ygO1U5qpLW4Rgivmu8rZNmNNQ8WeC2y92S
> {code}
> Then
> {code}
> cassandra@cqlsh> ALTER USER IF EXISTS this_does_not_exist SUPERUSER ;
> cassandra@cqlsh> select * from system_auth.roles where role =
> 'this_does_not_exist';
> role | can_login | is_superuser | member_of | salted_hash
> ---------------------+-----------+--------------+-----------+-------------
> this_does_not_exist | null | True | null | null
> {code}
> It seems to be same behaviour for ALTER ROLE too.
> {code}
> cassandra@cqlsh> ALTER ROLE IF EXISTS this_role_is_not_there WITH SUPERUSER =
> true ;
> cassandra@cqlsh> select * from system_auth.roles where role =
> 'this_role_is_not_there';
> role | can_login | is_superuser | member_of | salted_hash
> ------------------------+-----------+--------------+-----------+-------------
> this_role_is_not_there | null | True | null | null
> {code}
--
This message was sent by Atlassian Jira
(v8.20.10#820010)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]