feat/bunyip-op-cutover #52
No reviewers
Labels
No labels
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
psa-systems/mokosh-server!52
Loading…
Reference in a new issue
No description provided.
Delete branch "feat/bunyip-op-cutover"
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?
Stage-1 wiring on feat/bunyip-op-cutover. Inserts the bunyip-as-OP path at the TOP of the verification ladder so PSA /api/v1/* accepts tokens minted by bunyip-api as soon as OIDC_ISSUER + OIDC_AUDIENCE are configured. The two legacy paths stay underneath so existing sessions don't break during the cutover: 1. (new) Bunyip RS: at+jwt verified against bunyip's JWKS; on success JIT-mirror (sub, email) into public.users via AuthService::upsert_user_from_oidc. 2. (existing) Legacy mokosh-auth at+jwt (the IdP code path being retired). 3. (existing) Legacy HS256 cookie (customer portal + transitional dashboard). Per docs/new-auth/mokosh/03-mokosh-server-rs-cutover.md §3.3: - email comes from /oauth2/userinfo (the at+jwt has no email claim per RFC 9068); on userinfo failure we still insert with a placeholder ("<sub>@unresolved.invalid") so the request can proceed and a later request refreshes. - tenant_id falls back to OIDC_DEFAULT_TENANT_ID, defaulting to Uuid::from_u128(1) (matching auth::bootstrap default_tenant_id). v1 has no real multi-tenant claim plumbing. - role defaults to UserRole::default() (Technician), matching the safest least-privilege default for a fresh PSA login. Promotion is admin-driven, same as before. create_api_router gets a new bunyip_verifier: Option<oidc_rs::Verifier> parameter; main.rs builds it from env. When the env isn't set the verifier is None and the middleware skips path 1 entirely, so this change is a no-op on any deployment that hasn't flipped to bunyip yet.