Setting up Users from an LDAP Database
About this task
User Admin directory for
Hue.
The following table shows the parameters you need to set in the ldap
section of the hue.ini file so you can import users.
WARNING
The hue.ini file is located at
/opt/mapr/hue/hue-<version>/desktop/conf/.
| Parameter | Description | Comments |
|---|---|---|
ldap_url
|
The URL of your LDAP server. | |
base_dn
|
Top of the search tree, which defines the search scope. | |
bind_dn
|
Distinguished name (DN) of the user to bind as. | Can be omitted for anonymous searches. |
bind_password
|
Password of the bind user. | Can be omitted for anonymous searches. |
user_filter
|
Limits the scope of the search by applying a filter. | This parameter is optional. |
user_name_attr
|
The attribute used for username in the LDAP schema. | Examples: cn (for common name) or uid (for user
ID). |
To set up Hue users by importing information from an LDAP database:
Procedure
-
Establish communication with the LDAP server by setting the
ldap_urlparameter in theldapsection of thehue.inifile. Uncomment the line and change the value from the default (ldap://localhost) to the URL for your LDAP server.# URL of the LDAP server ##ldap_url=ldap://localhost -
Provide the
base_dninformation to define the search scope. Uncomment the line wherebase_dnis defined and replace with yourbase_dn.# The search base for finding users and groups ## base_dn="DC=mycompany,DC=com" -
If your LDAP server does not support anonymous searches, you need to provide the
bind_dnandbind_password. Uncomment the lines with these parameters and change the values to yourbind_dnand yourbind_password.# Distinguished name of the user to bind as -- not necessary if the LDAP server # supports anonymous searches ## bind_dn="CN=ServiceAccount,DC=mycompany,DC=com" # Password of the bind user -- not necessary if the LDAP server supports # anonymous searches ## bind_password= -
If you want to narrow the scope of the directory search, specify a
user_filterin theuserssection under theldapsection of thehue.inifile. This is optional.[[[users]]] # Base filter for searching for users ## user_filter="objectclass=*" -
Set the
user_name_attrparameter in theuserssection under theldapsection of thehue.inifile. If your LDAP directory schema does not use the attributesAMAccountNamefor the username, uncomment the line and change the value of theuser_name_attrto the attribute you use. For example, if the directory schema uses theuidattribute, change the value of the parameter as shown:[[[users]]] # The username attribute in the LDAP schema ## user_name_attr=sAMAccountNameuser_name_attr=uid - Restart httpfs so ldap settings will take effect.
- Restart Hue once all configuration changes have been made so the changes will take effect.