ClickHouse的多用户权限配置管理

本文档介绍了如何在ClickHouse中配置自定义用户权限,包括创建只读用户jojo,解析users.xml文件,处理权限配置错误,解决SHA加密命令缺失问题,并提供了测试用户的步骤。
摘要由CSDN通过智能技术生成
我们安装好Click house后都是通过default用户登录,如果想自己实现自定义的用户权限控制管理就要详细读懂users.xml文档,我翻译出来了:
<users>
        <!-- If user name was not specified, 'default' user is used.如果用户名没有特别指定,默认使用default用户 -->
        <default>
            <!-- Password could be specified in plaintext or in SHA256 (in hex format).密码可以明文形式指定或者使用SHA256加密形式
                 If you want to specify password in plaintext (not recommended), place it in 'password' element.
		如果你自定义明文密码,写在password标签中间即可
                 Example 例如: <password>qwerty</password>.
                 Password could be empty. 密码可以为空
                 If you want to specify SHA256, place it in 'password_sha256_hex' element.
		如果你想使用SHA256加密形式,把加密后的密码放在password_sha256_hex标签中间
                 Example例子: <password_sha256_hex>65e84be33532fb784c48129675f9eff3a682b27168c0ea744b2cf58ee02337c5</password_sha256_hex>
                 Restrictions of SHA256: impossibility to connect to ClickHouse using MySQL JS client (as of July 2019).
		SHA256的限制:无法使用MySQL JS客户端连接到ClickHouse
                 If you want to specify double SHA1, place it in 'password_double_sha1_hex' element.
		如果你想自定义双重SHA1加密,把密码放在password_double_sha1_hex标签中间即可
                 Example例子: <password_double_sha1_hex>e395796d6546b1b65db9d665cd43f0e858dd4303</password_double_sha1_hex>
                 If you want to specify a previously defined LDAP server (see 'ldap_servers' in main config) for authentication, place its name in 'server' element inside 'ldap' element.
		如果你想指定提前定义好的轻量级目录访问协议(LDAP,请参阅住配置中的LDAP服务)服务来进行授权和验证,把名称放在 <ldap><server>两个标签中间
                 Example例如: <ldap><server>my_ldap_server</server></ldap>
                 How to generate decent password: 如何生成符合规则的密码
                 Execute执行: PASSWORD=$(base64 < /dev/urandom | head -c8); echo "$PASSWORD"; echo -n "$PASSWORD" | sha256sum | tr -d '-'
                 In first line will be password and in second - corresponding SHA256.第一行是密码,第二行是对应的SHA256加密后的
                 How to generate double SHA1:如何生成双重SHA1加密
                 
  • 0
    点赞
  • 4
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值