You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
_, _=w.Write([]byte(fmt.Sprintf("identity domain of %q doesn't match LDAP upndomain of %q", identity.Domain(), ldapCfg.ConfigEntry.UPNDomain)))
return
}
authenticated=true
mandates that you have upndomain set inauth/kerberos/config/ldap - if left empty, the check on this line fails because the Identity domain (the Kerberos realm of the SPNEGO user authenticating) isn't an empty string.
and you either force the LDAP userattr to be userPrincipalName of the form <name>@<upndomain>, or you respect the userattr setting but assume the value is always <name>@<upndomain> (depending on which path you go down),.
This functionally assumes you're always using Microsoft Active Directory (or an LDAP schema that matches it), precluding the use of, for example, an OpenLDAP rfc2703bis schema:
dn: uid=alice,ou=Users,dc=example,dc=local
objectClass: account
objectClass: posixAccount
cn: alice
uid: alice
uidNumber: 10000
gidNumber: 10000
homeDirectory: /home/alice
loginShell: /bin/bash
gecos: alice
description: User account
dn: cn=devs,ou=Groups,dc=example,dc=local
objectClass: posixGroup
cn: devs
gidNumber: 10000
description: Group account
memberUid: alice
Make the Domain == UPNDomain check configurable - users with an ldap schema which does not record the users Kerberos domain could disable it, mindful of the edge case that's trying to protect against
Even if you do make that configurable, setting upndomain in the ldaputil helper now assumes that your userattr is called userPrincipalDomain, which may not be the case if you're not using Active Directory as your LDAP.
The text was updated successfully, but these errors were encountered:
The check in
vault-plugin-auth-kerberos/path_login.go
Lines 134 to 146 in 95fd8b8
mandates that you have
upndomain
set inauth/kerberos/config/ldap
- if left empty, the check on this line fails because theIdentity
domain (the Kerberos realm of the SPNEGO user authenticating) isn't an empty string.Further on in
vault-plugin-auth-kerberos/path_login.go
Line 206 in 95fd8b8
GetUserBindDN
.That calls
https://github.com/hashicorp/vault/blob/0f1a1b8b26affc9401c094dd567b4a0717df1c01/sdk/helper/ldaputil/client.go#L107
and you either force the LDAP
userattr
to beuserPrincipalName
of the form<name>@<upndomain>
, or you respect theuserattr
setting but assume the value is always<name>@<upndomain>
(depending on which path you go down),.This functionally assumes you're always using Microsoft Active Directory (or an LDAP schema that matches it), precluding the use of, for example, an OpenLDAP rfc2703bis schema:
The following configuration was used:
Potential fixes:
Domain == UPNDomain
check configurable - users with an ldap schema which does not record the users Kerberos domain could disable it, mindful of the edge case that's trying to protect againstupndomain
in theldaputil
helper now assumes that youruserattr
is calleduserPrincipalDomain
, which may not be the case if you're not using Active Directory as your LDAP.The text was updated successfully, but these errors were encountered: