Restrict User Access Rights In ClickHouse

折月煮酒 提交于 2021-01-29 05:34:42

问题


I have created multiple Databases in Clickhouse and a new User, and now can I restrict that newly created user to be able to access a particular database.


回答1:


In users.xml in 'user' (near profile, quota...) you could specify optional section

<allow_databases>
    <database>default</database>
    <database>test</database>
</allow_databases>

If there is no 'allow_databases' section - it means that access to all databases is allowed.

Access to database 'system' is always allowed (because system database is used to process queries). User could list all databases and tables (using SHOW queries or system tables), even if there is no access. Database access limits are completely unrelated to 'readonly' settings. There is no possibility to provide full access to one database and readonly access to another.



来源:https://stackoverflow.com/questions/43256501/restrict-user-access-rights-in-clickhouse

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!