You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@kylin.apache.org by "Kanta Kuramoto (JIRA)" <ji...@apache.org> on 2017/03/09 08:29:37 UTC

[jira] [Commented] (KYLIN-2305) Unable to use long searchBase/Pattern for LDAP

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

Kanta Kuramoto commented on KYLIN-2305:
---------------------------------------

I also encountered the problem. Because {{java.util.Properties.list}} is for debugging, it will be trimed if the property value is long.
https://docs.oracle.com/javase/8/docs/api/java/util/Properties.html#list-java.io.PrintWriter-

We reproduced it following JDK Version.
{code}
$ java -version
openjdk version "1.8.0_121"
OpenJDK Runtime Environment (build 1.8.0_121-b13)
OpenJDK 64-Bit Server VM (build 25.121-b13, mixed mode)
{code}
We shoud use {{java.util.Properties.store}} in order to write full property value. Can I work on this?

> Unable to use long searchBase/Pattern for LDAP
> ----------------------------------------------
>
>                 Key: KYLIN-2305
>                 URL: https://issues.apache.org/jira/browse/KYLIN-2305
>             Project: Kylin
>          Issue Type: Bug
>    Affects Versions: v1.6.0
>            Reporter: mathias kluba
>
> I try to use LDAP authentication.
> I set the ldap.user.searchBase & ldap.user.searchPattern & ldap.user.groupSearchBase
> I followed the documentation http://kylin.apache.org/docs/howto/howto_ldap_and_sso.html
> It crashed because of:
> {code}
> Failed to parse DN; nested exception is org.springframework.ldap.core.TokenMgrError: Lexical error at line 1, column 38.  Encountered: "." (46), after : ""
> {code}
> I change the logger configuration to have debug to understand the query done using Spring Security LdapTemplate.
> It seems that it trim the value at column 38 and add "..."
> I can't tell you my real AD path, but here is an example:
> in kylin.properties:
> {code}
>  ldap.user.searchBase=OU=Users,OU=Accounts,OU=FR,OU=ABCDE,OU=FGHIJ,DC=MYCOMPANY,DC=COM
> {code}
> Debug log:
> {code}
> 2016-12-20 14:04:41,242 DEBUG [http-bio-7070-exec-1] search.FilterBasedLdapUserSearch:107 : Searching for user 'mylogin', with user search [ searchFilter: '(sAMAccountName={0})', searchBase: 'OU=Users,OU=Accounts,OU=FR,OU=ABCDE,O...', scope: subtree, searchTimeLimit: 0, derefLinkFlag: false ]
> {code}
> I change the searchBase to be shorted (less than 38 char) and it seems that the bug is the same with the searchPattern and the groupSearchBase.
> I don't know where Kylin is reading these properties, but it seems that it doesn't use the right function (maybe toString() that trim the value?)



--
This message was sent by Atlassian JIRA
(v6.3.15#6346)