ajnart / homarr

Customizable browser's home page to interact with your homeserver's Docker containers (e.g. Sonarr/Radarr)
https://homarr.dev
MIT License
6.23k stars 289 forks source link

Admin and Owner roles not assigned after OIDC Login #2108

Open pieman3000 opened 3 months ago

pieman3000 commented 3 months ago

Environment

Docker

Version

0.15.3

Describe the problem

Set up OIDC from Keycloak. Will log in, but although setting owner and admin groups both in Keycloak and through environment settings the login goes through only as a user.

Environment variables are:

AUTH_PROVIDER="oidc,credentials"
BASE_URL=example.com
NEXTAUTH_URL=https://example.com
AUTH_OIDC_URI="https://keycloak.example.com/realms/realm"
AUTH_OIDC_CLIENT_SECRET="redacted"
AUTH_OIDC_CLIENT_ID="oidc-homarr"
AUTH_OIDC_CLIENT_NAME="Keycloak"
AUTH_OIDC_ADMIN_GROUP="homarr-admin"
AUTH_OIDC_OWNER_GROUP="homarr-owner"

Logs

No response

Context

No response

Please tick the boxes

github-actions[bot] commented 3 months ago

Hi 👋. Thank you for submitting your first issue to Homarr. Please ensure that you've provided all nessesary information. You can use the three dots > Edit button to update your post with additional images and information. Depending on the current volume of requests, the team should get in conact with you shortly.

Divide1990 commented 2 months ago

I encountered a similar issue . In keycloak i defined user groups but they were not being picked up by Homarr. I then defined client roles in keycloak and added those to my user. When i did that Homarr was able to pick them up and assign the owner and/or admin role.

rpedrica commented 3 weeks ago

I also had what I think is the same or similar issue with Authentik - my oidc user in Homarr did not have any permissions. I added:

... to the docker env, and created a group in Authentik called admin, and assigned my user account there.

I now have "owner/admin" rights when logging in (according to Manage -> Users in Homarr) however my edits (eg. board changes) do not stick/save.

Any suggestions would be appreciated.

Regards, Robby