From 81056c3889915c501b0e61ae7c3796cf997dd7dd Mon Sep 17 00:00:00 2001 From: Andreas Egli Date: Fri, 14 May 2021 12:58:27 +0200 Subject: [PATCH] LDAP: use username instead of name for user dn (#883) --- outpost/pkg/ldap/instance_search.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/outpost/pkg/ldap/instance_search.go b/outpost/pkg/ldap/instance_search.go index 913adcbb2..959fe52a0 100644 --- a/outpost/pkg/ldap/instance_search.go +++ b/outpost/pkg/ldap/instance_search.go @@ -117,7 +117,7 @@ func (pi *ProviderInstance) Search(bindDN string, searchReq ldap.SearchRequest, attrs = append(attrs, AKAttrsToLDAP(u.Attributes)...) - dn := fmt.Sprintf("cn=%s,%s", *u.Name, pi.UserDN) + dn := fmt.Sprintf("cn=%s,%s", *u.Username, pi.UserDN) entries = append(entries, &ldap.Entry{DN: dn, Attributes: attrs}) } }