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/public/schemas/mcp-gateway-config.schema.json
+1-1Lines changed: 1 addition & 1 deletion
Original file line number
Diff line number
Diff line change
@@ -249,7 +249,7 @@
249
249
},
250
250
"trustedBots": {
251
251
"type": "array",
252
-
"description": "Additional trusted bot identities that are permitted to call the gateway, merged with the gateway's built-in internal trusted identity list. When bot identity enforcement is active, only requests whose 'X-GitHub-Actor' header matches an entry in the combined list (built-in + this field) are accepted. Typically GitHub bot usernames such as 'github-actions[bot]' or 'copilot-swe-agent[bot]'. This field is additive and cannot remove entries from the gateway's internal built-in trusted identity list.",
252
+
"description": "Additional trusted bot identity strings passed to the gateway and merged with its built-in internal trusted identity list. This field is additive and cannot remove entries from the gateway's built-in list. Typically GitHub bot usernames such as 'github-actions[bot]' or 'copilot-swe-agent[bot]'.",
Copy file name to clipboardExpand all lines: docs/src/content/docs/reference/mcp-gateway.md
+27-59Lines changed: 27 additions & 59 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -248,7 +248,7 @@ The `gateway` section is required and configures gateway-specific behavior:
248
248
|`payloadDir`| string | No | Directory path for storing large payload JSON files for authenticated clients |
249
249
|`payloadPathPrefix`| string | No | Path prefix to remap payload paths for agent containers (e.g., /workspace/payloads) |
250
250
|`payloadSizeThreshold`| integer | No | Size threshold in bytes for storing payloads to disk (default: 524288 = 512KB) |
251
-
|`trustedBots`| array[string]| No | Additional GitHub bot identity strings (e.g., `github-actions[bot]`) added to the gateway's built-in trusted identity list. This field is additive — it extends the internal list but cannot remove built-in entries. When bot identity enforcement is active, only callers whose `X-GitHub-Actor` header matches an entry in the combined list are accepted. |
251
+
|`trustedBots`| array[string]| No | Additional GitHub bot identity strings (e.g., `github-actions[bot]`) passed to the gateway and merged with its built-in trusted identity list. This field is additive — it extends the internal list but cannot remove built-in entries. |
252
252
253
253
#### 4.1.3.1 Payload Directory Path Validation
254
254
@@ -370,16 +370,9 @@ payload_size_threshold = 262144 # 256KB - more aggressive disk storage
370
370
371
371
#### 4.1.3.4 Trusted Bot Identity Configuration
372
372
373
-
The optional `trustedBots` field in the gateway configuration provides an identity-based allowlist of additional GitHub bot accounts that are permitted to call the gateway. This is independent of the `apiKey` mechanism and operates at the HTTP request level by inspecting the `X-GitHub-Actor` header.
373
+
The optional `trustedBots` field in the gateway configuration passes an additional list of GitHub bot identity strings to the gateway. The gateway merges this list with its own built-in trusted identity list to form the effective set of identities it recognises.
374
374
375
-
> **Important**: `trustedBots` is **additive**. The gateway maintains its own internal list of trusted bot identities that are always permitted regardless of this field. The `trustedBots` field extends that internal list with additional identities; it cannot remove or override the gateway's built-in trusted identities.
376
-
377
-
**How it works**:
378
-
379
-
1. The caller includes an `X-GitHub-Actor` header in each request identifying the GitHub actor (bot or user) making the request
380
-
2. The gateway checks the header value against its **combined** list of trusted identities: the gateway's internal built-in list **plus** any entries in `trustedBots`
381
-
3. If bot identity enforcement is active and the actor does not match any entry in the combined list, the gateway rejects the request with HTTP 403
382
-
4. If `trustedBots` is not configured, the gateway still permits callers that match its internal built-in identities; no additional identities are added
375
+
> **Important**: `trustedBots` is **additive**. The gateway maintains its own internal list of trusted bot identities. The `trustedBots` field extends that internal list with additional identities; it cannot remove or override the gateway's built-in trusted identities.
383
376
384
377
**Configuration Example**:
385
378
@@ -397,23 +390,23 @@ The optional `trustedBots` field in the gateway configuration provides an identi
397
390
}
398
391
```
399
392
393
+
**Frontmatter Example** (workflow author):
394
+
395
+
```yaml
396
+
sandbox:
397
+
mcp:
398
+
trusted-bots:
399
+
- github-actions[bot]
400
+
- copilot-swe-agent[bot]
401
+
```
402
+
400
403
**Requirements**:
401
404
- `trustedBots` MUST be a non-empty array of strings when present
402
405
- Each entry MUST be a non-empty string (typically a GitHub username such as `github-actions[bot]`)
403
-
-`trustedBots` entries are **merged** with the gateway's internal built-in trusted identities to form the effective allowlist
406
+
- `trustedBots`entries are **merged** with the gateway's internal built-in trusted identities to form the effective list passed to the gateway
404
407
- `trustedBots`MUST NOT be used to remove or override entries in the gateway's internal built-in trusted identity list
405
-
- When bot identity enforcement is active, the gateway MUST reject requests where `X-GitHub-Actor` is absent or does not match any entry in the combined list (HTTP 403)
406
-
- When `trustedBots` is omitted, only the gateway's built-in trusted identities are consulted
407
-
- Bot identity checks are applied **after** API key authentication; a request must pass both checks when both are configured
408
-
- Entries are compared case-sensitively
409
-
410
-
**Security Considerations**:
411
-
-`trustedBots` provides defense-in-depth: even if an API key is leaked, callers that cannot supply a matching `X-GitHub-Actor` header are denied
412
-
- Because `trustedBots` is additive, the internal built-in identities cannot be narrowed through configuration — only expanded
413
-
- The `X-GitHub-Actor` header MUST be treated as an untrusted claim unless the deployment ensures that only the gateway's own infrastructure can set it (e.g., the gateway runs inside a trusted network boundary)
414
-
- Implementations SHOULD log rejected bot identity mismatches at the warning level without logging the header value in plaintext
@@ -991,32 +984,13 @@ The following endpoints MUST NOT require authentication:
991
984
992
985
-`/health`
993
986
994
-
### 7.5 Trusted Bot Identity Authentication
995
-
996
-
When bot identity enforcement is active (either via `gateway.trustedBots` or the gateway's internal built-in trusted identity list), the gateway enforces an additional identity check **after** API key authentication:
997
-
998
-
1. The gateway inspects the `X-GitHub-Actor` request header on all RPC requests to `/mcp/{server-name}` and `/close` endpoints
999
-
2. The header value is checked against the **combined** list of trusted identities: the gateway's built-in internal list **plus** any entries supplied in `gateway.trustedBots`
1000
-
3.`gateway.trustedBots` is **additive** — it extends the built-in list but cannot remove entries from it
1001
-
4. If the header is absent or does not match any entry in the combined list, the gateway MUST reject the request with HTTP 403
1002
-
1003
-
**Example request** (both API key and bot identity supplied):
1004
-
1005
-
```http
1006
-
POST /mcp/github HTTP/1.1
1007
-
Authorization: my-secret-api-key-12345
1008
-
X-GitHub-Actor: github-actions[bot]
1009
-
Content-Type: application/json
1010
-
```
987
+
### 7.5 Trusted Bot Identity Configuration
1011
988
1012
-
**Error responses**:
989
+
The `gateway.trustedBots` field allows workflow authors to pass additional trusted bot identity strings to the gateway via the generated gateway configuration file. The gateway merges these entries with its own built-in trusted identity list.
1013
990
1014
-
| Condition | HTTP Status | Description |
1015
-
|-----------|-------------|-------------|
1016
-
|`X-GitHub-Actor` header missing | 403 | Bot identity required but not supplied |
1017
-
|`X-GitHub-Actor` does not match any trusted bot | 403 | Caller is not in the trusted bot list |
991
+
`gateway.trustedBots` is **additive** — it extends the gateway's built-in list but cannot remove entries from it.
1018
992
1019
-
**Security Note**: The `/health` endpoint MUST remain exempt from trusted bot identity checks (same as API key exemption).
993
+
Workflow authors set this via the `sandbox.mcp.trusted-bots` frontmatter field; the compiler translates it into the `trustedBots` array in the generated `gateway` section of the MCP config file.
1020
994
1021
995
---
1022
996
@@ -1205,8 +1179,7 @@ A conforming implementation MUST pass the following test categories:
1205
1179
-**T-AUTH-003**: Missing token rejection
1206
1180
-**T-AUTH-004**: Health endpoint exemption
1207
1181
-**T-AUTH-005**: Token rotation support
1208
-
-**T-AUTH-006**: Trusted bot identity acceptance — request with matching `X-GitHub-Actor` header is accepted when `trustedBots` is configured
1209
-
-**T-AUTH-007**: Trusted bot identity rejection — request with absent or non-matching `X-GitHub-Actor` header is rejected with HTTP 403 when `trustedBots` is configured
1182
+
-**T-AUTH-006**: Trusted bot identity configuration — `trustedBots` entries are present in the generated gateway config and merged with the gateway's built-in list
Copy file name to clipboardExpand all lines: pkg/workflow/schemas/mcp-gateway-config.schema.json
+1-1Lines changed: 1 addition & 1 deletion
Original file line number
Diff line number
Diff line change
@@ -218,7 +218,7 @@
218
218
},
219
219
"trustedBots": {
220
220
"type": "array",
221
-
"description": "Additional trusted bot identities that are permitted to call the gateway, merged with the gateway's built-in internal trusted identity list. When bot identity enforcement is active, only requests whose 'X-GitHub-Actor' header matches an entry in the combined list (built-in + this field) are accepted. Typically GitHub bot usernames such as 'github-actions[bot]' or 'copilot-swe-agent[bot]'. This field is additive and cannot remove entries from the gateway's internal built-in trusted identity list.",
221
+
"description": "Additional trusted bot identity strings passed to the gateway and merged with its built-in internal trusted identity list. This field is additive and cannot remove entries from the gateway's built-in list. Typically GitHub bot usernames such as 'github-actions[bot]' or 'copilot-swe-agent[bot]'.",
0 commit comments