- The LDAP authentication provider expects the server certificate to be provided via a ConfigMap in the openshift-config project. The expected key for the certificate is ca.crt.
oc create configmap XXXXX-ldap-ca-cert --from-file=ca.crt=$HOME/ldap-ca.crt -n openshift-config
- It also expects the bind password to be provided via a secret. The expected key is bindPassword.
oc create secret generic XXXXX-ldap-secret --from-literal=bindPassword=<your-password-value> -n openshift-config
- Finally create the LDAP Provider (use oc apply to replace the default provider with name cluster):
oc apply -f $HOME/XXXXX-ldap.yaml
Sample output:
Warning: oc apply should be used on resource created by either oc create --save-config or oc apply
oauth.config.openshift.io/cluster configured
- Validate that your config is there:
oc get oauths
- Test the connection.
oc login -u <ldap-user> -p <your-password>
Sample output:
Login successful.
You don't have any projects. You can try to create a new project, by running
oc new-project <projectname>