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: architecture/sandbox.md
+2-2Lines changed: 2 additions & 2 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1227,7 +1227,7 @@ Implements `L7Provider` for HTTP/1.1:
1227
1227
1228
1228
`relay_with_inspection()` in `crates/openshell-sandbox/src/l7/relay.rs` is the main relay loop:
1229
1229
1230
-
1. Parse one HTTP request from client via the provider
1230
+
1. Parse one HTTP request from client via the provider. Parser and path-canonicalization failures close the connection and emit a denied OCSF network event with the rejection reason in `status_detail`.
1231
1231
2. Resolve credential placeholders in the request target via `rewrite_target_for_eval()`. OPA receives the redacted path (`[CREDENTIAL]` markers); the resolved path goes only to upstream. If resolution fails, return HTTP 500 and close the connection.
1232
1232
3. Build L7 input JSON with `request.method`, the **redacted**`request.path`, `request.query_params`, plus the CONNECT-level context (host, port, binary, ancestors, cmdline)
1233
1233
4. Evaluate `data.openshell.sandbox.allow_request` and `data.openshell.sandbox.request_deny_reason`
@@ -1580,7 +1580,7 @@ The sandbox uses `miette` for error reporting and `thiserror` for typed errors.
1580
1580
| Credential injection: resolved value contains CR/LF/null | Placeholder treated as unresolvable, fail-closed |
"{error}; set allow_encoded_slash: true on this endpoint if the upstream requires encoded slashes"
51
+
),
52
+
ParseRejectionMode::Passthrough => format!(
53
+
"{error}; passthrough credential relay uses strict path parsing, so configure this endpoint with protocol: rest and allow_encoded_slash: true for encoded-slash APIs, or use tls: skip if HTTP parsing is not needed"
Copy file name to clipboardExpand all lines: docs/observability/logging.mdx
+1Lines changed: 1 addition & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -169,6 +169,7 @@ Common reason phrases emitted by the sandbox include:
169
169
|`resolves to <ip> which is not in allowed_ips, connection rejected`| The destination resolved to an IP outside the policy's `allowed_ips` allowlist. |
170
170
|`DNS resolution failed for <host>:<port>`| The proxy could not resolve the destination. |
171
171
|`port <n> is a blocked control-plane port, connection rejected`| The destination port matches a control-plane port (etcd, Kubernetes API, kubelet) and is always blocked. |
172
+
|`request-target contains an encoded '/' (%2F)`| The L7 HTTP parser rejected an encoded slash. Configure `allow_encoded_slash: true` on a REST endpoint when the upstream requires encoded slashes. |
172
173
|`l7 deny`| An L7 policy rule denied the request. |
173
174
174
175
Invalid `allowed_ips` entries and entries that overlap always-blocked ranges are rejected at policy-load time, so they never reach the runtime denial path. The phrases above come from the proxy's per-CONNECT `allowed_ips` and SSRF checks, not from policy validation.
0 commit comments