LearnNewsExamplesServices
Frontmatter
id10803
titlePublish reference reverse proxy config for shared topology
stateClosed
labels
documentationenhancementaiarchitecture
assigneesneo-gemini-3-1-pro
createdAtMay 6, 2026, 10:33 AM
updatedAtMay 15, 2026, 2:46 PM
githubUrlhttps://github.com/neomjs/neo/issues/10803
authorneo-gemini-3-1-pro
commentsCount0
parentIssuenull
subIssues[]
subIssuesCompleted0
subIssuesTotal0
blockedBy[]
blocking[]
closedAtMay 6, 2026, 3:32 PM

Publish reference reverse proxy config for shared topology

Closeddocumentationenhancementaiarchitecture
neo-gemini-3-1-pro
neo-gemini-3-1-pro commented on May 6, 2026, 10:33 AM

Context

Surfaced during the writing of the Deployment Cookbook (#10800).

The Problem

The shared deployment topology requires routing external traffic to two distinct MCP servers (KB and MC). Without a reference reverse proxy config, operators must reinvent the routing wheel (pathname vs hostname routing).

The Architectural Reality

We support trustProxyIdentity which explicitly relies on headers like X-PREFERRED-USERNAME injected by an external proxy (e.g., oauth2-proxy or nginx).

The Fix

Provide a reference nginx.conf or Caddyfile demonstrating secure header stripping, injection, and routing to the distinct upstream MCP servers.

Acceptance Criteria

  • Reference proxy config authored.
  • Header stripping (security against spoofing) explicitly documented in the config.
  • Routing logic (e.g., /kb/ to KB, /mc/ to MC) codified.

Out of Scope

Automated TLS provisioning recipes.

Contract Ledger (T3)

Per canonical specification in learn/agentos/contract-ledger.md. Authored 2026-05-06 via batch-Ledger-upgrade pass on cookbook follow-ups (#10801-#10805) — proposed by @neo-opus-4-7 (systemic gap A2A) and explicitly delegated to body-incorporation by @neo-gemini-3-1-pro per ticket-create-workflow §11 Authorship Respect delegation pattern.

Target Surface Source of Authority Proposed Behavior Fallback / Edge Case Docs Evidence
Reference reverse-proxy configs: deploy/proxy/nginx.conf + deploy/proxy/Caddyfile (or sibling location). Documents: pathname-based routing (/kb/* → KB MCP server upstream; /mc/* → MC MCP server upstream); explicit header-stripping rules for X-PREFERRED-USERNAME and X-Auth-Request-Preferred-Username BEFORE upstream injection by trusted-proxy auth layer; SSE-compatible streaming config (proxy-buffer off; chunked-transfer enabled). #10803, parent #9999, surfacing PR #10806 cookbook Section 3 (Reverse Proxy Configuration) + threat model in SharedDeployment.md §Authentication (the 3 proxy prerequisites: strip client-set values; set them itself; prevent direct MC ingress). Reference Nginx config: location /kb/ { proxy_pass http://kb-upstream/; proxy_request_headers ...; proxy_pass_request_headers ...; } with explicit proxy_set_header X-PREFERRED-USERNAME "" to strip incoming spoofed values + proxy_set_header X-PREFERRED-USERNAME $oauth_preferred_username (variable populated by oauth2-proxy auth_request integration) for trusted injection. Symmetric for /mc/. SSE-friendly: proxy_http_version 1.1, proxy_buffering off, chunked_transfer_encoding on. Caddyfile equivalent uses reverse_proxy directives with similar header manipulation. Sample integration with oauth2-proxy for OIDC termination. TLS termination at proxy (annotated; out-of-scope for this ticket per Out of Scope clause but referenced as operator-required). Hostname-based routing alternative (e.g., kb.example.com + mc.example.com) noted as alternative pattern with multiple TLS certificate trade-off. Operators using non-oauth2-proxy IdPs (e.g., direct OIDC validation in nginx via auth_jwt) get a brief note pointing to upstream IdP-specific docs. Update learn/agentos/DeploymentCookbook.md Section 3 (Reverse Proxy Configuration) — replace "(Note: Canonical Nginx/Caddy configurations are tracked under #10803)" with link to shipped reference configs. Cross-link from SharedDeployment.md §Authentication threat model. L2 — operators following the reference Nginx config + a dockerized stack (cross-link #10801) can stand up a working proxy that passes the cookbook Section 8 smoke test. Header-spoof verification: configured proxy correctly strips client-set X-PREFERRED-USERNAME and replaces with auth-validated value; integration spec (#10805) optionally exercises this path. L3 dry-run remains operator-territory.

Origin Session ID: 88a6ed3a-b1b9-461a-aaf3-7c9984bd12e7 Retrieval Hint: Deployment Cookbook gap surfacing

tobiu closed this issue on May 6, 2026, 3:32 PM
tobiu referenced in commit 5082575 - "feat(docs): publish reference reverse proxy configs (#10803) (#10816) on May 6, 2026, 3:32 PM