Skip to content

docs: align audit/auth/oidc config reference with code#16

Open
jmasud wants to merge 1 commit into
plexara:mainfrom
jmasud:docs/config-reference-drift
Open

docs: align audit/auth/oidc config reference with code#16
jmasud wants to merge 1 commit into
plexara:mainfrom
jmasud:docs/config-reference-drift

Conversation

@jmasud
Copy link
Copy Markdown
Contributor

@jmasud jmasud commented May 12, 2026

Summary

Sweep of docs/configuration/reference.md and friends against pkg/config/config.go after the v1.2 follow-ups. Four classes of drift fixed:

Missing keysaudit.capture_payloads, audit.capture_headers, audit.max_payload_bytes, audit.max_notifications were in configs/mcp-test.example.yaml and pkg/config/config.go:152-174 but never documented in the reference page.

Wrong defaults — four boolean defaults said true in the reference, but applyDefaults() never touches them so the Go zero-value default is actually false:

  • audit.enabled
  • portal.cookie_secure
  • auth.require_for_mcp
  • auth.require_for_portal

The shipped example/dev/live configs all set these explicitly, so this never bites in shipped configs — but the reference was lying about the omit-this-key behavior. Corrected with notes about what each shipped config does.

Wrong required-nessoidc.audience was flagged "required when oidc.enabled" but pkg/auth/oidc.go:121 only enforces it when non-empty (if v.cfg.Audience != ""). Demoted to optional in both reference.md and environment.md.

Honest documentationauth.require_for_mcp and auth.require_for_portal are declared in AuthConfig but read by nothing in the binary; gating is governed by auth.allow_anonymous and the composed auth chain. The reference previously claimed they "gated" endpoints. Now described as advisory with a pointer to what actually does the gating.

Example YAMLconfigs/mcp-test.example.yaml shipped a 7-key redact_keys list while applyDefaults() installs 12 keys. Operators copying the example would lose 5 defaults silently because setting redact_keys replaces rather than merges. Updated to the full 12-key list with a comment about the no-merge behavior.

Test plan

  • mkdocs build --strict succeeds
  • Spot-check rendered Audit and Auth sections in the docs preview
  • No code changes; no Go test impact

Follow-up worth a separate PR

auth.require_for_mcp / require_for_portal are dead fields in pkg/config/config.go:129-130. Either wire them up (the test fixtures + example configs imply that was the intent) or delete them. Out of scope here — flagging for triage.

@jmasud jmasud force-pushed the docs/config-reference-drift branch from ae6dd44 to 75174a5 Compare May 12, 2026 13:29
@jmasud jmasud mentioned this pull request May 12, 2026
3 tasks
@jmasud jmasud force-pushed the docs/config-reference-drift branch from 75174a5 to f125a1c Compare May 12, 2026 17:07
Audit reference page was missing capture_payloads, capture_headers,
max_payload_bytes, and max_notifications; redact_keys default listed
7 of the 12 keys applyDefaults actually installs. The example YAML
shipped the same 7-key list, so operators who copied it lost five
defaults silently (setting redact_keys replaces, doesn't merge).

A handful of bool defaults were documented as true but applyDefaults
never touches them, so the Go zero-value default is actually false:
audit.enabled, portal.cookie_secure, auth.require_for_mcp,
auth.require_for_portal. Corrected with notes about what the shipped
example/dev/live configs do.

oidc.audience was flagged "required when oidc.enabled" but the
validator only enforces it when non-empty. Demoted to optional in
both reference.md and environment.md.

auth.require_for_mcp and require_for_portal are declared but read by
nothing in the binary; gating is governed by allow_anonymous and the
auth chain. Documented honestly rather than papering over.
@jmasud jmasud force-pushed the docs/config-reference-drift branch from f125a1c to ab3b92b Compare May 12, 2026 18:27
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