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

connector/ldap: Always set tls.Config.ServerName, to support LDAP ser… #689

Merged
merged 1 commit into from
Nov 15, 2016
Merged

Conversation

cjyar
Copy link

@cjyar cjyar commented Nov 15, 2016

…vers with public CA certs.

It seems if you're going to use TLS at all, you always want to set ServerName. This way, you can talk to a remote LDAPS server and use the local host's default CA certificates, with no need to specify the rootCA ldap config.

@ericchiang
Copy link
Contributor

It's really weird that we have to set this in the first place, this should be inferred as part of the dial call[0].

It looks like the LDAP client actually does its own handshake instead of using tls.Dial[1]. Will merge this and open an issue on the LDAP client.

[0] https://github.com/golang/go/blob/go1.7.3/src/crypto/tls/tls.go#L134-L141
[1] https://github.com/go-ldap/ldap/blob/d0a5ced67b4dc310b9158d63a2c6f9c5ec13f105/conn.go#L124-L138

@ericchiang ericchiang merged commit 13a1ebe into dexidp:master Nov 15, 2016
@cjyar
Copy link
Author

cjyar commented Nov 15, 2016

Thanks!

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

Successfully merging this pull request may close these issues.

2 participants