Our Community is getting an upgrade! To get everything ready for the relaunch, we’ll be placing the site in read-only mode starting September 21st.
We really appreciate your understanding while we get things set up behind the scenes. Catch up on all the exciting details about the move here.
Need help or have questions? Drop us a line at [email protected]

Community Articles

Find and share helpful community-sourced technical articles.
Announcements
Share your experience with Cloudera on G2 and get a $25 Amazon Gift card.
Hi, I'm CLEO! Something exciting is coming to the Community. Stay Tuned!
Labels (1)
avatar
Super Guru

Question: We added the following settings to our knox topology so that knox may search in ldap for the groups that a user is in, so that we can efficiently control knox permissions with ranger.

<!-- changes needed for group sync--> 
<param> 
<name>main.ldapGroupContextFactory</name> 
<value>org.apache.hadoop.gateway.shirorealm.KnoxLdapContextFactory</value> 
</param> 
<param> 
<name>main.ldapRealm.authorizationEnabled</name> 
<value>true</value> 
</param> 
<param> 
<name>main.ldapRealm.groupSearchBase</name> 
<value>OU=Infrastructure,OU=EXAMPLE,DC=test,DC=local</value> 
</param> 
<param> 
<name>main.ldapRealm.groupObjectClass</name> 
<value>group</value> 
</param> 
<param> 
<name>main.ldapRealm.groupIdAttribute</name> 
<value>cn</value> 
</param> 

Our search base and attribute settings are the same as those we have in our hadoop.security.ldap.group.mapping config, and for ranger. But in knox we get an error in the gateway.log (attached) complaining about the size of the results.

Normally the results are paginated, but it seems like knox is trying to get all of them at once. What do we need to change to make this work?

ERROR: Knox was searching in OU which has 3000 groups.

Below was setup -

1. Env has KNOX = AD integration in place

2. Env currently have 3000+ groups in AD and current limit for a search, without pagination, is 500.

3. User has Ranger -Knox plugin enabled.

4. User level policy for knox -ranger plugin works whereas it does not works if groups are specified in policy.

ROOT CAUSE:

This is a BUG - https://issues.apache.org/jira/browse/KNOX-644 and is Fixed in Knox 0.10 version.

RESOLUTION: Adding below property resolved the issue -

<param> 
<name>main.ldapRealm.authorizationEnabled</name> 
<value>false</value> 
</param> 
1,816 Views
Comments
avatar
Expert Contributor

@Sagar Shimpi

Probably worth pointing out that this will be fixed in Knox 0.10 by the looks of it: KNOX-644

avatar
Super Guru

Done. Thanks

Version history
Last update:
‎12-22-2016 07:31 AM
Updated by:
Contributors