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
{{ message }}
Repository navigation
Commit fa0082c
Browse filesBrowse the repository at this point in the historyBrowse files
feat(sandbox,podman): deliver corporate proxy credentials via secret file
Proxy credentials were embedded inline in the proxy URL, so they were
stored in gateway.toml and exposed in container metadata via
'podman inspect'.
Reject inline 'user:pass@' credentials in https_proxy/http_proxy at
startup (parsed with the url crate rather than hand-splitting), and add a
proxy_auth_file option pointing at a 'user:pass' file. The driver stages
that file as a per-sandbox root-only Podman secret, mounts it at a fixed
path, and exports only the path in the reserved
OPENSHELL_UPSTREAM_PROXY_AUTH_FILE variable, so the credential never
appears in config, environment, or container metadata. Reading the file
fails closed on a missing, empty, or control-character-bearing value.
The supervisor reads the credential from the mounted file and builds the
Proxy-Authorization: Basic header, rejecting control characters, and no
longer derives credentials from URL userinfo. The auth-file path is added
to the child-environment strip list, and the generated gateway.toml is
written owner-only (mode 0600).
Signed-off-by: Philippe Martin <[email protected]>
Copy file name to clipboardExpand all lines: crates/openshell-driver-podman/README.md
+14-7Lines changed: 14 additions & 7 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -345,14 +345,21 @@ Podman resources after out-of-band container removal or label drift.
345
345
|`OPENSHELL_PODMAN_TLS_CA`|`--podman-tls-ca`| unset | Host path to the CA certificate mounted for sandbox mTLS. |
346
346
|`OPENSHELL_PODMAN_TLS_CERT`|`--podman-tls-cert`| unset | Host path to the client certificate mounted for sandbox mTLS. |
347
347
|`OPENSHELL_PODMAN_TLS_KEY`|`--podman-tls-key`| unset | Host path to the client private key mounted for sandbox mTLS. |
348
-
|`OPENSHELL_SANDBOX_HTTPS_PROXY`|`--sandbox-https-proxy`| unset | Corporate forward proxy URL injected into sandbox containers as `HTTPS_PROXY`. The in-container supervisor chains policy-approved upstream dials through it with HTTP CONNECT. Only `http://` proxy URLs are supported. |
|`OPENSHELL_SANDBOX_HTTPS_PROXY`|`--sandbox-https-proxy`| unset | Corporate forward proxy URL for the supervisor's upstream TLS dials, chained with HTTP CONNECT. Only credential-free `http://` URLs are supported. |
|`OPENSHELL_SANDBOX_NO_PROXY`|`--sandbox-no-proxy`| unset | Comma-separated `NO_PROXY` list (hostnames, domain suffixes, IPs, CIDRs) dialed directly instead of through the corporate proxy. |
351
-
352
-
Through the gateway, the same settings are the `https_proxy`, `http_proxy`, and
353
-
`no_proxy` keys under `[openshell.drivers.podman]`; see
354
-
`docs/reference/gateway-config.mdx`. Per-sandbox environment values take
355
-
precedence over these operator defaults.
351
+
|`OPENSHELL_SANDBOX_PROXY_AUTH_FILE`|`--sandbox-proxy-auth-file`| unset | Path to a file containing the proxy credentials as `user:pass`. Staged as a root-only Podman secret so credentials never appear in config or container metadata. |
352
+
353
+
Through the gateway, the same settings are the `https_proxy`, `http_proxy`,
354
+
`no_proxy`, and `proxy_auth_file` keys under `[openshell.drivers.podman]`; see
355
+
`docs/reference/gateway-config.mdx`.
356
+
357
+
This is an operator-owned egress boundary: the supervisor reads it from reserved
358
+
`OPENSHELL_UPSTREAM_*` variables written at highest priority, so sandbox and
359
+
template environment cannot override it, and the conventional
360
+
`HTTPS_PROXY`/`HTTP_PROXY`/`NO_PROXY` variables a sandbox controls do not steer
361
+
it. Credentials must be supplied through `proxy_auth_file`; an inline
Copy file name to clipboardExpand all lines: crates/openshell-driver-podman/src/config.rs
+105-8Lines changed: 105 additions & 8 deletions
Original file line number
Diff line number
Diff line change
@@ -6,6 +6,19 @@ use std::net::IpAddr;
6
6
use std::path::PathBuf;
7
7
use std::str::FromStr;
8
8
9
+
/// Parse a proxy URL, defaulting a missing scheme to `http://`.
10
+
///
11
+
/// A bare `host:port` (no `://`) is normalized to `http://host:port` so it
12
+
/// parses the same way the in-sandbox supervisor treats a scheme-less proxy
13
+
/// value. Returns the parsed [`url::Url`] for scheme/userinfo/host inspection.
/// The in-container supervisor only supports `http://` forward proxies,
215
-
/// so reject other schemes at config time instead of silently ignoring
216
-
/// them inside every sandbox.
236
+
/// The in-container supervisor only supports `http://` forward proxies, so
237
+
/// reject other schemes at config time instead of silently ignoring them
238
+
/// inside every sandbox. Credentials must be supplied through
239
+
/// `proxy_auth_file`; an inline `user:pass@` in the URL is rejected because
240
+
/// it would otherwise be stored in `gateway.toml` and exposed in container
0 commit comments