mirror of
https://github.com/fosrl/pangolin.git
synced 2026-05-21 17:20:36 -05:00
[GH-ISSUE #671] Issue Setting Up Authelia as OIDC Provider #10322
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 @polamoros on GitHub (May 4, 2025).
Original GitHub issue: https://github.com/fosrl/pangolin/issues/671
I think it's probably a misconfiguration on my end, but after trying different settings that work for other clients with no luck, I'm reporting this in case someone knows what's going on..
My authelia client configuration
Identity Provider config in Pangolin

I keep getting

User identifier not found in the ID tokenand Pangolin logs
@seamon67 commented on GitHub (May 4, 2025):
Changing Identifier Path to preferred_username worked for me in Authentik.
@polamoros commented on GitHub (May 4, 2025):
@arunabh-hazarika thanks! I tested this already with no luck.. thanks anyways :)
@boomam commented on GitHub (May 5, 2025):
Same issue here, using the following settings -
@miloschwartz commented on GitHub (May 5, 2025):
@boomam Curious - if you add a trailing slash to the URLs, do you see any difference?
@boomam commented on GitHub (May 5, 2025):
Yes, but only a different error -
@boomam commented on GitHub (May 5, 2025):
Yes.
@miloschwartz commented on GitHub (May 5, 2025):
If you're still getting the user identifier not found in the token error then it's likely there is no claim for
emailavailable at the path. This seems to be a list of claims for Authelia: https://www.authelia.com/integration/openid-connect/openid-connect-1.0-claims/We will log the full token to debug logs in the next version so this is stuff is easier to debug for the first time.
@boomam commented on GitHub (May 5, 2025):
Can you expand your Authelia theory in more detail please?
Are you saying that perhaps Pangolin require a custom claims profile?
@miloschwartz commented on GitHub (May 5, 2025):
If the Identifier Path is set to email, then the email has to be available like below:
You can test this with JMESPath here.
I don't know why this wouldn't be included in the claims with Authelia though.
@boomam commented on GitHub (May 5, 2025):
Ordinary it would/does, it's a common claim type.
I'll check configs and compare, as I know some OIDC clients (ironically, Cloudflare...) needed a custom claims profile.
I'll let you know what I find as it would be worth adding a known working config to the docs, if it indeed an Authelia issue.
@boomam commented on GitHub (May 6, 2025):
@miloschwartz i've tested with a custom claims profile, along with ensuring that 'email' was part of the scope in Authelia - the issue remains.
@james-d-elliott commented on GitHub (May 6, 2025):
This is caused due to authelia implementing claims hydration in the conformant way where claims only exist in the appropriate place. Since Pangolin does not use the implicit flow solely returning an ID Token the ID Token, and Pangolin is not requesting the claims be present in the ID Token, these claims shouldn't be present in the ID Token and should instead be retrieved using the Access Token from the UserInfo Endpoint.
Please feel free to take a look at a Blog Article (specifically claims availability) for a mid level explanation on all of these nuances with the spec which will assist with resolving this bug. We have a formal workaround for clients that do not properly support the spec documented here which has been confirmed to work in this instance.
@miloschwartz commented on GitHub (May 7, 2025):
@james-d-elliott Thanks for jumping in here. Will look at those resources and see what I can do, but glad there is a temporary work around.
@james-d-elliott commented on GitHub (May 7, 2025):
No worries, let me know if I can clarify anything. It is rough but fairly sure it'll make sense. One thing not noted is Authelia supports requesting just the
openidscope and extending the claims in the ID Token via the claims parameter provided the client registration permits the client to request a scope that has access to the requested claim.@boomam commented on GitHub (May 7, 2025):
@miloschwartz
Forgot to come back to this last night - the new claims profile did actually work, but as it was a configmap change (in my case) it didn't apply to the active pods running Authelia. A daemonset restart resolved that.
For others having the issue, there is a new guide on the Authelia doc site that covers the steps to resolve.
@AstralDestiny commented on GitHub (May 22, 2025):
Well the Calvary has arrived.
@C8opmBM commented on GitHub (May 24, 2025):
Hello and I don't know if this has been fixed, I tried all combinations, provisioning on/off, somehow I'm getting this error every time:
TypeError: contains() expected argument 1 to be type string,array but received type null instead.My authelia users are like these:
My role mapping path is
contains(groups, 'admins') && 'Admin' || 'Member'and org pathcontains(groups, 'users')which normally would cover it.Any help would be appreciated.
Thanks!
@miloschwartz commented on GitHub (May 26, 2025):
My guess is this is related to the shape of the token not being what you expect. Maybe the
groupskey is null/undefined at the expected location?You can try to inspect the payload by setting Pangolin's log level to debug and trying to log in with the IdP with auto provision on. It should print the payload to the logs.
@C8opmBM commented on GitHub (May 26, 2025):
Somehow it cannot assign the role based on groups:
What I managed to do is to set the default role mapping 'Admin' and organization mapping 'myorg' and this way I'm provisioned with an Admin (with a long uuid username as described in https://github.com/fosrl/pangolin/issues/762).
So there's no way to autoselect the role based on the groups within Authelia (at least in my case) and the username and email are not fetched. Still, I'm glad I made it work so far. Thanks.
@miloschwartz commented on GitHub (May 27, 2025):
Based on these claims from your logs, there is no groups key in the payload:
@C8opmBM commented on GitHub (May 27, 2025):
Thanks @miloschwartz
I don't know if there's anything to do at my end, as I'm using the standard User / Password File configuration template in authelia, which does include
groupskey.@james-d-elliott commented on GitHub (May 27, 2025):
The ID Token only containing those claims is a completely expected behavior. An escape hatch exists in Authelia for the purpose of working around clients which don't handle this part of the spec correctly as described here and here (actual link).
The fundamental issue is that no claims have been requested (i.e. authorization
claimsparameter) to be present in the ID Token. The only available claims are accessible are via the Access Token scope (i.e. authorizationscopeparameter), which is not being utilized at the designated UserInfo endpoint to obtain the claims, where these claims should be expected to be present in a scenario that doesn't use theclaimsparameter, and is not an Implicit Flow resulting in solely and ID Token (i.e. no Access Token).From 5.4. Requesting Claims using Scope Values:
@momsi commented on GitHub (Jun 1, 2025):
I'm sorry, maybe I want a bit much and understand to little... I managed to setup pangolin and authelia. I understand that pangolin is not utilizing the claims with OIDC to spec and that causes some problems. Now I use the "sub" claim to ID users, which of course leads to the users having incomprehensible names. up until here, I think I understand what happens.
What I dont understand is how to work around this and get a readable name from authelia in pangolin.
Can someone help me out with some instructions?
@github-actions[bot] commented on GitHub (Jun 16, 2025):
This issue has been automatically marked as stale due to 14 days of inactivity. It will be closed in 14 days if no further activity occurs.
@github-actions[bot] commented on GitHub (Jun 30, 2025):
This issue has been automatically closed due to inactivity. If you believe this is still relevant, please open a new issue with up-to-date information.