LDAP
NIM supports LDAP for authentication, providing a versatile and secure method for user verification. This capability allows NIM to authenticate users from a range of external systems that support LDAP, including Active Directory and Google. The advantage of using LDAP for authentication in NIM is the convenience it offers; users can access NIM applications without the need for creating separate passwords within NIM itself. This feature simplifies the process of deploying NIM Apps, as it integrates with existing user credentials from these external systems, streamlining access and maintaining security.
Requirements
The system that will be used for LDAP must be added as a system
Inter-system relation between the LDAP system and Internal System
Firewall must allow 389 (LDAP) or 636 (LDAPS)
Creating Internal Users
The first step that is needed is to make sure that you have all the users that you need configured in the NIM’s Internal User Table.
Go to Processing > Filters and create a filter containing the AD users that you want created in the NIM internal system table (see Filters for more info on creating a filter)
Go to Output > Mappings and create a new mapping with the following settings (see Mappings for more info on creating a mapping)
System: internal
Target: users
Function: user_create
Name: (e.g. Internal_User_Create)
Add the following attributes and constants into the Attribute Mapping
AuthMethod: LDAP
Description: <AD User Description>
DisplayName: <AD User displayName>
Email: <AD User mail>
Enabled: True
ExternalID: <AD User objectGUID>
Name: <AD User sAMAccountName>
Go to Output > Jobs and create a job that has your mapping in the configuration and run the job
Configure LDAP Connection
This example will provide steps to setup a connection for Active Directory
Go to Processing > Relations
Configure the following
System A: internal
Type A: users
Column A: ExternalID
System B: AD
Type B: Users
Column B: objectGUID
Click Add then Save
Go to Configuration > Settings > LDAP
Click on Add
Specify the name for the LDAP (e.g. LDAP)
Populate the fields accordingly
Related System: AD
DNS Name: AD FQDN or DC FQDN
SSL: If using LDAPS, check box
Port: If using LDAPS, then 636. Else use 389
Certificate: Leave empty
Troubleshooting
While configuring LDAP in NIM, there are chances that there are errors that surface. Listed below are common errors and actions that can be taken to solve the errors
Error verifying certificate
Error connecting to LDAP server ldaps://<SERVER>:636: Error-UNABLE_TO_VERIFY_LEAF_SIGNATURE: unable to verify the first certificate
You need to add the CA certificate for LDAPS to NIM. You can use the CertUtil.exe command in CMD to view the Cert Authorities bound to the machine. This will provide you the name of the cert or certs to find in MMC and export
Within Windows open command prompt
Type
CertUtil.exe
, press EnterType note of the certificate listed
Click on Start > Run > type
mmc
Click on File > Add/Remove Snap-In
Click on Certificates > Add > select Computer Account and Click Finish
Expand Trusted Root Certification Authorities > Certificates
Find the CA Certificate, Right-Click > Export
Next, click on DER encoded bindary X.509 (.CER)
Save Certificate to disk
Within NIM, click on Configuration > Settings > Certificates
Click Add and specify certificate name (e.g. LDAPCA)
Select File
Put in any text in the password field, currently there has to be some value for this to work
Click Add, and then Save
Then test your connection again. NOTE: The certificate parameter on the LDAP Server configuration should NOT be selected for Active Directory binding. It should be left blank
Error connecting hostname
Error connecting to LDAP server ldaps://<HOSTNAME>:636: Error-ERR_TLS_CERT_ALTNAME_INVALID: Hostname/IP does not match certificate's altnames: Host: <HOSTNAME>. is not in the cert's altnames: DNS:<HOSTNAME>"
This is cause by the certificate name not matching the host we are connecting to. Check the certificate name to match the hostname. Often the certificate is for a specific DC, so changing the LDAP configuration hostname to a specific Domain Controller FQDN will correct the issue