You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@kylin.apache.org by "huangsheng (Jira)" <ji...@apache.org> on 2023/07/03 05:58:00 UTC

[jira] [Commented] (KYLIN-5598) Support Kylin to authenticate zk to use username + password (no kerberos required)

    [ https://issues.apache.org/jira/browse/KYLIN-5598?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17739444#comment-17739444 ] 

huangsheng commented on KYLIN-5598:
-----------------------------------

h1. Design

It is found in the Kylin code that there are zk's acl and auth setting parameters in the first version of the global dictionary V2:

 
{code:java}
# Whether to enable zookeeper acl, it is not enabled by default
kylin.env.zookeeper-acl-enabled=false
# The user password and verification method used by zookeeper, the default value is empty
# Here you can use the zkCli command (as follows) to access zookeeper to view node information
# addauth digest ADMIN:KYLIN
kylin.env.zookeeper.zk-auth=
# acl permission setting, the default is that all users can perform all operations
kylin.env.zookeeper.zk-acl=world:anyone:rwcda{code}
kylin.env.zookeeper.zk-auth encryption settings

before encryption

     kylin.env.zookeeper.zk-auth=digest:ADMIN:KYLIN

After encryption

!image-2023-07-03-13-51-08-810.png!

     kylin.env.zookeeper.zk-auth=ENC('L1GfoCNnaLlBI3BT7v5EwxbLPxlmDxcgkhmab2faRRA=')

Use ZookeeperAclBuilder to parse out the Zookeeper auth and acl information in KylinConfig, and pass it into CuratorFrameworkFactory.Builder aclProvider and authorization to complete the configuration of zookeeper acl and auth

 
 * Global Dict V2 distributed lock

Obtain the zookeeper client (CuratorFramework) via CuratorFrameworkFactory.Builder.build().

The aclProvider and authorization of CuratorFrameworkFactory.Builder can set zookeeper acl and auth respectively
 * Kylin Service Discovery

Kylin's service discovery is implemented using spring-cloud-Zookeeper. When initializing CuratorFramework, you can pass in a custom CuratorFrameworkCustomizer to add permission information

The source code of spring-cloud-zookeeper is as follows:

!image-2023-07-03-13-55-52-102.png!!image-2023-07-03-13-55-52-195.png!!image-2023-07-03-13-55-52-256.png!

Set CuratorFrameworkFactory.Builder aclProvider and authorization by implementing the customize method of the CuratorFrameworkCustomizer interface.

If you change from the zk acl setting without permission to the setting with permission, you need to clear the zk node without permission.

> Support Kylin to authenticate zk to use username + password (no kerberos required)
> ----------------------------------------------------------------------------------
>
>                 Key: KYLIN-5598
>                 URL: https://issues.apache.org/jira/browse/KYLIN-5598
>             Project: Kylin
>          Issue Type: New Feature
>          Components: Environment 
>    Affects Versions: 5.0-alpha
>            Reporter: huangsheng
>            Assignee: huangsheng
>            Priority: Major
>             Fix For: 5.0-alpha, 5.0-beta
>
>         Attachments: image-2023-07-03-13-51-08-810.png, image-2023-07-03-13-55-52-102.png, image-2023-07-03-13-55-52-195.png, image-2023-07-03-13-55-52-256.png
>
>
> Support Kylin to authenticate zk to use username + password (kerberos is not required). In some user-defined scenarios, there is no kerberos, but the user name and password are used to authenticate zk.



--
This message was sent by Atlassian Jira
(v8.20.10#820010)