Skip to content

Commit

Permalink
Merge pull request #1333 from lesandie/master
Browse files Browse the repository at this point in the history
Updated grants example
  • Loading branch information
Slach authored Feb 5, 2024
2 parents 83b9629 + a8a2367 commit 9399454
Showing 1 changed file with 23 additions and 3 deletions.
26 changes: 23 additions & 3 deletions docs/chi-examples/05-settings-08-grants.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,26 @@ metadata:
spec:
configuration:
users:
user_name/grants/query:
- "GRANT SHOW ON *.*"
- "GRANT SELECT ON *.* WITH GRANT OPTION"
myuser/profile: readonly
myuser/grants/query:
- "GRANT SELECT,INSERT,ALTER,CREATE,DROP,TRUNCATE,OPTIMIZE,SHOW,dictGet,REMOTE ON canarydb.*"
myuser/allow_databases/database:
- "canarydb"
myuser2/profile: default
myuser2/grants/query:
- "GRANT limited_role"
files:
users.d/limited_role.xml:
<clickhouse>
<roles>
<limited_role>
<grants>
<query>REVOKE ALL ON *.*</query>
<query>GRANT SELECT,INSERT,ALTER,CREATE,DROP,TRUNCATE,OPTIMIZE,SHOW,dictGet ON db1.*</query>
<query>GRANT SELECT,INSERT,ALTER,CREATE,DROP,TRUNCATE,OPTIMIZE,SHOW,dictGet ON db2.*</query>
<query>GRANT SELECT,INSERT,ALTER,CREATE,DROP,TRUNCATE,OPTIMIZE,SHOW,dictGet ON db3.*</query>
<query>GRANT SELECT,SHOW,dictGet,REMOTE ON *.*</query>
</grants>
</limited_role>
</roles>
</clickhouse>

0 comments on commit 9399454

Please sign in to comment.