Skip to content

P20 defect — Workspace API rejects real authenticated session authority #62

Description

@Techshrr

P20-D004 — Workspace API rejects real authenticated session authority

Parent verification: #53
Verification PR: #54
Frozen case: P20-T011 — Real login session and account workflow

Classification

  • Severity: P1
  • Release blocking: yes
  • Gate hard failure: yes
  • Affected gates: G3 / G6 / G10
  • Decision required: no

This is the next fail-fast P20-T011 integration defect exposed only after P20-D002's Redis login-rate checkpoint became green on the same exact-head run.

Exact discovery authority

  • Exact HEAD: c7e0cceccb4380b61ce213084a236dc4c5946f52
  • Workflow: P20 P0 Auth Timeline
  • Run: 33288665486
  • Job: 99196299445
  • Evidence artifact: 9725338440
  • Artifact digest: sha256:2e55479d2d700cda14d3f4f0a65ec01e1b64d7887df443095ab5e0458bcd4c00

The same job proves:

  • P20-T009: PASS
  • P20-T010: PASS
  • account active before login
  • real password login: HTTP 200
  • D002 rate checkpoint: PASS (login_rate_protection_observed=true, Redis key count 2)
  • real session cookie: Secure / HttpOnly / SameSite=Lax
  • /api/me: HTTP 200
  • repeated /api/me: HTTP 200 with session continuity
  • same T009/T010 user and Workspace correlation preserved
  • mock authority: false
  • secret material recorded: false

Frozen failure

When the same real authenticated session calls GET /api/workspaces:

  • HTTP status: 503
  • error code: auth_dependency_unavailable
  • workspace_api_identity_matches_t009=false

Frozen failure string:

real authenticated session is not accepted as Workspace API identity authority

Boundary diagnosis

At this exact head, internal/workspace/httpapi.go uses API.principal() with testAuthEnabled. When test auth is disabled—as required by P20 real-auth verification—the Workspace API returns 503 auth_dependency_unavailable; otherwise it reads X-GoJet-Test-* headers. Native platformapi mounts the Workspace handler independently and does not compose P15 real session authentication into the Workspace principal boundary.

Remediation constraints

  1. Do not enable GOJET_TEST_AUTH_ENABLED or inject X-GoJet-Test-* authority in P20.
  2. Do not weaken P15 server-side session/revocation/CSRF/Origin semantics.
  3. Do not reinterpret or bypass P12 Workspace membership/RBAC authority.
  4. Compose a real production principal bridge so Workspace reads the authenticated P15 session identity and then uses existing P12 membership/RBAC checks.
  5. Preserve existing test-auth fixture capability only as test-only authority where predecessor workflows require it; production and P20 real-auth paths must not depend on it.
  6. Add focused tests proving active real session → Workspace principal, revoked/expired/absent session rejection, tenant membership enforcement, and no test-header substitution when test auth is disabled.
  7. Keep P20-D003 trusted-client-IP remediation separate.
  8. T012 is not authorized until D003/D004 are closed and T011 passes on a coherent exact head.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions