If your organization uses LDAP for user authentication, you can configure Rancher to communicate with an OpenLDAP server to authenticate users. This allows Rancher admins to control access to clusters and projects based on users and groups managed externally in the organisation’s central user repository, while allowing end-users to authenticate with their LDAP credentials when logging in to the Rancher UI.
Rancher must be configured with a LDAP bind account (aka service account) to search and retrieve LDAP entries pertaining to users and groups that should have access. It is recommended to not use an administrator account or personal account for this purpose and instead create a dedicated account in OpenLDAP with read-only access to users and groups under the configured search base (see below).
Configure the settings for the OpenLDAP server, groups and users. For help filling out each field, refer to the
- Log into the Rancher UI using the initial local account.
- From the Global view, navigate to Security > Authentication
Once you have completed the configuration, proceed by testing the connection to the OpenLDAP server. Authentication with OpenLDAP will be enabled implicitly if the test is successful.
- Enter the username and password for the OpenLDAP account that should be mapped to the local principal account.
- Click Authenticate With OpenLDAP to test the OpenLDAP connection and finalise the setup.
Result:
- The LDAP user pertaining to the entered credentials is mapped to the local principal (administrative) account.
If you are experiencing issues while testing the connection to the OpenLDAP server, first double-check the credentials entered for the service account as well as the search base configuration. You may also inspect the Rancher logs to help pinpointing the problem cause. Debug logs may contain more detailed information about the error. Please refer to How can I enable debug logging in this documentation.