Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Ldap-Group-Sync LDAP Result Code 200 "Network Error": x509: certificate signed by unknown authority #41

Open
IlonkaO opened this issue Jun 14, 2019 · 1 comment

Comments

@IlonkaO
Copy link

IlonkaO commented Jun 14, 2019

oc version 3.11.104

I try to realize the group sync via an openshift cronjob. But everytime I get the error inside the container: LDAP Result Code 200 "Network Error": x509: certificate signed by unknown authority

The used CA is the right one... I also tried inside the container the oc adm groups sync command with additional flag --certificate-authority, but it didn't work.

Any ideas

Regards
Ilonka

@itwasonlyabug
Copy link

Hi, I don't know if this is still an issue for you or if you figured it out, but have you tried verifying your settings with ldapsearch?

ldapsearch uses the OS' certificate trust-store, so if you have added your certificate to it it will work, meaning you could leave the CA portion of the ldap sync script empty.

Simple ldapsearch request to get all users from a group:

ldapsearch -H ldaps://yourdc.domain.com:<port> -x -D [email protected] -s sub -b "dc=domain,dc=com" "(|(memberOf=CN=Openshift,OU=YourGroups,DC=domain,DC=com))" sAMAccountName -W

This will try to connect to yourdc.domain.com:<port> via LDAPS, with the account [email protected] (you can also enter the full AD path for the account - DN=account,OU=users.. and etc.).
We are also setting the sub flag so that we search the selected level and sub-levels of it - in the example that means searching dc=domain,dc=com and all sub-levels. We are searching for objects with the sAMAccountName property. The -W flag is just so that you are prompted to enter the password for the account.

If ldapsearch works, but oc adm group sync fails

You can try either adding your certificate to the OS trust store Example for RHEL or you can try specifying a different certificate.

In most cases the issue is that your server doesn't trust the LDAP server and specifying the correct certificate will remedy that.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants