Skip to content

fix(auth): Add authentication to /api/docs endpoints (Invariant #8) #452

Closed

Description

@vybe

Problem

src/backend/routers/docs.py exposes three endpoints with no auth dependency, violating Architectural Invariant #8 (Auth Pattern: Depends(get_current_user) on every authenticated endpoint).

  • Line 33: GET /api/docs/index
  • Line 51: GET /api/docs/content/{slug:path}
  • Line 102: GET /api/docs/list

These serve markdown documentation from config/process-docs/ (process engine user documentation).

Context

The Process Engine is currently dormant / out of scope (see CLAUDE.md). These endpoints are consumed by the in-app docs viewer. Two reasonable resolutions:

  • Option A (preferred): Add Depends(get_current_user) to all three endpoints. Low-risk, tiny diff, aligns with invariant.
  • Option B: Remove the router + config/process-docs/ entirely since Process Engine is dormant. Larger cleanup, may be premature if Process Engine is eventually revived.

Recommend Option A — cheapest fix, preserves the docs viewer if Process Engine ever comes back.

Acceptance Criteria

References

Activity

  1. added
    priority-p2
    security
    severity-low
    on Apr 22, 2026
  2. vybe commented on Apr 27, 2026

    @vybe
    ContributorAuthor

    Closed by merged PR.

  3. added a commit that references this issue on Apr 30, 2026
  4. added
    complexity-low
    theme-security
    on Jun 3, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    complexity-lowpriority-p2securityseverity-lowtheme-security

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions