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 06:35:00 UTC

[jira] [Comment Edited] (KYLIN-5600) LDAP DN is not case sensitive, resulting in user login failure

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

huangsheng edited comment on KYLIN-5600 at 7/3/23 6:34 AM:
-----------------------------------------------------------

h1. Design:

Since the components of the dn obtained in the org.springframework.security.ldap.userdetails.LdapUserDetailsMapper#mapUserFromContext method are all lowercase, it cannot be matched with the dn of the native LDAP user called by Kylin through the API, and the spring framework natively obtains It is the case of the key to obtain the dn through the system, and the default is lowercase

!image-2023-07-03-14-33-19-505.png!

Therefore, in the KylinPropertySourceConfiguration.java code, the configuration prefixed with kylin.system.property. in the kylin.properties file is added to the system configuration, so that the spring framework can read the configuration

!image-2023-07-03-14-33-56-559.png!


was (Author: JIRAUSER297438):
h1. Design:

Since the components of the dn obtained in the org.springframework.security.ldap.userdetails.LdapUserDetailsMapper#mapUserFromContext method are all lowercase, it cannot be matched with the dn of the native LDAP user called by KE through the API, and the spring framework natively obtains It is the case of the key to obtain the dn through the system, and the default is lowercase

!image-2023-07-03-14-33-19-505.png!

Therefore, in the KylinPropertySourceConfiguration.java code, the configuration prefixed with kylin.system.property. in the kylin.properties file is added to the system configuration, so that the spring framework can read the configuration

!image-2023-07-03-14-33-56-559.png!

> LDAP DN is not case sensitive, resulting in user login failure
> --------------------------------------------------------------
>
>                 Key: KYLIN-5600
>                 URL: https://issues.apache.org/jira/browse/KYLIN-5600
>             Project: Kylin
>          Issue Type: Bug
>          Components: REST Service, Security
>    Affects Versions: 5.0-alpha
>            Reporter: huangsheng
>            Priority: Major
>             Fix For: 5.0-alpha
>
>         Attachments: image-1.png, image-2023-07-03-14-33-19-505.png, image-2023-07-03-14-33-56-559.png, image.png
>
>
> In some user scenarios, uppercase and lowercase logins to LDAP fail.
> Root Cause:
> When all users are obtained from ldapUserService in the code, the attribute names in the recorded dn contain uppercase letters, but the DN attribute names passed in by customers when they log in to ldap are lowercase, resulting in inconsistent capitalization and login failure. Customers here CN =xxx,DU=xxx,DC=xxx, but ldap here is cn=xxx,du=xxx,dc=xxx
> A point where later maintenance can be optimized: 
> When troubleshooting LDAP problems, there are often strange problems that the user names cannot be matched. It is very laborious to troubleshoot. You need to add this information to the log instead of printing it all the time. You can consider printing it after polling for a number of times, and printing it when it is loaded for the first time. and so on
>  



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