Configuring group mapping in Knox
Learn how to use HadoopGroupProvider to configure group mapping.
identity-assertion
and name is
HadoopGroupProvider
:<provider>
<role>identity-assertion</role>
<name>HadoopGroupProvider</name>
<enabled>true</enabled>
<<param> ... </param>
</provider>
HadoopGroupProvider
reside in the
provider section of a gateway topology file. The
hadoop.security.group.mapping property determines the
implementation. Some of the valid implementations are as follows:-
org.apache.hadoop.security.JniBasedUnixGroupsMappingWithFallback
This is the default implementation and is picked up if hadoop.security.group.mapping is not specified. This implementation determines if the Java Native Interface (JNI) is available. If JNI is available, the implementation uses the API to resolve a list of groups for a user. If JNI is not available then the shell implementation, org.apache.hadoop.security.ShellBasedUnixGroupsMapping is used. It shells out with the bash -c groups command (for a Linux/Unix environment) or the net group command (for a Windows environment) to resolve a list of groups for a user.
-
org.apache.hadoop.security.LdapGroupsMapping
This implementation connects directly to an LDAP server to resolve the list of groups. However, this should only be used if the required groups reside exclusively in LDAP, and are not materialized on the Unix servers.
To enable group lookup using identity assertion as HadoopGroupProvider, perform the following steps: