PER-14853: Add HTTP Egress Proxy customer documentation - #640
Conversation
Add a new customer-facing documentation section under Permit MCP Gateway for the HTTP Egress Proxy and the asg CLI — governing an agent's arbitrary outbound HTTP/HTTPS traffic with the same AuthN/AuthZ/consent/HITL the gateway applies to MCP tool calls. New pages (docs/permit-mcp-gateway/http-egress-proxy/): - Overview, Quick Start, asg CLI, Egress Rules, Credentials & Connections, Authorization & Trust, Connecting Agents, Security Also registers the section in sidebars.js and links it from the gateway index. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
✅ Deploy Preview for permitio-docs ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
There was a problem hiding this comment.
Pull request overview
Adds a new customer-facing documentation section for the Permit MCP Gateway “HTTP Egress Proxy” feature so it’s discoverable and usable, and wires it into the site navigation.
Changes:
- Registers a new “HTTP Egress Proxy” docs category in
sidebars.js. - Adds an 8-page documentation section under
docs/permit-mcp-gateway/http-egress-proxy/(overview, quick start, CLI, rules, credentials, authorization, agent connection, security). - Links the new section from the Permit MCP Gateway landing page for discoverability.
Reviewed changes
Copilot reviewed 10 out of 10 changed files in this pull request and generated 3 comments.
Show a summary per file
| File | Description |
|---|---|
| sidebars.js | Adds a new sidebar category for “HTTP Egress Proxy” and lists its pages. |
| docs/permit-mcp-gateway/index.mdx | Adds a “Go Deeper” link to the new HTTP Egress Proxy section. |
| docs/permit-mcp-gateway/http-egress-proxy/index.mdx | Overview page describing the feature model and governance flow. |
| docs/permit-mcp-gateway/http-egress-proxy/quickstart.mdx | End-to-end CLI-based quickstart for enabling and verifying the proxy. |
| docs/permit-mcp-gateway/http-egress-proxy/cli.mdx | asg CLI installation/configuration and proxy command reference. |
| docs/permit-mcp-gateway/http-egress-proxy/egress-rules.mdx | Rule model, ordering/precedence, and HITL behavior. |
| docs/permit-mcp-gateway/http-egress-proxy/credentials.mdx | Write-only secrets, injection methods, OAuth connections, AWS SigV4, presets. |
| docs/permit-mcp-gateway/http-egress-proxy/authorization.mdx | Two-gate authorization model and trust ceilings / consent. |
| docs/permit-mcp-gateway/http-egress-proxy/connecting-agents.mdx | Env var setup, container config, HTTPS interception, diagnostics. |
| docs/permit-mcp-gateway/http-egress-proxy/security.mdx | SSRF protections, credential isolation, scrubbing, TLS modes, rate limiting, audit. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Verified against gateway source that TLS interception (credential injection, path rules, response scrubbing on HTTPS) is a per-rule setting configured in the dashboard — the CLI creates rules in passthrough mode only. Updated the docs to match and to reach the full payoff: - Quick Start: split into "verify the allow-list" (works in passthrough, zero setup) and a new step 7 "Inject credentials into HTTPS traffic" that walks through enabling intercept on the rule (dashboard) + provisioning/trusting the per-host CA, then re-verifying injection + scrubbing. - Security: corrected "TLS mode configurable per host" to "per rule"; clarified it's set in the dashboard rule editor. - Connecting Agents: clarified intercept is enabled per rule in the dashboard (CLI rules are passthrough); reworded "mix modes across hosts" to per rule. - Egress Rules: added a "HTTPS handling per rule" subsection documenting the passthrough/intercept TLS mode as a rule property. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
zeevmoney
left a comment
There was a problem hiding this comment.
This is an automated review. See comments.
… model The published pages described the removed flat-rule model — `asg proxy rules` add/list/update/delete/reorder, ordered allow/block/require_approval actions, per-agent rule scoping, and `asg proxy authorize --host`. The shipped `asg` CLI and gateway enforce the API workflow model instead: policy is authored as workflows (domains + rules + required trust) in the dashboard, and every token is bound to one workflow. Changes across all 8 pages: - Reframe egress-rules → "Workflows & Rules" (workflow → domain → rule; allow-only; required-trust levels; no block/require_approval action, no ordering/agent-match). - Quickstart now creates a workflow in the dashboard and mints a workflow-bound token (`token create --workflow`, which is required). - Authorization: two gates reframed to workflow match + Permit policy; consent uses `authorize --workflow`; trust ceiling is per-human, per-workflow (not per-host). - CLI: fix the npm package scope (`@permitio/agent-security-cli`, was `@permit-io/...`), add bunx/npx zero-install forms, drop the non-existent `proxy rules` commands, and remove the parked `preset apply` path (returns 501). - Correct dashboard nav references (Overview / Workflows / Credentials / Activity / Setup). Docusaurus build + hyperlink check pass: 0 bad links, 0 bad anchors. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
…y step - cli.mdx: the Configure example now uses `asg login --token-file` so it matches the security note about process-visible secret flags (Copilot review). - quickstart.mdx: the verify step uses `curl -i` and explains that a `401` from Stripe in passthrough mode is expected — it proves the request reached the upstream (allowed), in contrast to a denied host the proxy never connects to (Copilot review). Zeev's June 18 findings (flat `proxy rules` update/reorder, missing `credentials` group, `token create` --subject/--out, `authorize --hosts`) are all resolved on current main: the CLI added the `credentials` group, `--out`, optional `--subject`, and `--workflow`, and removed the flat-rule surface — the docs already match. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
|
Thanks for the thorough pass, @zeevmoney. I went through all 12 findings against the current Your 9 findings were accurate on 2026-06-18, but are now overtaken by two changes:
Copilot's 3 nits were still valid and are fixed in
Build (Docusaurus + hyperlink checker) is green: 0 bad links, 0 bad anchors. Re-requesting review from @zeevmoney and @Zivxx. |
zeevmoney
left a comment
There was a problem hiding this comment.
Changes requested — 1 CRITICAL, 9 HIGH, 17 MEDIUM, 6 LOW.
Every claim in these eight pages was checked against permitio/agent-security at main (6f3a0991, pulled today) — the gateway proxy in gateway/src/proxy/**, the asg CLI in packages/agent-security-cli/, and the dashboard in platform/src/app/(dashboard)/proxy/**. Each finding below cites the implementing file and line.
Two themes account for most of the blocking items: the pages describe the plain-HTTP path as though it were the general case (HTTPS arrives as a CONNECT, which only an all-method, path-less rule can match — so path rules, credential injection, scrubbing, and HITL do not apply in the default passthrough mode), and several security guarantees are stated unconditionally when they are conditional on a setting that is off by default.
Blocking:
- CRITICAL
security.mdx:27— "encrypted at rest using envelope encryption" is false in the default configuration;VAULT_ENABLEDdefaults tofalseand credentials are written to Redis as plaintext with only a log warning - HIGH
quickstart.mdx:55— the workflow rule taught here denies every HTTPS request; the path glob also can't match the URL used to verify - HIGH
quickstart.mdx:87— thesecurlcommands return407, not the documented401;Proxy-Authorizationis mandatory and step 5 never supplies it - HIGH
quickstart.mdx:115— step 7 downloads the CA but never installs it, so the final verification fails TLS validation - HIGH
egress-rules.mdx:25— the example workflow denies 100% of its traffic: no tunnel rule on either HTTPS-only domain - HIGH
authorization.mdx:73— revocation is not immediate by default (in-flight cutoff is opt-in), and an open passthrough tunnel is never re-checked - HIGH
authorization.mdx:38— the method class does not determine required trust; the rule declares its own - HIGH
index.mdx:17— the dashboard section is CLIs / APIs, not "Proxy", so this note tells enabled customers they lack the feature - HIGH
security.mdx:33— response scrubbing is best-effort, per-credential, and "fails closed" only on the encoding axis - HIGH
security.mdx:52— the audit record identifies the agent, not the human, so it cannot answer "on whose behalf"; events can also be dropped
Non-blocking:
- MEDIUM
index.mdx:93— the request pipeline describes plain HTTP; HTTPS is domain-matched only by default (also:36,:97) - MEDIUM
index.mdx:41— "before any DNS lookup" holds only for IP literals and blocklisted hostnames - MEDIUM
quickstart.mdx:80—asg proxy envdoesn't credential the shell, and the described direction is inverted - MEDIUM
quickstart.mdx:51— the three listed steps span two pages; the button is "Create workflow" - MEDIUM
credentials.mdx:10— response scrubbing is a per-credential toggle this section never mentions - MEDIUM
credentials.mdx:78— the AWS signing flow names none of its four required inputs - MEDIUM
credentials.mdx:45— host binding is a glob that matches across dots, so "can never be sent to another" depends on the pattern - MEDIUM
connecting-agents.mdx:49— TLS mode is read from the tunnel rule; setting it elsewhere has no effect (also:47,:68) - MEDIUM
egress-rules.mdx:85— HITL requires two host flags and never fires on default-mode HTTPS - MEDIUM
security.mdx:48— the rate limiter fails open and meters only requests that reach a matching rule - MEDIUM
cli.mdx:71— the--<flag>-filecompanion rule isn't universal (asg pdp validate --api-keyhas none) - MEDIUM
cli.mdx:100—asg proxy connecthas two required flags this row omits - MEDIUM
cli.mdx:112— the--subdomainconvention contradicts every worked example in this section - MEDIUM
cli.mdx:54— nothing anywhere says where the admin token comes from - MEDIUM
cli.mdx:108— "intent guardian" and "agent identity registration" are defined nowhere on the site - MEDIUM
egress-rules.mdx:10— "workflow" already means the agent workflow context in this same sidebar category - MEDIUM
authorization.mdx:48— "trust ceiling" is the Max Trust Level control already documented in Host Setup - LOW
quickstart.mdx:42— four small fixes grouped (uncreatedstripe.key, wrong anchor,ca rotateprompt,-ovs--output) - LOW
cli.mdx:102— placeholder and token naming drift across the section - LOW
egress-rules.mdx:45—readalso coversOPTIONS; onlyallmatchesTRACE - LOW
connecting-agents.mdx:88—doctorreports pass/warn/fail, not pass/fail - LOW
index.mdx:5—sidebar_position: 0on a category index breaks the directory's convention - LOW
security.mdx:14— "before any network I/O" overstates; several round-trips precede the decision
Verified accurate and deliberately not flagged: the request-pipeline ordering in index.mdx:88-98, the two-stage SSRF design in security.mdx:20-21, the Auto-trust mapping in egress-rules.mdx:55, the OAuth provider list, the package and binary names, the env-var and exit-code tables, the config path and priority order, and the per-human/per-workflow trust-ceiling semantics including the no-cross-human-combination property in authorization.mdx:48-50.
Details are in the inline comments on each line.
…ition, and accuracy fixes Deep review pass over the gateway source confirmed all findings. Key corrections: - HTTPS/CONNECT model (cascading): HTTPS is authorized as a CONNECT with an empty path + Tunnel method class, so only an `all`-method, path-less "tunnel rule" can authorize it. Added a "HTTPS needs a tunnel rule" section, fixed the quickstart and example workflows, and qualified the request-flow / TLS-mode / injection prose. - CRITICAL: encryption at rest is opt-in (KMS vault, off by default) — state the precondition instead of claiming credentials are always encrypted. - Verify step returned 407, not 401: pass `Proxy-Authorization` on every curl; step 7 now installs the CA. `asg proxy env` exports the token path but does not authenticate. - Dashboard nav is "CLIs / APIs", not "Proxy" — fixed every breadcrumb. - Revocation: default removes new-decision authority only; deny-in-flight is opt-in and doesn't re-check an open passthrough tunnel. - Response scrubbing is best-effort + per-credential (documented + softened claims). - Audit identifies the agent (not the human) and is best-effort. Rate limiter fails open. - Trust is declared by the rule, not derived from the method class. "Max Trust Level" linked. - CLI: admin-token source, `--<flag>-file` scope, `connect` required flags, `--subdomain` rule, guardian/identity capabilities defined; AWS STS credential inputs named. Build (Docusaurus + hyperlink) passes: 0 bad links, 0 bad anchors. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
|
Thanks @zeevmoney — this was an outstanding, code-cited review. I verified the load-bearing claims against the gateway source (CONNECT authorizes with an empty path + Highlights:
Two I flagged rather than forced: I kept the file name |
Why
The HTTP Egress Proxy +
asgCLI is shipping toward GA, but customers have no public documentation for it. The capability lets customers govern an agent's arbitrary outbound HTTP/HTTPS traffic (REST APIs, webhooks, third-party services) with the same authentication, authorization, consent, HITL, and audit the gateway already applies to MCP tool calls. This PR adds a complete, customer-facing documentation section so the feature is usable and discoverable.Linear: PER-14853
What
Adds a new documentation section under Permit MCP Gateway → HTTP Egress Proxy (
docs/permit-mcp-gateway/http-egress-proxy/), 8 pages, written against the shipped API workflow model:asgCLI — install (@permitio/agent-security-cli, viabunx/npx/global), configure, output/exit-code contract, and theasg proxycommand tree.HTTP_PROXYsetup for shell/Docker/Kubernetes, the proxy token, HTTPS passthrough vs intercept (+ CA trust), andproxy doctor.Also:
sidebars.js(explicit category, label "HTTP Egress Proxy", landing on the Overview page).index.mdx"Go Deeper" list for discoverability.The docs are deliberately scoped for customers — no internal ports, Redis keys, source paths, KMS/crypto internals, Helm/Tilt, or feature-flag names are exposed.
Correction pass (aligned to the shipped CLI + gateway)
The first draft described the earlier flat-rule model, which has since been replaced by the API workflow model in the
asgCLI and the gateway. This PR was reviewed page-by-page against the running CLI (asg proxy --help) and the gateway enforcement, and corrected:asg proxy rules add/list/update/delete/reordercommands. Egress policy is now authored as workflows (domains + rules + required trust) in the dashboard; there is no CLI for workflow authoring yet.@permitio/agent-security-cli(was@permit-io/…) and added thebunx/npx -yzero-install forms.asg proxy token createnow shows the required--workflowflag; consent usesasg proxy authorize --workflow(the retired--host/--hostsflags are gone).block/require_approvalrule actions (workflow rules are allow-only) and reframed HITL on egress as an optional per-host capability.asg proxy preset applypath (currently returns501/ parked).How it was tested
npm run build(Docusaurus production build) passes, including thehyperlinklink/anchor checker: 0 bad links, 0 bad anchors (48,614 links across 2,411 files).asgCLI--helpoutput; the model was cross-checked against the gateway proxy enforcement and the Platform proxy UI.Manual test plan
npm install && npm run buildfrom the repo root → build succeeds with 0 bad links/anchors.npm run serveand browse to/permit-mcp-gateway/http-egress-proxy/→ the section renders with all 8 pages in the sidebar under "HTTP Egress Proxy".asgcommand (proxy config,proxy credentials create,proxy token create --workflow,proxy env,proxy ca …).🤖 Generated with Claude Code