Skip to content

Commit f3e3513

Browse files
committed
ldap: Add TODO note about STARTTLS/SASL authentication
1 parent 4f2318e commit f3e3513

1 file changed

Lines changed: 6 additions & 0 deletions

File tree

internal/service/ldap_service.go

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -75,6 +75,12 @@ func (ldap *LdapService) connect() (*ldapgo.Conn, error) {
7575
var conn *ldapgo.Conn
7676
var err error
7777

78+
// TODO: There's also STARTTLS (or SASL)-based mTLS authentication
79+
// scenarion, where we first connect to plain text port (389) and
80+
// continue with a STARTTLS negotiation:
81+
// 1. conn = ldap.DialURL("ldap://ldap.example.com:389")
82+
// 2. conn.StartTLS(tlsConfig)
83+
// 3. conn.externalBind()
7884
if ldap.cert != nil {
7985
conn, err = ldapgo.DialURL(ldap.config.Address, ldapgo.DialWithTLSConfig(&tls.Config{
8086
MinVersion: tls.VersionTLS12,

0 commit comments

Comments
 (0)