OIDC groups claim from org teams (+ Parseable template) #5
Loading…
Reference in a new issue
No description provided.
Delete branch "feat/oidc-groups-claim"
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?
OIDC
groupsclaim from org teamsAdds a standard, flat
groupsOIDC claim so relying parties that map group names to roles (Parseable, Grafana, Argo CD, Kubernetes) work against Forseti out of the box. This is phase 1 of "roles & groups": governance roles (owner/member) are untouched; teams become the group source, with clean seams left for a future role catalog.What it does
groupsOAuth scope. When granted, the id_token (and userinfo) carry"groups": [...], a flat array of the user's team slugs in their active org.org_teams); no new tables, no migration.[]) when the scope is granted and the user has no teams, so apps can tell "no groups" from "claim not requested".groups_truncatedboolean (operator/audit signal).groups_count/groups_truncatedrecorded in theOAUTH_CONSENT_GRANTEDaudit event.Also included
/admin/clients/new(openid profile email groups, redirect/api/v1/o/code), with setup guidance for theP_OIDC_*env vars and the team-slug-to-role mapping.groups/groups_truncatedtables, a group-based-roles section (including the cross-org slug caveat), and org-internals.Known sharp edge
A
groups-only token carries no org discriminator, and slugs are unique per org, not globally. An app deriving roles from bare slugs for a multi-org user should also requestorgand key on(org, slug), or restrict the client to a single org. Documented in the integration guide.Testing
Unit tests cover the slug projection, rename immutability/collision, the helper query, scope description, and claim emission (absent/empty/truncated). Integration tests for the full consent flow are added and compile; they self-skip without a live Hydra/Kratos stack, so run them against the stack before relying on the merge.
Follow-ups (out of scope)
Refresh-token hook, wiring membership removal to consent-session revocation, a custom role catalog (phase 2), and a Parseable logo asset (currently a letter tile).