You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/PROFILE-GUIDE.md
+44-16Lines changed: 44 additions & 16 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -104,31 +104,59 @@ When `enterprise_authorization.mode` is `required`, HTTP initialization accepts
104
104
105
105
-`transport.type` must be `"http-streamable"`
106
106
-`transport.url` must be an absolute `http` or `https` URL without inline credentials
107
-
-`auth.type` may be `bearer`, `query`, or `custom-header`
108
-
-`auth.value_from_env` names the env variable that holds the credential (token, header value, or query param value); inline secrets are not supported for any auth type. The downstream client token always takes precedence - `value_from_env` is used only as a local fallback when the client sends no token (e.g. server-side deployments sharing a fixed env secret)
107
+
-`auth` is **optional**. When omitted, the auth format is inherited from `interceptors.auth` (see below).
108
+
-`auth.type` may be `bearer`, `query`, or `custom-header`. Set explicitly only when the upstream expects a different format than inbound clients use.
109
+
-`auth.value_from_env` names the env variable holding the credential — **stdio transport only**. On HTTP transport the downstream client's session token is always forwarded directly; `value_from_env` is never read.
109
110
-`upstream_mcp_from_env` must point to a single JSON object and takes precedence over static `upstream_mcp`
110
111
-`stdio` upstream definitions are intentionally rejected in this iteration so the later feature-gated implementation can add process lifecycle hardening separately
111
112
112
-
Example:
113
+
#### Auth inheritance from `interceptors.auth`
114
+
115
+
When `upstream_mcp.auth` is omitted, the gateway inherits the auth format from `interceptors.auth` using the same priority-based selection as outbound OpenAPI calls. Only `bearer`, `query`, and `custom-header` types are inherited — `oauth` and `session-cookie` are not forwarded.
116
+
117
+
**Common case — client Bearer token forwarded as Bearer to upstream (zero config):**
The client's `Authorization: Bearer <token>` is extracted from the inbound request and forwarded as-is to the upstream. If the inbound request carries no token, the upstream connection is refused. On stdio, `value_from_env` from `interceptors.auth` is used as the service-account credential.
132
+
133
+
**Override — upstream expects a different format than inbound clients:**
0 commit comments