Enabling LDAP Authentication
If your company uses Lightweight Directory Access Protocol (LDAP), you can use the LDAP provider to authenticate Control Hub users. LDAP authenticates a user using the credentials stored in the LDAP server.
LDAP authentication is configured by the default system administrator - the admin@admin user account - for the entire Control Hub system. After LDAP authentication is enabled, all organizations must use LDAP authentication. Users log in to Control Hub using their Control Hub user ID and their LDAP password.
To use LDAP authentication, the Control Hub system administrator configures LDAP connection information for Control Hub and then maps organization administrator accounts to LDAP users. Organization administrators then create Control Hub user accounts for their organization, mapping the Control Hub user accounts to LDAP users.
Control Hub can also retrieve group membership from the LDAP provider. To group users, organization administrators create Control Hub groups, and then map the Control Hub groups to LDAP groups.
You can enable LDAP authentication during the installation or after the installation.
Synchronization between Control Hub and LDAP
Once you enable LDAP authentication, Control Hub automatically adds and removes existing users from groups as changes occur in the LDAP provider. Control Hub takes up to a minute to reflect such changes in the LDAP provider.
- Creates Control Hub users when necessary to match users in the LDAP groups.
- Deactivates but does not delete users from Control Hub when those users are removed from all LDAP groups linked to Control Hub.
If these same users are added back to one of the LDAP groups linked to Control Hub, the users remain deactivated in Control Hub. An organization administrator must activate the user accounts in Control Hub.
Alternatively, you can manually delete deactivated users. If these same users are added back to one of the LDAP groups, Control Hub creates the users again with an active status.
Note: Control Hub never deactivates an organization administrator.
Control Hub checks for users to create and deactivate at most every five minutes. You can configure a longer period between checks.
To accurately create and deactivate users, Control Hub requires that the Control Hub user IDs match the LDAP user names. Control Hub records created and deactivated users as actions, and administrators can see the changes from the Action Audit view.
System Administrator and LDAP Authentication
When LDAP authentication is enabled, the default system administrator - the admin@admin user account - continues to log in using the password for the account stored in the Control Hub relational database.
The system administrator account cannot be mapped to an LDAP user account. If LDAP authentication is incorrectly configured within Control Hub, users will not be able to log in using LDAP authentication. However, the system administrator can use Control Hub credentials to log in, troubleshoot LDAP-related issues, and then re-enable access to Control Hub.
Step 1. Configure LDAP Connection Information
To enable LDAP authentication, configure LDAP connection information in the Control Hub security configuration file, $DPM_CONF/security-app.properties.
-
In the security-app.properties file, enable LDAP
authentication by completing the following steps:
-
Configure the following global properties used by all LDAP configurations
included in the file:
Global Property Description userGroupProvider.M.providerClass Do not change this value. userGroupProvider.M.multi.ids Unique ID for each LDAP configuration. The ID can be any string value. To include multiple LDAP configurations, use a comma-separated list. For example, if you want to connect to both a Microsoft Active Directory server and to an OpenLDAP server, you might define the property as follows:userGroupProvider.M.multi.ids=AD,OpenLDAP
Default is L.
userGroupProvider.M.multi.fetchGroups Retrieves group information from the provider. Must be true if you map Control Hub groups to the provider groups. Default is true.
userGroupProvider.M.multi.allGroupsProviderId Set to the same value as the userGroupProvider.M.multi.ids property. -
Configure the following properties for each LDAP configuration.
Each LDAP property includes the following prefix:
userGroupProvider.M.multi.<ID>.ldap
When you configure the properties, replace the <ID> variable in each property name with the unique ID that you defined for the LDAP configuration. For example, if you defined both AD and OpenLDAP as IDs to create multiple LDAP configurations, then you would replace the <ID> variable in the first three properties as follows:# Connection information for Active Directory userGroupProvider.M.multi.AD.providerClass= com.streamsets.apps.security.authentication.ldap.LdapUserGroupProvider userGroupProvider.M.multi.AD.ldap.poolMinConnections=3 userGroupProvider.M.multi.AD.ldap.poolMaxConnections=10 ... # Connection information for OpenLDAP userGroupProvider.M.multi.OpenLDAP.providerClass= com.streamsets.apps.security.authentication.ldap.LdapUserGroupProvider userGroupProvider.M.multi.OpenLDAP.ldap.poolMinConnections=3 userGroupProvider.M.multi.OpenLDAP.ldap.poolMaxConnections=10 ...
For simplicity, the table below has dropped the following prefix from each LDAP property:userGroupProvider.M.multi.<ID>.ldap
Global Property Description providerClass Use the correct <ID> variable in the property prefix, but do not change the property value. poolMinConnections Minimum number of connections for the Bind DN connection pool. Default is 3. poolMaxConnections Maximum number of connections for the Bind DN connection pool. Default is 10. poolValidateConnections Validate the connections retrieved from the Bind DN connection pool. Default is true
.connectionTimeoutMillis Connection timeout in milliseconds. Default is 5000. responseTimeoutMillis Response timeout in milliseconds. Default is 5000. hostname LDAP server host name. port LDAP server port. To use unencrypted connections or to use connections secured with StartTLS, enter the LDAP port number, typically 389. To use connections secured with LDAPS, enter the port number for secure connections, typically 636.
ldaps Secure LDAP connections using the LDAPS (LDAP over SSL) protocol. Default is false. You must complete additional steps to use LDAPS, see Configuring Secure Connections to LDAP.
startTLS Secure LDAP connections using the StartTLS protocol. Default is false. You must complete additional steps to use StartTLS, see Configuring Secure Connections to LDAP.
Note: StartTLS and LDAPS cannot be used at the same time. If both startTLS and ldaps are set to true, startTLS takes precedence.userBaseDn Base DN under which user accounts are located. userObjectClass Name of the user object class. Default is inetOrgPerson
.userNameAttribute Name of the user ID attribute. Default is uid
.userEmailAttribute Name of the email address attribute. Default is mail
.userFullNameAttribute Name of the user full name attribute. Default is cn
.userFilter User attribute used to log in to Control Hub. For example, LDAP users can log in using a username, uid, or email address. Default is %s={user}, where %s is replaced with the value of the
userNameAttribute
property.bindDn Root distinguished name (DN) used to query the directory server. This user must have privileges to search the directory. bindPassword Password for the root distinguished name. To protect the password, store the password in an external location and then use a function to retrieve the password. fetchGroups Retrieves group information from the LDAP provider. Must be true if you map Control Hub groups to LDAP groups. Default is
true
.groupBaseDn Base DN to search for group membership. groupObjectClass Name of the group object class. Default is
groupOfUniqueNames
.groupMemberAttribute Name of the group attribute for user names. Default is uniqueMember
.groupNameAttribute Name of the attribute for group names. Default is cn. groupFullNameAttribute Name of the group attribute included with the group display name. Default is description. groupFilter Group attribute used to look up the group memberships for a user. For example, you can search for a user's groups using a base DN, username, or uid. Default is %s={dn}, where %s is replaced with the value of the
groupMemberAttribute
property. The group object class is also automatically added to the group filter. -
To configure Control Hub to automatically
create and deactivate users to match LDAP groups, edit the following
properties:
Property Description ldap.automaticResolutionEnabled Enables Control Hub to automatically create and deactivate users to match users in LDAP groups. Set to true
.ldap.resolutionFrequencyMillis Number of milliseconds between checks for users to create or deactivate. Default value is 5 minutes. You can set to a larger value, if desired. - Shut down and then launch Control Hub again to enable the changes.
Example for Active Directory
ldap.automaticResolutionEnabled=true
ldap.resolutionFrequencyMillis=300000
#userGroupProvider.id=embedded
userGroupProvider.externalProvider.principalCache.expiration.secs=60
userGroupProvider.id=M
userGroupProvider.M.providerClass=
com.streamsets.apps.security.authentication.MultiUserGroupProvider
userGroupProvider.M.multi.ids=AD
userGroupProvider.M.multi.fetchGroups=true
userGroupProvider.M.multi.allGroupsProviderId=AD
userGroupProvider.M.multi.AD.providerClass=
com.streamsets.apps.security.authentication.ldap.LdapUserGroupProvider
userGroupProvider.M.multi.AD.ldap.poolMinConnections=3
userGroupProvider.M.multi.AD.ldap.poolMaxConnections=10
userGroupProvider.M.multi.AD.ldap.poolValidateConnections=true
userGroupProvider.M.multi.AD.ldap.connectionTimeoutMillis=5000
userGroupProvider.M.multi.AD.ldap.responseTimeoutMillis=5000
userGroupProvider.M.multi.AD.ldap.hostname=abc01.mycompany.net
userGroupProvider.M.multi.AD.ldap.port=636
userGroupProvider.M.multi.AD.ldap.ldaps=true
userGroupProvider.M.multi.AD.ldap.startTLS=false
userGroupProvider.M.multi.AD.ldap.userBaseDn=OU=MyCompany,DC=mycompany,DC=net
userGroupProvider.M.multi.AD.ldap.userObjectClass=organizationalPerson
userGroupProvider.M.multi.AD.ldap.userNameAttribute=sAMAccountName
userGroupProvider.M.multi.AD.ldap.userEmailAttribute=mail
userGroupProvider.M.multi.AD.ldap.userFullNameAttribute=cn
userGroupProvider.M.multi.AD.ldap.userFilter=%s={user}
userGroupProvider.M.multi.AD.ldap.bindDn=admin@mycompany.net
userGroupProvider.M.multi.AD.ldap.bindPassword=******
userGroupProvider.M.multi.AD.ldap.fetchGroups=true
userGroupProvider.M.multi.AD.ldap.groupBaseDn=OU=MyCompany,DC=mycompany,DC=net
userGroupProvider.M.multi.AD.ldap.groupObjectClass=group
userGroupProvider.M.multi.AD.ldap.groupMemberAttribute=member
userGroupProvider.M.multi.AD.ldap.groupNameAttribute=cn
userGroupProvider.M.multi.AD.ldap.groupFullNameAttribute=description
userGroupProvider.M.multi.AD.ldap.groupFilter=%s={dn}
Example for OpenLDAP
ldap.automaticResolutionEnabled=true
ldap.resolutionFrequencyMillis=300000
#userGroupProvider.id=embedded
userGroupProvider.externalProvider.principalCache.expiration.secs=60
userGroupProvider.id=M
userGroupProvider.M.providerClass=
com.streamsets.apps.security.authentication.MultiUserGroupProvider
userGroupProvider.M.multi.ids=OpenLDAP
userGroupProvider.M.multi.fetchGroups=true
userGroupProvider.M.multi.allGroupsProviderId=OpenLDAP
userGroupProvider.M.multi.OpenLDAP.providerClass=
com.streamsets.apps.security.authentication.ldap.LdapUserGroupProvider
userGroupProvider.M.multi.OpenLDAP.ldap.poolMinConnections=3
userGroupProvider.M.multi.OpenLDAP.ldap.poolMaxConnections=10
userGroupProvider.M.multi.OpenLDAP.ldap.poolValidateConnections=true
userGroupProvider.M.multi.OpenLDAP.ldap.connectionTimeoutMillis=5000
userGroupProvider.M.multi.OpenLDAP.ldap.responseTimeoutMillis=5000
userGroupProvider.M.multi.OpenLDAP.ldap.hostname=abc02.mycompany.net
userGroupProvider.M.multi.OpenLDAP.ldap.port=389
userGroupProvider.M.multi.OpenLDAP.ldap.ldaps=false
userGroupProvider.M.multi.OpenLDAP.ldap.startTLS=false
userGroupProvider.M.multi.OpenLDAP.ldap.userBaseDn=ou=employees,dc=example,dc=org
userGroupProvider.M.multi.OpenLDAP.ldap.userObjectClass=inetOrgPerson
userGroupProvider.M.multi.OpenLDAP.ldap.userNameAttribute=uid
userGroupProvider.M.multi.OpenLDAP.ldap.userEmailAttribute=mail
userGroupProvider.M.multi.OpenLDAP.ldap.userFullNameAttribute=cn
userGroupProvider.M.multi.OpenLDAP.ldap.userFilter=%s={user}
userGroupProvider.M.multi.OpenLDAP.ldap.bindDn=cn=admin,dc=example,dc=org
userGroupProvider.M.multi.OpenLDAP.ldap.bindPassword=******
userGroupProvider.M.multi.OpenLDAP.ldap.fetchGroups=true
userGroupProvider.M.multi.OpenLDAP.ldap.groupBaseDn=ou=departments,dc=example,dc=org
userGroupProvider.M.multi.OpenLDAP.ldap.groupObjectClass=groupOfNames
userGroupProvider.M.multi.OpenLDAP.ldap.groupMemberAttribute=member
userGroupProvider.M.multi.OpenLDAP.ldap.groupNameAttribute=cn
userGroupProvider.M.multi.OpenLDAP.ldap.groupFullNameAttribute=description
userGroupProvider.M.multi.OpenLDAP.ldap.groupFilter=%s={dn}
Step 2. Configure Secure Connections (Optional)
- LDAP over SSL (LDAPS)
- LDAPS uses SSL to encrypt LDAP connections. LDAPS uses the
ldaps://
scheme. - StartTLS
- StartTLS can wrap an unencrypted connection with TLS during the
connection process. This allows the same port to handle both unencrypted
and encrypted connections. StartTLS uses the
ldap://
scheme.
For either encryption method, if the LDAP server certificate is signed by a private Certificate Authority (CA) or not trusted by the default Java truststore, you must create a custom truststore file or modify the default Java truststore file to add the CA to the file. Then configure Control Hub to use the modified truststore file.
Use the same procedure to configure either secure method.
-
In the $DPM_CONF/security-app.properties file, set one of
the following properties to true:
userGroupProvider.M.multi.<ID>.ldap.ldaps
userGroupProvider.M.multi.<ID>.ldap.startTLS
By default, both properties are false and so Control Hub makes unencrypted connections to the LDAP server. If you set both properties to true, StartTLS takes precedence.
-
Set the port property in the security-app.properties file
as required, based on the method that you enabled:
- LDAPS - Use the port number for secure connections, typically 636.
- StartTLS - Use the LDAP port number, typically 389.
-
If the LDAP server certificate is signed by a private CA or not trusted by the
default Java truststore, create a custom truststore file or modify the default
Java truststore file to add the CA to the file. Then configure Control Hub to
use the modified truststore file.
By default, Control Hub uses the Java truststore file located in $JAVA_HOME/jre/lib/security/cacerts. If your certificate is signed by a trusted CA that is included in the default Java truststore file, you do not need to create a truststore file and can skip this step.
In these steps, we show how to modify a copy of the default truststore file to add an additional CA to the list of trusted CAs. If you prefer to create a custom truststore file, see the keytool documentation.
Note: If you've already configured Control Hub to use a custom truststore file to enable HTTPS, then simply add this additional CA to the same modified truststore file that you created in Step 2. Create a Truststore File. - Shut down and then launch Control Hub again to enable the changes.
Step 3. Map Organization Administrators to LDAP Users
As the system administrator, you must map each StreamSets Control Hub organization administrator to an LDAP user account.
- New organizations
- When you create new organizations, you simply enter the name of the LDAP user account to map to the organization administrator created with the organization, as described in Creating Organizations.
- Existing organizations
- If you have existing organizations created before LDAP authentication was
enabled, edit the organization administrator user accounts as follows:
- In the Navigation panel, click .
- Click the Toggle Filter Column icon (
) to filter the users by organization.
- Select an organization and then click the existing organization administrator to display the account details.
- Enter the name of the LDAP user account to map to the organization administrator in the LDAP User Name property.
- Click Save.
Step 4. Map Users and Groups to LDAP Users and Groups
Organization administrators must map StreamSets Control Hub users and groups to LDAP users and groups for their organization.
When using LDAP authentication with Control Hub, we recommend that organization administrators follow these best practices:
- If you did not configure Control Hub
to automatically create
users, create Control Hub
user accounts for the organization and map them to LDAP user accounts by entering
the name of the LDAP user in the LDAP User Name property.Tip: Create Control Hub user IDs that match LDAP user names. For example, to add the LDAP user
Amy
to the Control Hub organizationMyOrg
, create a Control Hub user IDAmy@MyOrg
. By doing so, you can later configure Control Hub to automatically create users.Assign the Organization User role to each Control Hub user account, and then clear all other roles.
- Create Control Hub
groups and map them to LDAP groups by entering the name of the LDAP group in the
LDAP Group Name property. LDAP group names are case
sensitive.
When LDAP authentication is enabled, you cannot assign Control Hub users to Control Hub groups. Control Hub retrieves the group memberships from the LDAP provider.
- Assign Control Hub roles to the Control Hub groups.
To more efficiently manage user accounts, assign roles to groups rather than individually to each user account.