Skip to content

docs(audit): bring the remaining auth docs in line with the #928 superadmin model - #930

Merged
ngjunsiang merged 1 commit into
weeklyfrom
docs/audit-superadmin-docs
Oct 20, 2026
Merged

ngjunsiang merged 1 commit into
weeklyfrom
docs/audit-superadmin-docs

Conversation

@ngjunsiang

Copy link
Copy Markdown
Contributor

Follow-up to #929 (the AUDIT_ADMINS superadmin redefinition, merged as a8465ed).

The redefinition updated campus/audit/docs/web-ui-requirements.md (§2.1, §5.2, §5.3) and the campus/audit/web/auth.py docstring, but three other places still described the old single-capability model:

Place Problem
campus/audit/web/data.py "gated by the browser OAuth session … unauthenticated callers get 401" — the data endpoints are gated by the trace-view capability now, an API-key session is a legitimate caller, and an authenticated session without the capability gets 403, not 401
campus/audit/web/ui.py the page map still said "login required" and never mentioned the API-key sign-in path
docs/audit-tracing.md the runbook covered minting keys but never said browser access is a separate grant — the most consequential gap, because this is the doc an operator reads when granting someone access to the trace viewer
docs/DEPLOY.md no pointer from the producer-key section, so a producer key could be mistaken for browser access

What the runbook gains

A new Browser access (who can open the trace viewer) section: the capability table (can_view_traces() / can_manage_keys() × Campus account / API key), the two ways to grant a person access (a superadmin account on AUDIT_ADMINS, or a traces:read key handed over), and the bearer-credential caveat — whoever holds an audit key can read every trace in the deployment, so mint one per person with the narrowest scope that does the job and an expiry.

Verification

Unit suite passing, ruff check . clean, pyright clean (0 errors). Docstring and Markdown only — no behaviour change.

The superadmin redefinition (#928, PR #929) updated the web UI
requirements doc, but three other places still described the old
single-capability model:

- campus/audit/web/data.py: the data endpoints are not gated by "the
  browser OAuth session" any more — they are gated by the trace-view
  capability, and an authenticated session without it gets 403, not
  just 401 for the unauthenticated case.
- campus/audit/web/ui.py: the page map still said "login required"
  and did not mention the API-key sign-in path.
- docs/audit-tracing.md: the runbook covered minting keys but never
  said that browser access is a separate grant, so an operator
  following it to give someone access to the trace viewer had no way
  to learn about AUDIT_ADMINS or the two capabilities. It now has a
  "Browser access" section with the capability table, the two ways to
  grant a person access, and the bearer-credential caveat.
- docs/DEPLOY.md: points at that section, so a producer key is not
  mistaken for browser access.
@ngjunsiang
ngjunsiang merged commit 2000189 into weekly Oct 20, 2026
22 checks passed
@ngjunsiang
ngjunsiang deleted the docs/audit-superadmin-docs branch October 20, 2026 14:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant