Skip to content

authelia: include profile/email/groups claims in id_token for OIDC clients#758

Open
cyberb wants to merge 2 commits into
masterfrom
moodle-oidc-idtoken-claims
Open

authelia: include profile/email/groups claims in id_token for OIDC clients#758
cyberb wants to merge 2 commits into
masterfrom
moodle-oidc-idtoken-claims

Conversation

@cyberb

@cyberb cyberb commented Jul 14, 2026

Copy link
Copy Markdown
Member

Authelia 4.39 returns standard claims (email/name/groups) only from the userinfo endpoint. OIDC clients that read identity from the id_token (Moodle's auth_oidc) can't provision users or read groups. This adds a 'syncloud' claims policy that puts those claims in the id_token and applies it to every registered client.

Backwards compatible: existing apps just receive extra id_token claims (harmless). Template-only change; no golib or registration-API change. Platform config unit tests pass.

cyberb added 2 commits July 14, 2026 13:26
…istered OIDC clients

Authelia 4.39 returns standard claims (email, name, groups, ...) only from the
userinfo endpoint by default. OIDC clients that read identity from the id_token
(e.g. Moodle's auth_oidc) therefore cannot provision users or read groups.

Add a 'syncloud' claims policy that surfaces those claims in the id_token and
apply it to every dynamically registered client. Backwards compatible: existing
apps simply receive extra id_token claims (harmless); no golib or registration
API change required.
The testapp OIDC fixture preferred the /userinfo endpoint, so the
UI test passed regardless of what the id_token contained and could
not prove the claims_policy change. Read preferred_username, email
and groups strictly from the id_token (dropping the userinfo round
trip), request the groups scope, and assert those claims in the
Playwright OIDC test.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant