对于 Clickhouse 生产服务器,我想通过定义的用户来保护访问,并删除默认用户。
我正在使用 users.d/myuser.xml 文件添加新用户,并且我也想通过这种方式删除默认用户。
我找不到合适的组合。看起来我应该使用“删除”属性,但它没有记录。
最佳答案
看来您需要进行以下更改:
/users.d/users.xml
<?xml version="1.0"?>
<yandex>
<users>
<default remove="remove">
</default>
<new_secured_user>
<password>hello_world</password>
<!-- More secure way to define password: -->
<!-- <password_sha256_hex>65e84be33532fb784c48129675f9eff3a682b27168c0ea744b2cf58ee02337c5</password_sha256_hex> -->
</new_secured_user>
</users>
</yandex>
看文章Remove/Replace config elements .
<小时/>考虑到删除默认用户需要对集群配置进行一些修改(请参阅 Access Rights ):
The default user is chosen in cases when the username is not passed. The default user is also used for distributed query processing, if the configuration of the server or cluster doesn't specify the user and password (see the section on the Distributed engine).
关于settings - 如何通过users.d删除默认的clickhouse用户,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/56122411/