Skip to content

fix(settings): changing OIDC sign-in trust needs full authority (#387) - #496

Merged
mkluiver merged 1 commit into
mainfrom
fix/387-oidc-trust-authority
Nov 25, 2026
Merged

mkluiver merged 1 commit into
mainfrom
fix/387-oidc-trust-authority

Conversation

@mblaauw

@mblaauw mblaauw commented Nov 25, 2026

Copy link
Copy Markdown
Collaborator

Closes #387.

Summary

A delegated settings:write role could replace the OIDC issuer, JWKS URL,
audience, client id, redirect URI, provisioning and role-sync rules or the
team mappings. After a restart that locked out every user who had signed in
and let the new identity provider link never-signed-in accounts (Owners
included) by email; team mappings could also grant access-team lead, which
the #324 role ceiling does not cover.

update_oidc now compares the trust fields (issuer, jwksUrl, audience,
clientId, redirectUri, emailClaim, roleClaim, autoProvision, syncRoles,
requireVerifiedEmail, requireMappedGroup, teamGroups, autoCreateTeams)
against the stored settings and calls require_full_authority when any
changes, naming them in the 403. Role mappings (defaultRole, groupRoles)
and scopes keep the #324 ceiling. The audit entry is unchanged.

Testing

  • cargo fmt --check, clippy --workspace --all-targets -D warnings: clean
  • cargo test --workspace with a database: 0 failures (188 API integration tests, 98 orbit-api unit tests)
  • New ceiling_tests case for all 13 trust fields; the settings ceiling API test now covers issuer/JWKS, team mappings and audience (403) and a role-mapping edit (200)
  • pnpm docs:check: passed

Note: emailClaim is treated as a trust field too (it decides identity linking), although the issue did not list it.

🤖 Generated with Claude Code

A delegated settings:write role could replace the OIDC issuer, JWKS URL,
audience, client id, redirect URI, provisioning and role-sync rules or the
team mappings. After a restart that locked out every user who had signed in
and let the new identity provider link never-signed-in accounts (Owners
included) by email; team mappings could also grant access-team lead, which
the #324 role ceiling does not cover.

update_oidc now compares the trust fields (issuer, jwksUrl, audience,
clientId, redirectUri, emailClaim, roleClaim, autoProvision, syncRoles,
requireVerifiedEmail, requireMappedGroup, teamGroups, autoCreateTeams)
against the stored settings and calls require_full_authority when any
changes, naming them in the 403. Role mappings (defaultRole, groupRoles)
and scopes keep the #324 ceiling. The audit entry is unchanged.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@mkluiver
mkluiver merged commit 191b2f3 into main Nov 25, 2026
15 checks passed
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.

settings:write can replace the OIDC issuer and JWKS without full authority, locking users out or linking never-signed-in accounts

2 participants