[ https://issues.apache.org/jira/browse/CASSANDRA-19749?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17863742#comment-17863742 ]
Stefan Miklosovic commented on CASSANDRA-19749: ----------------------------------------------- [CASSANDRA-19749-4.1|https://github.com/instaclustr/cassandra/tree/CASSANDRA-19749-4.1] {noformat} java11_pre-commit_tests ✓ j11_build 2m 3s ✓ j11_cqlsh_dtests_py3 5m 11s ✓ j11_cqlsh_dtests_py311 5m 57s ✓ j11_cqlsh_dtests_py311_vnode 5m 50s ✓ j11_cqlsh_dtests_py38 5m 43s ✓ j11_cqlsh_dtests_py38_vnode 6m 9s ✓ j11_cqlsh_dtests_py3_vnode 5m 45s ✓ j11_cqlshlib_cython_tests 8m 6s ✓ j11_cqlshlib_tests 8m 42s ✓ j11_jvm_dtests_vnode 13m 58s ✓ j11_unit_tests_repeat 5m 2s ✕ j11_dtests 33m 6s largecolumn_test.TestLargeColumn test_cleanup ✕ j11_dtests_vnode 35m 51s largecolumn_test.TestLargeColumn test_cleanup ✕ j11_jvm_dtests 17m 23s org.apache.cassandra.distributed.test.ReadRepairTest readRepairRTRangeMovementTest ✕ j11_unit_tests 9m 10s org.apache.cassandra.cql3.MemtableSizeTest testSize[skiplist] {noformat} [java11_pre-commit_tests|https://app.circleci.com/pipelines/github/instaclustr/cassandra/4470/workflows/46ca1d2b-5314-4a6f-8900-cbd796508 > 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: commits-unsubscr...@cassandra.apache.org For additional commands, e-mail: commits-h...@cassandra.apache.org