Skip to content

BUG-07: docs.public has no effect, so the API docs cannot be put behind sign-in #134

Closed

Description

@ephico2real2

Part of #13

What is wrong: The instance setting docs.public has no effect. The design says that docs.public can put Swagger UI, ReDoc and the spec behind sign-in. The code reads only docs.enabled.

Where: cmapi/src/cmapi/main.py:52, :54 and :84. They read docs_cfg.get("enabled", True) and never read public. The design is docs/01-design-and-architecture.md:711.

How to prove it: Set docs.public: false in the test instance.yaml. GET /openapi.json without a token must return 401. Today it returns 200.

Measured or inferred: Measured by reading the code at 0c79108: grep -n public cmapi/src/cmapi/main.py finds only publicUrl. The 401 result is inferred until the test runs.

Severity: Medium. An operator who sets docs.public: false expects the API map to need sign-in, and it does not.

What must hold after the fix: With docs.public: false, the five docs paths need a valid token, and return 401 with WWW-Authenticate without one. With docs.public absent or true, they stay public, as docs/01 says.

Research: How Swagger UI and ReDoc pages can load behind a bearer token. The page needs a sign-in redirect, because the browser does not send a bearer token on a page load.

Class: INV. The fix adds a control.

Activity

  1. added
    bug
    class:INV
    status:open
    sev:medium
    Backlog
    on Nov 13, 2026
  2. added
    In-Progress
    and removed
    Backlog
    on Nov 13, 2026
  3. ephico2real2 commented on Nov 13, 2026

    @ephico2real2
    OwnerAuthor

    In-Progress: draft pull request #135 closes this issue. CI run 43400342375 on 3ea7aa1: api-contract, service, portal-ui, portal-mockup and reference-code passed; manifests was still running when this was written.

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

    In-Progressbugclass:INVsev:mediumstatus:open

    Type

    No type

    Projects

    No projects

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions