From 75ef4ce596c06bfe7ab7b6914010bfdde9f4e689 Mon Sep 17 00:00:00 2001 From: Jens Langhammer Date: Sun, 26 Sep 2021 14:57:42 +0200 Subject: [PATCH] tests/e2e: add new ldap object classes Signed-off-by: Jens Langhammer --- internal/outpost/ldap/instance_search.go | 8 ++++---- tests/e2e/test_provider_ldap.py | 3 +++ 2 files changed, 7 insertions(+), 4 deletions(-) diff --git a/internal/outpost/ldap/instance_search.go b/internal/outpost/ldap/instance_search.go index c76cccba5..7047f76b4 100644 --- a/internal/outpost/ldap/instance_search.go +++ b/internal/outpost/ldap/instance_search.go @@ -116,7 +116,7 @@ func (pi *ProviderInstance) Search(req SearchRequest) (ldap.ServerSearchResult, "client": utils.GetIP(req.conn.RemoteAddr()), }).Inc() return ldap.ServerSearchResult{ResultCode: ldap.LDAPResultOperationsError}, fmt.Errorf("Search Error: unhandled filter type: %s [%s]", filterEntity, req.Filter) - case "groupofuniquenames": + case "groupOfUniqueNames": fallthrough case "goauthentik.io/ldap/group": fallthrough @@ -175,7 +175,7 @@ func (pi *ProviderInstance) Search(req SearchRequest) (ldap.ServerSearchResult, fallthrough case "organizationalPerson": fallthrough - case "inetorgperson": + case "inetOrgPerson": fallthrough case "goauthentik.io/ldap/user": fallthrough @@ -216,7 +216,7 @@ func (pi *ProviderInstance) UserEntry(u api.User) *ldap.Entry { "name": {u.Name}, "displayName": {u.Name}, "mail": {*u.Email}, - "objectClass": {UserObjectClass, "organizationalPerson", "inetorgperson", "goauthentik.io/ldap/user"}, + "objectClass": {UserObjectClass, "organizationalPerson", "inetOrgPerson", "goauthentik.io/ldap/user"}, "uidNumber": {pi.GetUidNumber(u)}, "gidNumber": {pi.GetUidNumber(u)}, }) @@ -226,7 +226,7 @@ func (pi *ProviderInstance) UserEntry(u api.User) *ldap.Entry { func (pi *ProviderInstance) GroupEntry(g LDAPGroup) *ldap.Entry { attrs := AKAttrsToLDAP(g.akAttributes) - objectClass := []string{GroupObjectClass, "groupofuniquenames", "goauthentik.io/ldap/group"} + objectClass := []string{GroupObjectClass, "groupOfUniqueNames", "goauthentik.io/ldap/group"} if g.isVirtualGroup { objectClass = append(objectClass, "goauthentik.io/ldap/virtual-group") } diff --git a/tests/e2e/test_provider_ldap.py b/tests/e2e/test_provider_ldap.py index 70dbca587..465da8c9d 100644 --- a/tests/e2e/test_provider_ldap.py +++ b/tests/e2e/test_provider_ldap.py @@ -216,6 +216,7 @@ class TestProviderLDAP(SeleniumTestCase): "mail": [""], "objectClass": [ "user", + "inetOrgPerson" "organizationalPerson", "goauthentik.io/ldap/user", ], @@ -242,6 +243,7 @@ class TestProviderLDAP(SeleniumTestCase): "mail": [""], "objectClass": [ "user", + "inetOrgPerson" "organizationalPerson", "goauthentik.io/ldap/user", ], @@ -268,6 +270,7 @@ class TestProviderLDAP(SeleniumTestCase): "mail": [USER().email], "objectClass": [ "user", + "inetOrgPerson" "organizationalPerson", "goauthentik.io/ldap/user", ],