mirror of
https://github.com/plankanban/planka.git
synced 2026-02-05 00:39:58 +03:00
After enabling OIDC and authenticating via Authentik I lost admin ability #627
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @the-bort-the on GitHub (Jan 9, 2025).
Before enabling OIDC and integrating Authentik, I used the demo user to create a new admin user. I then disabled the demo user and had been using the basic auth for this new admin user.
After configuring OIDC I am able to log into Planka, but after doing so, I noticed my admin user was overwritten by my Authentik user. While this isn't the end of the world, I did noticed I lost my admin capabilities. Looking to the database I tried to update the column
is_admintotwithin theuser_accounttable.This worked until I restarted the container. Is there something else needed to permanently provide myself admin? It also seems since I enabled OIDC, I cannot comment out the OIDC variables within docker-compose.yml. It says I need to use SSO. I wonder if I'm
locked intoSSO now?@the-bort-the commented on GitHub (Jan 10, 2025):
Even a logout / login will change that boolean flag back to false for is_admin
@meltyshev commented on GitHub (Jan 17, 2025):
Hi!
To ensure you always have admin privileges, you need to either uncomment
OIDC_IGNORE_ROLES=trueand modify the role directly in the database, or configure OIDC groups and setOIDC_ADMIN_ROLES=adminwithOIDC_ROLES_ATTRIBUTE=groups.Regarding SSO locking, it can't currently be modified through the UI. However, you can update the
is_ssofield for a specific user directly in the database.@the-bort-the commented on GitHub (Jan 20, 2025):
If I uncomment
OIDC_IGNORE_ROLES=trueand alter the table in the database, I see theis_adminstay enabled. However, when I commentOIDC_ADMIN_ROLES=adminwithOIDC_ROLES_ATTRIBUTE=groupsI am still seeing the behavior in my original comments.I would like to clarify when using
OIDC_ADMIN_ROLES=adminwithOIDC_ROLES_ATTRIBUTE=groupsam I also supposed to use an account within Authentik with both a name and username of "admin"? I see in theuser_accounttable, there are two columns; one for name and another for username. The values for those are currentlyauthentik Default Adminandakadminrespectively.@meltyshev commented on GitHub (Jan 20, 2025):
I just checked on my test Authentik instance, and the default admin group name is
authentik Admins(Directory -> Users -> Groups). If I setOIDC_ADMIN_ROLES=authentik Admins, the user will become an admin upon logging in. Alternatively, you can create a new group under Directory -> Groups, assign it to a user, and then specify it inOIDC_ADMIN_ROLES.@the-bort-the commented on GitHub (Jan 20, 2025):
That was the fix, thank you! I set
OIDC_ADMIN_ROLES=authentik Adminsand it persisted the admin role when logging in.