2017-12-21 4 views
1
I want to implement the restrictions in the LDAP authentication, only want a specific group to have access on hive. Below are the properties I have given in the **hive-site.xml**. But the filter is not working. 
Kindly check the following code and help me out with this ? 

**Hive Version: Hive 2.1.1 
Release label: emr-5.4.0 
Hadoop distribution:Amazon 2.7.3** 

아래의 속성은 hive-site.xml에 추가를 시도했지만 작동하지 않고 로그인에 실패했습니다. 이 없으면 나는 LDAP 메커니즘을로만 LDAP 서버 URL 및 authnetication를 사용하여 로그인 할 수 있었다 : LDAP이 언급되었다 :하이브의 Ldap 인증 사용자 필터 : 실패

<property> 
     <name>hive.server2.authentication.ldap.baseDN</name> 
     <value>ou=Root,dc=int,dc=domain,dc=com</value> 
    </property> 

    <property> 
     <name>hive.server2.authentication.ldap.groupBaseDN</name> 
     <value>CN=Groups,OU=Root,DC=int,DC=domain,DC=com</value> 
    </property> 

    <property> 
     <name>hive.server2.authentication.ldap.groupFilter</name> 
     <value>hadoop-admins</value> 
    </property> 


<property> 
    <name>hive.server2.authentication.ldap.customLDAPQuery</name> 
    <value><![CDATA[(&(objectClass=person)(memberOf=CN=hadoop-admins,OU=Groups,OU=Root,Dc=int,DC=domain,DC=com)))]]> 
    </value> 
</property> 

친절 같은 문제에 직면 한 경우 알려주세요.

오류 :

2017-12-20T10 : 29 : 32,414 WARN [HiveServer2 처리기 풀 : 나사 45 - ([])] conf.HiveConf (HiveConf.java:initialize(3768)) - 이름 HiveConf hive.server2.authentication.ldap.groupBaseDN 존재하지 않습니다 2017-12-20T10 : 29 : 32,493 오류 [HiveServer2 처리기 풀 : 스레드 45 ([]) : transport.TSaslTransport SASL 협상 실패 로그인을 확인하는 동안 오류가 발생했습니다.

+0

I가 언급되는 링크는 : [링크] (https://cwiki.apache.org/confluence/display/Hive/User+and+Group+Filter+Support+with+LDAP+Atn+Provider+in+ HiveServer2) –

답변

0

inc onsistency 필터 사이

(의 memberOf = CN은 = 하둡 관리자, OU = 그룹, OU = 루트, DC = INT, DC = 도메인, DC = COM)

를 상기 groupeBaseDN

hive.server2.authentication.ldap.groupBaseDN CN = 그룹, OU = 루트, DC = INT, DC = 도메인, DC = COM

가3210

groupBaseDN을 수정하면 모든 것이 잘 수행 될 것으로 확신합니다.

+0

안녕하세요 Ludovic Poitou, 답장을 보내 주셔서 감사합니다 저는 두 속성 (customquery와 groupBaseDN)을 함께 사용할 수 없다고 생각합니다. customLDAPQuery를 사용할 때 groupBaseDN 사용으로 인한 영향은 없습니다. 사용자의 유효성을 검사하지 않으므로 CustomQuery가 작동하지 않습니다. 그러나 LDAP 필터 쿼리는 LDAP UI를 통해 LDAP 서버에 직접 사용할 때 작동합니다. GroupBaseDN :이 도구를 사용해 보았지만 오류가 발생했습니다. hive.server2.authentication.ldap.groupBaseDN이라는 이름의 HiveConf가 존재하지 않습니다. –

+0

내 의견을 읽은 것 같아요. groupBaseDN이 존재하지 않는다는 오류가보고되었습니다. "cn = Groups ..."로 정의했기 때문에 아마 사실 일 것입니다. 반면에 작동하는 쿼리에서는 "ou = Groups ..."입니다. –