tests/e2e: add new ldap object classes
Signed-off-by: Jens Langhammer <jens.langhammer@beryju.org>
This commit is contained in:
parent
c2f3ce11b0
commit
75ef4ce596
|
@ -116,7 +116,7 @@ func (pi *ProviderInstance) Search(req SearchRequest) (ldap.ServerSearchResult,
|
||||||
"client": utils.GetIP(req.conn.RemoteAddr()),
|
"client": utils.GetIP(req.conn.RemoteAddr()),
|
||||||
}).Inc()
|
}).Inc()
|
||||||
return ldap.ServerSearchResult{ResultCode: ldap.LDAPResultOperationsError}, fmt.Errorf("Search Error: unhandled filter type: %s [%s]", filterEntity, req.Filter)
|
return ldap.ServerSearchResult{ResultCode: ldap.LDAPResultOperationsError}, fmt.Errorf("Search Error: unhandled filter type: %s [%s]", filterEntity, req.Filter)
|
||||||
case "groupofuniquenames":
|
case "groupOfUniqueNames":
|
||||||
fallthrough
|
fallthrough
|
||||||
case "goauthentik.io/ldap/group":
|
case "goauthentik.io/ldap/group":
|
||||||
fallthrough
|
fallthrough
|
||||||
|
@ -175,7 +175,7 @@ func (pi *ProviderInstance) Search(req SearchRequest) (ldap.ServerSearchResult,
|
||||||
fallthrough
|
fallthrough
|
||||||
case "organizationalPerson":
|
case "organizationalPerson":
|
||||||
fallthrough
|
fallthrough
|
||||||
case "inetorgperson":
|
case "inetOrgPerson":
|
||||||
fallthrough
|
fallthrough
|
||||||
case "goauthentik.io/ldap/user":
|
case "goauthentik.io/ldap/user":
|
||||||
fallthrough
|
fallthrough
|
||||||
|
@ -216,7 +216,7 @@ func (pi *ProviderInstance) UserEntry(u api.User) *ldap.Entry {
|
||||||
"name": {u.Name},
|
"name": {u.Name},
|
||||||
"displayName": {u.Name},
|
"displayName": {u.Name},
|
||||||
"mail": {*u.Email},
|
"mail": {*u.Email},
|
||||||
"objectClass": {UserObjectClass, "organizationalPerson", "inetorgperson", "goauthentik.io/ldap/user"},
|
"objectClass": {UserObjectClass, "organizationalPerson", "inetOrgPerson", "goauthentik.io/ldap/user"},
|
||||||
"uidNumber": {pi.GetUidNumber(u)},
|
"uidNumber": {pi.GetUidNumber(u)},
|
||||||
"gidNumber": {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 {
|
func (pi *ProviderInstance) GroupEntry(g LDAPGroup) *ldap.Entry {
|
||||||
attrs := AKAttrsToLDAP(g.akAttributes)
|
attrs := AKAttrsToLDAP(g.akAttributes)
|
||||||
|
|
||||||
objectClass := []string{GroupObjectClass, "groupofuniquenames", "goauthentik.io/ldap/group"}
|
objectClass := []string{GroupObjectClass, "groupOfUniqueNames", "goauthentik.io/ldap/group"}
|
||||||
if g.isVirtualGroup {
|
if g.isVirtualGroup {
|
||||||
objectClass = append(objectClass, "goauthentik.io/ldap/virtual-group")
|
objectClass = append(objectClass, "goauthentik.io/ldap/virtual-group")
|
||||||
}
|
}
|
||||||
|
|
|
@ -216,6 +216,7 @@ class TestProviderLDAP(SeleniumTestCase):
|
||||||
"mail": [""],
|
"mail": [""],
|
||||||
"objectClass": [
|
"objectClass": [
|
||||||
"user",
|
"user",
|
||||||
|
"inetOrgPerson"
|
||||||
"organizationalPerson",
|
"organizationalPerson",
|
||||||
"goauthentik.io/ldap/user",
|
"goauthentik.io/ldap/user",
|
||||||
],
|
],
|
||||||
|
@ -242,6 +243,7 @@ class TestProviderLDAP(SeleniumTestCase):
|
||||||
"mail": [""],
|
"mail": [""],
|
||||||
"objectClass": [
|
"objectClass": [
|
||||||
"user",
|
"user",
|
||||||
|
"inetOrgPerson"
|
||||||
"organizationalPerson",
|
"organizationalPerson",
|
||||||
"goauthentik.io/ldap/user",
|
"goauthentik.io/ldap/user",
|
||||||
],
|
],
|
||||||
|
@ -268,6 +270,7 @@ class TestProviderLDAP(SeleniumTestCase):
|
||||||
"mail": [USER().email],
|
"mail": [USER().email],
|
||||||
"objectClass": [
|
"objectClass": [
|
||||||
"user",
|
"user",
|
||||||
|
"inetOrgPerson"
|
||||||
"organizationalPerson",
|
"organizationalPerson",
|
||||||
"goauthentik.io/ldap/user",
|
"goauthentik.io/ldap/user",
|
||||||
],
|
],
|
||||||
|
|
Reference in New Issue