Homarr failing to get Admin roles(groups from Keycloak OIDC (SOLVED)

When I attempt to login with a user assigned the admin role in keycloak the user in not authenticated as an Admin in Homarr
No description
No description
Solution:
Upon further investigation, looks like a Keycloak issue: - Keyclaok is not sending the admin role - Decided to switch the Homarr admin group to "uma_authorization" (a role that was passed thru) and Homarr worked as expected...
Jump to solution
19 Replies
Cakey Bot
Cakey Bot3d ago
Thank you for submitting a support request. Depending on the volume of requests, our team should get in contact with you shortly.
⚠️ Please include the following details in your post or we may reject your request without further comment: - Log (See https://homarr.dev/docs/community/faq#how-do-i-open-the-console--log) - Operating system (Unraid, TrueNAS, Ubuntu, ...) - Exact Homarr version (eg. 0.15.0, not latest) - Configuration (eg. docker-compose, screenshot or similar. Use ``your-text`` to format) - Other relevant information (eg. your devices, your browser, ...)
Frequently Asked Questions | Homarr documentation
Can I install Homarr on a Raspberry Pi?
Zeroturnpete
ZeroturnpeteOP3d ago
I have an "admin" role setup in the keycloak Admin UI
Zeroturnpete
ZeroturnpeteOP3d ago
No description
Zeroturnpete
ZeroturnpeteOP3d ago
and have my SSO account included:
Zeroturnpete
ZeroturnpeteOP3d ago
No description
Manicraft1001
Manicraft10012d ago
!qa leaked_secret_key
Cakey Bot
Cakey Bot2d ago
Our team noted that at least one of your messages contains a secrets encryption key used in Homarr. As documented at the installation docs, the secrets encryption key is a cruicial key that will be used to encrypt your data. By posting this key you compromised part of your security and we strongly recommend you to change it, since malicious acters could gain access to your integration passwords, usernames and tokens by decrypting your database if they gain access to said database. To do this, update the secrets encryption key variable. Doing so will break all integrations and you must manually re-enter the secrets again. Manually removing it after posting does not fix your issue since automated bots can and will scrape messages for leaked data. To avoid such problems in the future, please always remove the encryption key when posting online. The Homarr team will never ask you for any passwords or the secrets encryption key.
Docker | Homarr documentation
Docker is our recommended installation method for beginners and professionals.
Manicraft1001
Manicraft10012d ago
@Meierschlumpf can you take a look?
Meierschlumpf
Meierschlumpf2d ago
@Zeroturnpete you'll need to add microprofile-jwt to the scopes (instead of roles)
Zeroturnpete
ZeroturnpeteOP21h ago
No worries on the key, its a dev instance Going to try this tomorrow should the ODIC_GROUPS_ATTRIBUTE stay the same?
Meierschlumpf
Meierschlumpf21h ago
I haven't configured that on my local test instance, so try to leave it empty
Zeroturnpete
ZeroturnpeteOP21h ago
getting correct openID calls now
Zeroturnpete
ZeroturnpeteOP21h ago
No description
Zeroturnpete
ZeroturnpeteOP21h ago
still failing to auth as admin. checking logs now still not having any luck, I didm't see any group membership getting passed thru in the logs for your Setup are you using Keycloak as you ODIC, It might help me to see your keycloak group config P.S. Thank you for being responsive, arguably one of the best support experiences I'vee had had this year a call might be the fastest way to resolve this
Meierschlumpf
Meierschlumpf20h ago
I'll look into it tonight 👍🏽 (CEST)
Solution
Zeroturnpete
Zeroturnpete20h ago
Upon further investigation, looks like a Keycloak issue: - Keyclaok is not sending the admin role - Decided to switch the Homarr admin group to "uma_authorization" (a role that was passed thru) and Homarr worked as expected
Zeroturnpete
ZeroturnpeteOP19h ago
working to get keycloak to pass thru the correct roles No Need! Stayed up until 2am local to fix this turns out it was a keycloak role issue The role needed to be assigned at a realm level not a client level Thank you for the help with the "microprofile-jwt" addition to the compose file!
Zeroturnpete
ZeroturnpeteOP19h ago
for any one wondering here is where roles should be added:
No description
Meierschlumpf
Meierschlumpf17h ago
Pkay great that you were able to fix it, good night

Did you find this page helpful?