LDAP

You can configure LDAP (Lightweight Directory Access Protocol) for MKE 4 through the authentication section of the MKE configuration file. To enable the service, set enabled to true. The remaining fields in the authentication.ldap section are used to configure the interactions with your LDAP server. For more information, refer to the official DEX documentation LDAP configuration.

Configure MKE

The MKE configuration file authentication.ldap fields are detailed below:

FieldDescription
hostHost and optional port of the LDAP server, in the host:port format.
rootCAPath to a trusted root certificate file.
bindDNDistinguished Name (DN) for an application service account.
bindPWPassword for an application service account.
usernamePromptAttribute to display in the password prompt.
userSearchSettings to map user-entered username and password to an LDAP entry.
userSearch.baseDNBaseDN from which to start the search.
userSearch.filterOptional filter to apply for a user search of the directory.
userSearch.usernameUsername attribute to use for user entry comparison.
userSearch.idAttrString representation of the user.
userSearch.emailAttrAttribute to map to email.
userSearch.nameAttrAttribute to map to display name of a user.
userSearch.preferredUsernameAttrAttribute to map to preferred usernames.
groupSearchGroup search queries for groups given a user entry.
groupSearch.baseDNBaseDN from which to start the search.
groupSearch.filterOptional filter to apply for a group search of the directory.
groupSearch.userMatchersField pairs list to use to match a user to a group.
groupSearch.nameAttrGroup name.

LDAP example configuration:

authentication:
  enabled: true
  ldap:
    enabled: true
    host: ldap.example.org:389
    insecureNoSSL: true
    bindDN: cn=admin,dc=example,dc=org
    bindPW: admin
    usernamePrompt: Email Address
    userSearch:
      baseDN: ou=People,dc=example,dc=org
      filter: "(objectClass=person)"
      username: mail
      idAttr: DN
      emailAttr: mail
      nameAttr: cn

Test authentication flow

ℹ️
To test authentication flow, ports 5556 (dex) and 5555 (example-app) must be externally available.
  1. Navigate to http://{MKE hostname}:5555/login.
  2. Click Login to display the login page.
  3. Select Log in with LDAP.
  4. Enter the username and password for the LDAP server.
  5. Click Login. If authentication is successful, you will be redirected to the client applications home page.