fix(auth): close SSO/OIDC auth-strength and conformance gaps #202

Merged
David merged 2 commits from feat/pms-191-sso-oidc-security-gaps into main 2026-06-13 23:09:47 +02:00
Owner

Mint first-party tokens with the originating session's real acr/amr instead of a hardcoded pwd LoA, so MFA and trust-bypass sessions are reported accurately at login (auth.rs) and on tenant switch (tenants.rs looks the OP session up by sid to preserve its strength).

Enforce OIDC prompt and grant-type rules at /authorize: honor prompt=login by forcing re-auth before reusing an existing session, reject clients lacking the authorization_code grant with unauthorized_client before a code is minted, and remove the unreachable prompt=none block by checking it before the session unwrap.

Expose the authz-gating mokosh_active_tenant claim at /userinfo and advertise it in discovery claims_supported.

Verify feedback bearer tokens with EdDSA and an at+jwt typ check (was RS256, which never validated, silently treating signed-in callers as anonymous).

Record the ambiguous-email, no-such-user, and inactive-status audit events in verify_only so its failure trail matches login.

Revoke each session's refresh families on user suspend and delete, so a stolen refresh token cannot outlive the account.

#PMS-191

Mint first-party tokens with the originating session's real acr/amr instead of a hardcoded pwd LoA, so MFA and trust-bypass sessions are reported accurately at login (auth.rs) and on tenant switch (tenants.rs looks the OP session up by sid to preserve its strength). Enforce OIDC prompt and grant-type rules at /authorize: honor prompt=login by forcing re-auth before reusing an existing session, reject clients lacking the authorization_code grant with unauthorized_client before a code is minted, and remove the unreachable prompt=none block by checking it before the session unwrap. Expose the authz-gating mokosh_active_tenant claim at /userinfo and advertise it in discovery claims_supported. Verify feedback bearer tokens with EdDSA and an at+jwt typ check (was RS256, which never validated, silently treating signed-in callers as anonymous). Record the ambiguous-email, no-such-user, and inactive-status audit events in verify_only so its failure trail matches login. Revoke each session's refresh families on user suspend and delete, so a stolen refresh token cannot outlive the account. #PMS-191
fix(auth): close SSO/OIDC auth-strength and conformance gaps
Some checks failed
E2E / Playwright against staging (pull_request) Failing after 17s
Check / fmt + clippy + compile + tests (pull_request) Successful in 1m25s
Build OCI container / Build and push mokosh-api image (push) Successful in 3m37s
a4fef72d44
Mint first-party tokens with the originating session's real acr/amr instead of a hardcoded pwd LoA, so MFA and trust-bypass sessions are reported accurately at login (auth.rs) and on tenant switch (tenants.rs looks the OP session up by sid to preserve its strength).

Enforce OIDC prompt and grant-type rules at /authorize: honor prompt=login by forcing re-auth before reusing an existing session, reject clients lacking the authorization_code grant with unauthorized_client before a code is minted, and remove the unreachable prompt=none block by checking it before the session unwrap.

Expose the authz-gating mokosh_active_tenant claim at /userinfo and advertise it in discovery claims_supported.

Verify feedback bearer tokens with EdDSA and an at+jwt typ check (was RS256, which never validated, silently treating signed-in callers as anonymous).

Record the ambiguous-email, no-such-user, and inactive-status audit events in verify_only so its failure trail matches login.

Revoke each session's refresh families on user suspend and delete, so a stolen refresh token cannot outlive the account.

#PMS-191
Merge origin/main into feat/pms-191-sso-oidc-security-gaps
Some checks failed
Create release / Create release from merged PR (pull_request) Has been skipped
E2E / Playwright against staging (pull_request) Failing after 19s
Check / fmt + clippy + compile + tests (pull_request) Successful in 3m16s
fbacbde5d2
#PMS-191
David merged commit 8829844091 into main 2026-06-13 23:09:47 +02:00
David deleted branch feat/pms-191-sso-oidc-security-gaps 2026-06-13 23:09:47 +02:00
Sign in to join this conversation.
No reviewers
No labels
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
psa-systems/mokosh-server!202
No description provided.