go-ldap / ldap

Basic LDAP v3 functionality for the GO programming language.
Other
2.25k stars 355 forks source link

Google LDAP? #454

Closed mark-a-johnson closed 9 months ago

mark-a-johnson commented 1 year ago

Has anyone connected to Google using this library? We've created a client in Google and get a cert, key (and username & password). How is the connection configured with the cert/key? Thanks!

bambusoideae commented 1 year ago

I use DialURL to connect Google LDAP. You can try this.

cert, err := tls.LoadX509KeyPair(certFile, keyFile)
if err != nil {
    return nil, err
}

certs := []tls.Certificate{cert}
tlsConfig := &tls.Config{
    ServerName:   serverName,
    Certificates: certs,
}
ldap.DialURL(url, ldap.DialWithTLSConfig(tlsConfig))
t2y commented 9 months ago

@mark-a-johnson Next time, you can ask a question on GitHub discussions.

gedw99 commented 6 months ago

Cloud Identity is $7.2/mo per user.

https://cloud.google.com/identity/#pricing