Repository navigation
Closed
Labels
priority:P0Critical for current gaterisk:highSecurity/reliability criticalsize:XLExtra-large change; split if possiblestatus:in-progressActive worktype:backendBackend and core application worktype:frontendWeb console and user interfacetype:identityAuthentication and identitytype:rbacRole-based access controltype:roadmapPost-MVP roadmap worktype:securitySecurity
Milestone
Description
Objective
Replace the development-only Console persona tokens with a production-shaped OIDC/JWKS server session and enforce tenant-scoped RBAC on every Console BFF and FastAPI request. Provide a local Keycloak profile for reproducible development while keeping the implementation provider-neutral.
Synchronize authoritative status documents after PR #118: AF-R04–AF-R08 are merged and verified; the project has entered production-readiness Phase B.
Non-Goals
- No UI-only authorization or trust in client claims.
- No general ABAC, new Agent roles, microservice split, or production deployment.
- No real provider Secret in source, browser bundles, prompts, traces, logs, or Issue text.
- No removal of the explicitly gated local-MVP profile required for regression/demo.
Acceptance Criteria
- Accepted design records OIDC issuer/audience/JWKS/session/cookie/CSRF/logout boundaries and failure behavior.
- Local Keycloak Compose profile provisions Developer, Reviewer and Admin groups without hard-coded production credentials.
- Console uses secure server-side sessions; browser JavaScript, storage and HTML contain no bearer/local persona token.
- FastAPI validates issuer, audience, expiry, signature and tenant membership, then applies existing RBAC/capabilities.
- Developer cannot approve its own Run; Reviewer and Admin permissions remain deterministic and tenant bound.
- Expired/revoked/forged tokens, CSRF, session fixation, cross-tenant access and role escalation fail closed.
- Local Persona auth is rejected in production and remains default-off.
- Backend/frontend contracts, login/logout/session-expiry UX, docs, traceability and post-merge Handoff are updated.
- Design Note and Test Plan are committed before business implementation.
Dependencies
- PR feat: deliver governed local full-stack MVP #118 merged successfully.
- AF-R04–AF-R08 / Issues [AF-R04] Approve development-only Ollama and trusted-loopback profile #113–[AF-R08] Validate and document the local full-stack MVP #117 completed.
- Existing OIDC/JWKS, RBAC, tenant and Console BFF foundations must be reused.
- Approved runtime dependency:
openid-clientv6, used server-side only for standards-compliant OIDC discovery and Authorization Code + PKCE; the lockfile must pin the resolved dependency graph and supply-chain checks must pass. - No Auth.js or Redis-backed authentication package is approved for AF-R09.
Risk
High: authentication, tenant isolation and Human Approval authorization.
Test Plan
- OIDC/JWKS unit and negative tests: issuer, audience, expiry, key rotation, malformed claims and unavailable IdP.
- Database/component tests for membership, capabilities, separate-human approval and tenant isolation.
- Console tests for secure cookie session, CSRF, login/logout, expiry, denied roles and no Secret/client-token leakage.
- Browser E2E against local Keycloak for Developer and Reviewer personas.
- Regression: complete local dry-run Run flow, backend coverage ≥90%, frontend test/lint/type/build.
- Credential scan and log/trace redaction verification.
Authorization
Project Owner authorized the complete production-readiness roadmap in chat on 2026-08-18. This Issue is the first ready work item. Human Review and Human Merge remain mandatory.
Metadata
Metadata
Assignees
Labels
priority:P0Critical for current gaterisk:highSecurity/reliability criticalsize:XLExtra-large change; split if possiblestatus:in-progressActive worktype:backendBackend and core application worktype:frontendWeb console and user interfacetype:identityAuthentication and identitytype:rbacRole-based access controltype:roadmapPost-MVP roadmap worktype:securitySecurity
Activity