Skip to content

Commit

Permalink
fix(alternator): create a role with "login" and "superuser" flags
Browse files Browse the repository at this point in the history
since scylladb/scylladb#19740 was recently merge, we need to
put the `login=true` for using roles with alternator

and when scylladb/scylladb#19762 would be merged
we'll need the `superuesr=true`, or do fine grind premission
for any action we need

Ref: scylladb/scylladb#19740
Ref: scylladb/scylladb#19762
Ref: scylladb/scylla-dtest#4697
  • Loading branch information
fruch committed Jul 29, 2024
1 parent 22db977 commit 030ad47
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion sdcm/tester.py
Original file line number Diff line number Diff line change
Expand Up @@ -1111,7 +1111,7 @@ def pre_create_alternator_tables(self):
self.log.info("Going to create alternator tables")
if self.params.get('alternator_enforce_authorization'):
with self.db_cluster.cql_connection_patient(self.db_cluster.nodes[0]) as session:
session.execute("CREATE ROLE %s WITH PASSWORD = %s",
session.execute("CREATE ROLE %s WITH PASSWORD = %s AND login = true AND superuser = true",
(self.params.get('alternator_access_key_id'),
self.params.get('alternator_secret_access_key')))

Expand Down
2 changes: 1 addition & 1 deletion unit_tests/test_ycsb_thread.py
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ def fixture_cql_driver(docker_scylla):
def create_table(docker_scylla, cql_driver, alternator_api, params):

with cql_driver.connect() as session:
session.execute("CREATE ROLE %s WITH PASSWORD = %s",
session.execute("CREATE ROLE %s WITH PASSWORD = %s AND login = true AND superuser = true",
(params.get('alternator_access_key_id'),
params.get('alternator_secret_access_key')))

Expand Down

0 comments on commit 030ad47

Please sign in to comment.