Skip to content

[AF-R09] Add production OIDC sessions and server-side Console authorization #119

Closed

Description

@KinguYume-G

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

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.

Activity

  1. added this to the Post-MVP Roadmap milestone on Aug 18, 2026
  2. self-assigned this
    on Aug 18, 2026
  3. added
    priority:P0
    size:XL
    status:ready
    risk:high
    type:backend
    type:frontend
    type:identity
    type:rbac
    type:roadmap
    and removed
    status:ready
    on Aug 18, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

priority:P0risk:highsize:XLstatus:in-progresstype:backendtype:frontendtype:identitytype:rbactype:roadmaptype:security

Type

No type

Projects

No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions