Skip to content

docs(auth): add docs/AUTH.md — single source of truth (KLA-410)#21

Merged
jklaassenjc merged 1 commit into
mainfrom
juergen/kla-410-auth-docs
Apr 28, 2026
Merged

docs(auth): add docs/AUTH.md — single source of truth (KLA-410)#21
jklaassenjc merged 1 commit into
mainfrom
juergen/kla-410-auth-docs

Conversation

@jklaassenjc
Copy link
Copy Markdown
Collaborator

@jklaassenjc jklaassenjc commented Apr 28, 2026

Summary

Closes KLA-410.

Adds docs/AUTH.md — the doc the security feedback called out as missing. It pulls together how jc authenticates, what it does and does not enforce on its own, how the MCP server's trust model varies by transport, what the audit log captures, and what the threat model looks like per scenario. Links from the existing Authentication Methods section in the README.

The doc is honest about gaps that are tracked but not yet shipped:

  • API key is still the default (KLA-407)
  • The MCP execute: true gate is agent-controlled with no human-in-the-loop or signed identity (KLA-408)
  • Per-operator identity is not captured in the audit log (KLA-408)
  • Profile-level read-only enforcement isn't wired (KLA-409)

Every code-anchored claim cites a internal/.../*.go:line location so reviewers can verify each statement against the source.

Notable corrections vs. the original audit

While verifying facts against the code, two things from the earlier audit summary turned out to be wrong and are stated correctly in the doc:

  1. MCP HTTP/SSE binds to 127.0.0.1 by default, not all interfaces. There's an explicit warning when binding non-loopback without TLS (internal/cmd/mcp.go:218).
  2. 30 destructive MCP tools use the destructiveInput pattern, not 17.

Test plan

  • go build ./... clean
  • go test ./internal/cmd/... ./internal/config/... ./internal/api/... ./internal/mcp/... passing
  • wc -l docs/AUTH.md → 355 lines (acceptance: ≤600)
  • All four user-feedback points have a directly-quotable answer in the doc

🤖 Generated with Claude Code


Note

Low Risk
Documentation-only change: adds an auth/authorization and MCP security model reference with no runtime or behavior changes.

Overview
Adds a new docs/AUTH.md as a single source of truth for jc’s authentication methods, credential storage/precedence, authorization limitations, destructive-operation gating (CLI confirmation + MCP execute: true), MCP transport trust model, and MCP audit log shape/redaction.

Updates README.md to link to docs/AUTH.md from the Authentication Methods section so security reviewers have one canonical reference.

Reviewed by Cursor Bugbot for commit 290b8ad. Bugbot is set up for automated code reviews on this repo. Configure here.

Lands the auth/authz/MCP-trust-model write-up that the security
feedback called out as missing. Covers:

- API-key + OAuth client-credentials flows, storage, env precedence
- The honest "jc has no internal authz layer" point
- CLI confirmation model + 30 destructive MCP tools and the
  agent-controlled execute=true gate
- MCP server transport-by-transport posture (stdio / SSE / Streamable
  HTTP), tool allow/block lists, --read-only mode, rate limiting
- Audit log shape, redaction list, and the operator-identity gap
- Threat-model summary table per scenario
- Cross-links to KLA-407 (default-flip), KLA-408 (step-up auth), and
  KLA-409 (allowlist + read-only) for the work that's still pending

README links into the new doc from the existing Authentication Methods
section.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
@jklaassenjc jklaassenjc merged commit ddea44b into main Apr 28, 2026
6 of 7 checks passed
@jklaassenjc jklaassenjc deleted the juergen/kla-410-auth-docs branch April 28, 2026 19:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

3 participants