feat(oidc): first-party consent skip + named third-party consent (BUNYIP-342 part 1) #354
Loading…
Reference in a new issue
No description provided.
Delete branch "feat/BUNYIP-342-first-party-consent-skip"
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?
The backend half of BUNYIP-342. First-party apps (Mokosh and others under Bunyip) no longer hit the consent screen; genuinely third-party clients still get consent, now carrying the client name so the screen can name the requesting app. Mirrors Google not re-prompting consent for its own core apps.
What's here
oauth_clients.first_party BOOLEAN NOT NULL DEFAULT FALSE, and flag mokosh-apps (b0000000-0000-4000-8000-000000000002) as first-party. A new column with a default, so existing offline sqlx query caches are unaffected: the onlyOAuthClientload is the runtimeload_clientquery_as, which needs no.sqlxregen.OAuthClientgainsfirst_party;load_clientselects it.handlers/oidc.rs): with missing scopes, a first-party client has them silently granted (add_scopes_to_grant, so the grant is recorded and revocable via /settings) and falls through to issue the code with no prompt. A third-party client is redirected to/oauth2/consentas before, now with&client_name=added. First-party clients still pass through the BUNYIP-62 tenant gate unchanged.Verification
just check-containergreen (fmt + clippy-D warnings+cargo test --workspace --all-targets; bunyip-oidc 266 tests). Migration smoke onpostgres:18.2-alpine3.23: all 76 migrations apply clean,first_partycolumn present (default false), mokosh-apps first_party=true, 1/4 seeded clients flagged. The live skip/named behaviour is exercised on the dev-sso OIDC flow (not gate-runnable here).AC status
client_name; the bunyip-web render is part 2.Part 2 (follow-up)
bunyip-web renders the passed
client_nameon the consent screen (replacing the generic "An application"), the Deny path is defined and handled, and the first-party-skip / third-party-named-consent flow tests land.#BUNYIP-342