LDAP on OpenShift is simple in theory and brutal in practice when you ignore the details. You need secure, consistent authentication across every pod, every service, every namespace. OpenShift’s identity provider system supports LDAP, but configuration mistakes and schema mismatches break logins fast. The cure is understanding how OpenShift maps LDAP directory attributes into its own user model.
Start by reviewing your LDAP directory structure. Make sure uid, cn, mail, and memberOf attributes are consistent. OpenShift connects via its OAuth server, so bind DN credentials need read permissions for the entire target subtree. Create a read-only service account in LDAP, not an admin.
In the OpenShift cluster, add LDAP as an identity provider in the OAuth configuration. This is done by editing the oauth.config resource in the openshift-config namespace. Specify the LDAP URL, bind DN, bind password, base DN, and attribute mappings. Use LDAPS over port 636 or StartTLS for port 389. Anything less invites interception.
Testing is non-negotiable. Use oc commands to verify authentication flow before releasing to production. Look for correct user creation in the internal OpenShift database. Confirm that group synchronization matches LDAP groups. Misaligned mappings will lock out key engineering accounts.