-
Notifications
You must be signed in to change notification settings - Fork 1.1k
Description
Where is the problem occurring?
I encountered the problem while interacting with the server (Backend)
What browsers are you seeing the problem on?
No response
Current behavior
While setting both env variables OIDC_USERNAME_ATTRIBUTE
and OIDC_IGNORE_USERNAME=false
the usernames of users synced from an IdP (Authentik in my case) aren't set on the user objects in the Planka database.
I tried a flat attribute like OIDC_USERNAME_ATTRIBUTE=foo
and also a nested one like OIDC_USERNAME_ATTRIBUTE=attributes.custom_username
.
Login still works, the users will be created but without the username.
I guess this isn't a problem at all while using Planka, but I'm still curious whether it is possible to sync also custom usernames from an IdP attribute to the Planka DB.
The default attribute preferred_username
works like a charm, only custom ones don't.
Also logs don't point out anything (neither on the Planka nor on the IdP side).
Desired behavior
While having OIDC_IGNORE_USERNAME=false
and OIDC_USERNAME_ATTRIBUTE=attributes.custom_username
set and having something like "attributes" : { "custom_username" : "foo" }
in the JWT payload, I'd expect to see the DB column username
in the user_account
table set to foo
Steps to reproduce
- Set
OIDC_IGNORE_USERNAME=false
as env variable - Set
OIDC_USERNAME_ATTRIBUTE=attributes.custom_username
as env variable - Check that JWT payload of Authentik contains
"attributes" : { "custom_username" : "foo" }
- Perform Planka SSO login
- Perform
select id, email, updated_at,username from user_account;
on the Planka DB
Other information
No response