OpenShift 4: Automatic LDAP group synchronization

If you need to use LDAP for authentication in OpenShift 4, the documentation is pretty clear and everything works nicely [1].

But if you need to grant privileges based on LDAP groups [2], the situation gets complicated.
The synchronization from [2] works ok but you need to run it manually. I was searching for an automated solution and I have found a definition [3] which works for OpenShift 3.x so I updated it work with OpenShift 4 and here it is [4]:

For this to work properly, you need to configure LDAP authentication first [1], so you will have v4-0-config-user-idp-0-ca and v4-0-config-user-idp-0-bind-password objects created.

You also need to edit some fields in ConfigMap containing EDIT_THIS string or freely modify it according to [2]. You can also change the schedule of CronJob (schedule: "*/10 * * * *") to make it more or less frequent.



Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.