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
The value is currently used as a key for UserInfoProvider when retrieving UserInfo.
The original idea was to retrieve UserInfo using the provider determined on the user's first login, i.e. when the USERS record is created. Reasoning being that we needed UserInfo not only for the current user, but also for users that might not be currently logged in so we better save the original provider with the user entry.
Unfortunately, this scheme doesn't work for users that log in using multiple providers, e.g. same user logging in using LDAP today and OIDC tomorrow. There are already some situations when we swap USER_TYPES dynamically to match the current user's current realm.
I propose:
deprecate Java enum UserType and all its uses (drop/null the column eventually)
remove UserInfoProvider#create - user creation should be handled by UserManager, not by extension points
retrieve UserInfoProviders by using the current user's UserPrincipal#getRealm value and the only place where we should use UserInfoProviders directly are:
UserManager, when creating new user entries
when fetching UserInfo for the current user
all other places where we need UserInfo we should fetch it from the DB
provider-specific stuff like UserLdapGroupSynchronizer can still use "their own" UserInfoProviders freely whenever needed
Am I missing anything? Are there any other uses for USERS.USER_TYPE (besides being a confusing equivalent of UserPrincipal#getRealm)?
The text was updated successfully, but these errors were encountered:
Let's deprecate and remove USERS.USER_TYPE.
The value is currently used as a key for UserInfoProvider when retrieving UserInfo.
The original idea was to retrieve UserInfo using the provider determined on the user's first login, i.e. when the USERS record is created. Reasoning being that we needed UserInfo not only for the current user, but also for users that might not be currently logged in so we better save the original provider with the user entry.
Unfortunately, this scheme doesn't work for users that log in using multiple providers, e.g. same user logging in using LDAP today and OIDC tomorrow. There are already some situations when we swap USER_TYPES dynamically to match the current user's current realm.
I propose:
UserType
and all its uses (drop/null the column eventually)UserInfoProvider#create
- user creation should be handled byUserManager
, not by extension pointsUserPrincipal#getRealm
value and the only place where we should use UserInfoProviders directly are:UserManager
, when creating new user entriesAm I missing anything? Are there any other uses for USERS.USER_TYPE (besides being a confusing equivalent of UserPrincipal#getRealm)?
The text was updated successfully, but these errors were encountered: