For the latest version, please use Certificate Lifecycle Manager 6.18.0!

Active Directory Integration

× Magnified Image

This section describes the process of integrating MTG CLM with Active Directory.

Logging in to Keycloak

  • Access your Keycloak instance using administrator account credentials.

Selecting the MTG-ERS Realm

  • From the top-left corner, select the MTG-ERS realm.

Accessing User Federation

  • Navigate to the left sidebar menu and select User Federation as shown below:

Enabling the LDAP Provider

  • Click on the existing LDAP provider.

  • Enable it by clicking the Enabled button in the top-right corner, as shown below:

Configuring LDAP Settings

  • Configure the fields with the appropriate information corresponding to your Active Directory.

  • Navigate to the Connection and Authentication Settings section.

Setting Connection URL

  • Enter the LDAP server’s ldaps:// connection URL, including the port number. For example:

ldaps://ad.example.com:636

Testing the Connection

In order to make sure that the connection test will work, you need to ensure that keycloak has the root CA of the LDAP server’s (Active Directory) chain in its trusted certificates.
  • Click Test Connection to verify that the connection is successful.

Configuring Bind Type, DN and Credentials

Use a dedicated Active Directory account without administrative privileges for the Keycloak LDAP bind. The account needs read access to the users, groups and attributes that Keycloak imports from Active Directory.

  • Set Bind type to simple over the LDAPS connection configured above.

  • For Bind DN, enter the dedicated account’s distinguishedName.

  • For Bind credentials, enter the password for that same account.

Retrieving Bind DN from Active Directory

  • Open the Active Directory Users and Computers tool.

  • Locate the dedicated bind account in your domain.

  • Open its Properties, select Attribute Editor and copy the value of distinguishedName.

  • Paste the value into Bind DN in Keycloak.

Testing Authentication

  • Click Test authentication in Keycloak to verify the bind credentials before running a sync.

Proceeding to the LDAP Searching and Updating Section

  • Keep the Edit Mode set to UNSYNCED.

  • Set Users DN to the distinguished name of the organizational unit or container where Keycloak should search for users. For example, use OU=CLM Users,DC=example,DC=com if that organizational unit contains the users you want to import.

The Edit Mode option must always be set to UNSYNCED. UNSYNCED mode allows users to modify their profile information through MTG-CLM while maintaining integration with Active Directory. However, it’s important to note that changes made within MTG-CLM (or Keycloak) are stored in Keycloak and not synchronized back to Active Directory. While periodic synchronization from Active Directory to Keycloak will continue to work, any changes made in MTG-CLM may be overwritten during the next sync cycle. This may result in data discrepancies between the two systems. Make sure you are aware of this behavior and always monitor for potential inconsistencies between MTG-CLM and Active Directory user data.

Syncing Users from Active Directory

  • Save the LDAP provider settings.

  • Navigate to the Action dropdown in the top-right corner and select Sync all users.

Verification

  • Confirm that the expected users appear in Keycloak after the sync.

  • Sign in to MTG CLM as a synced Active Directory user to verify that user authentication works.

Role Mapping Overview

  • This procedure synchronizes Active Directory groups into Keycloak. Synchronizing groups back to Active Directory requires write access to the affected groups.

  • Roles can be assigned to users and permissions can be granted to roles for better access control.

  • Preconfigured templates are available in the Mappers section for facilitating role mapping between AD and Keycloak.

Mapping Groups

  • To map an AD group to a Keycloak group, select Group Mappers. This allows you to synchronize an AD group of users with a corresponding Keycloak group.

Retrieving LDAP Group Distinguished Name (DN)

  • Open the Active Directory Users and Computers tool.

  • Navigate to the ad.example.com domain dropdown.

  • Select the group you wish to map, then go to Properties → Attribute Editor → distinguishedName.

  • Copy the value of the distinguishedName attribute.

Configuring LDAP Groups in Keycloak

  • Paste the copied distinguished name into the LDAP Groups DN field in Keycloak.

Setting Member-Of Attribute

  • Ensure the Member-Of LDAP Attribute is set to memberOf.

  • This ensures the mapping applies to all members of the specified group.

Saving the Configuration

  • Click Save to confirm the changes.

  • A success message will appear in the top-right corner of the screen.

Syncing LDAP Groups to Keycloak

  • Navigate to the Group Mappers section.

  • Click Action and then select Sync LDAP Groups to Keycloak.

  • Confirm that the expected groups appear in Keycloak and that their membership matches Active Directory.

Assigning Roles to Groups

  • Navigate to the Groups section in Keycloak.

  • Select the group to which you want to assign a role.

  • Go to the Role Mapping tab.

Assigning a Realm Role

  • Click Assign Role.

  • Select Filter by Realm Roles to display the available realm roles.

  • Choose a role, such as CLM_DEFAULT_REALM_ROLE_DEFAULT.

  • Click Assign to assign the selected role to the group

Completion

  • After assigning the realm role, all users in the mapped group will inherit the specified permissions and roles.