dorfteich/apps/api/src/auth
Claude Fable 5 6aac785841
All checks were successful
CI / Lint, typecheck, test (pull_request) Successful in 6m55s
CI / Build container images (pull_request) Successful in 3m0s
CI / Auth e2e pack (pull_request) Successful in 8m49s
CI / Import/export fidelity gate (pull_request) Successful in 58s
CD / Build and push images (push) Successful in 21s
CD / Deploy to Test (push) Successful in 14s
CD / Smoke tests against Test (push) Successful in 1m19s
CD / Promote to Int (push) Successful in 12s
CI / Lint, typecheck, test (push) Successful in 6m28s
CI / Build container images (push) Has been skipped
CI / Auth e2e pack (push) Successful in 8m15s
CI / Import/export fidelity gate (push) Successful in 59s
#217: map IdP groups and roles onto the permission model
Declarative instance setting idpMapping.rules turns ID-token claims into
pond roles and the site-admin flag on every OIDC login — configuration,
not code. Mapped grants travel through the SAME GrantsService path as
manual ones (permission cache invalidated, collab access notify fires so
live sessions revalidate — asserted by test), never raw rows.

Ownership makes precedence explicit: role_grants.origin marks mapped
rows, users.is_site_admin_managed marks a mapping-set admin flag. The
mapping only creates and revokes what it owns — manual wins: hand-made
grants and hand-promoted admins are never revoked by a missing claim (a
manual toggle clears the marker and takes ownership). Removal of a claim
revokes the mapped grant and the managed flag on the next login. Every
mapping-driven change is audited with origin idp_mapping.

Failure containment: unknown pond slugs and the last-Pond-Admin
protection log-and-skip — a mapping problem must never become a login
lockout. Tests drive real OIDC logins against the fake IdP with group
claims: grant + working access, revocation incl. notify, manual-wins,
managed site-admin promote/demote/hands-off.

Documented in permissions.md (own section), ADR 0021, data-model.md and
the hardening guide (care rule: same PR).

Refs #217.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01AUtYMxwTCMHG9mVHnwbFg8
2026-07-31 13:09:11 +02:00
..
auth-tokens.service.ts Add authentication: signup, verification, sessions, password reset 2026-07-05 05:22:31 +02:00
auth.controller.ts #216: hard AUTH_LOCAL_ENABLED switch over every local credential flow 2026-07-31 12:58:07 +02:00
auth.e2e.db.test.ts Ponds: data model, CRUD API, personal pond on verification (#21) 2026-07-05 11:08:16 +02:00
auth.guard.ts #216: hard AUTH_LOCAL_ENABLED switch over every local credential flow 2026-07-31 12:58:07 +02:00
auth.module.ts #217: map IdP groups and roles onto the permission model 2026-07-31 13:09:11 +02:00
auth.service.ts Add Site-Admin system panel with persistent audit trail (#86) 2026-07-11 20:03:05 +02:00
claim-mapping.e2e.db.test.ts #217: map IdP groups and roles onto the permission model 2026-07-31 13:09:11 +02:00
claim-mapping.service.ts #217: map IdP groups and roles onto the permission model 2026-07-31 13:09:11 +02:00
csrf.e2e.db.test.ts #189: make the CSRF origin check fail closed 2026-07-30 09:34:44 +02:00
local-auth-switch.e2e.db.test.ts #216: hard AUTH_LOCAL_ENABLED switch over every local credential flow 2026-07-31 12:58:07 +02:00
oidc.controller.ts #214: OIDC Authorization Code with PKCE, Keycloak as reference IdP 2026-07-31 12:44:52 +02:00
oidc.e2e.db.test.ts #214: OIDC Authorization Code with PKCE, Keycloak as reference IdP 2026-07-31 12:44:52 +02:00
oidc.service.ts #217: map IdP groups and roles onto the permission model 2026-07-31 13:09:11 +02:00
proxy-identity.e2e.db.test.ts #215: trusted reverse-proxy header / mTLS client-certificate path 2026-07-31 12:50:09 +02:00
proxy-identity.service.ts #215: trusted reverse-proxy header / mTLS client-certificate path 2026-07-31 12:50:09 +02:00
sessions.module.ts Add account/session endpoints and typed instance settings with admin API 2026-07-05 05:26:45 +02:00
sessions.service.db.test.ts #190: configurable session lifetime with a server-side idle timeout 2026-07-30 11:11:15 +02:00
sessions.service.ts #190: configurable session lifetime with a server-side idle timeout 2026-07-30 11:11:15 +02:00