Skip to content

[FEATURE] LDAP connection with certificate/key? #499

@plaes

Description

@plaes

Is your feature request related to a problem? Please describe.
Currently, only option to connect to LDAP seems to be by using password/username. It should be possible authenticate to external LDAP server by using client certificate (using certificate and key).

Describe the solution you'd like
Add possibility to use client certificate authentication.

Describe alternatives you've considered

I tried to connect to Google LDAP service using password/username, but apparently it is not working as expected and it's not really a recommended way either.

Additional context

Ldap library already should have support for this, by using DialURL method:

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));

Metadata

Metadata

Assignees

Labels

enhancementNew feature or request

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions