You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@hive.apache.org by "Ruslan Dautkhanov (JIRA)" <ji...@apache.org> on 2016/11/14 21:14:58 UTC

[jira] [Commented] (HIVE-13590) Kerberized HS2 with LDAP auth enabled fails in multi-domain LDAP case

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

Ruslan Dautkhanov commented on HIVE-13590:
------------------------------------------

thank you [~ctang.ma]

Looking at your patch 
https://issues.apache.org/jira/secure/attachment/12811366/HIVE-13590.1.patch

{noformat}
...
+        // KerberosName.getShorName can only be used for kerberos user, but not for the user
+        // logged in via other authentications such as LDAP
+        KerberosNameShim fullKerberosName = ShimLoader.getHadoopShims().getKerberosNameShim(userName);
+        ret = fullKerberosName.getShortName();
...
{noformat}

Is there any specific reason getShortName() can't be used for LDAP principals too?
Looking around for potential solutions for HIVE-15174

Thanks!

> Kerberized HS2 with LDAP auth enabled fails in multi-domain LDAP case
> ---------------------------------------------------------------------
>
>                 Key: HIVE-13590
>                 URL: https://issues.apache.org/jira/browse/HIVE-13590
>             Project: Hive
>          Issue Type: Bug
>          Components: Authentication, Security
>            Reporter: Chaoyu Tang
>            Assignee: Chaoyu Tang
>             Fix For: 2.2.0, 2.1.1
>
>         Attachments: HIVE-13590.1.patch, HIVE-13590.1.patch, HIVE-13590.patch, HIVE-13590.patch
>
>
> In a kerberized HS2 with LDAP authentication enabled, LDAP user usually logs in using username in form of username@domain in LDAP multi-domain case. But it fails if the domain was not in the Hadoop auth_to_local mapping rule, the error is as following:
> {code}
> Caused by: org.apache.hadoop.security.authentication.util.KerberosName$NoMatchingRule: No rules applied to ctang@mydomain.com
> at org.apache.hadoop.security.authentication.util.KerberosName.getShortName(KerberosName.java:389)
> at org.apache.hadoop.security.User.<init>(User.java:48)
> {code}



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)