idp: Use the UUID attribute for computing the "sub" claim

This avoids that recreating the user with the same name will create the
same "sub" claim. Even though it gets a new UUID

Fixes: #904
This commit is contained in:
Ralf Haferkamp
2023-05-16 17:25:55 +02:00
committed by Ralf Haferkamp
parent c37e8350df
commit 2baf86900d
3 changed files with 12 additions and 1 deletions
@@ -122,7 +122,7 @@ func DefaultConfig() *config.Config {
LoginAttribute: "uid",
EmailAttribute: "mail",
NameAttribute: "displayName",
UUIDAttribute: "uid",
UUIDAttribute: "ownCloudUUID",
UUIDAttributeType: "text",
Filter: "",
ObjectClass: "inetOrgPerson",
+1
View File
@@ -197,6 +197,7 @@ func initLicoInternalLDAPEnvVars(ldap *config.Ldap) error {
"LDAP_EMAIL_ATTRIBUTE": ldap.EmailAttribute,
"LDAP_NAME_ATTRIBUTE": ldap.NameAttribute,
"LDAP_UUID_ATTRIBUTE": ldap.UUIDAttribute,
"LDAP_SUB_ATTRIBUTES": ldap.UUIDAttribute,
"LDAP_UUID_ATTRIBUTE_TYPE": ldap.UUIDAttributeType,
"LDAP_FILTER": filter,
}