Skip to content

Commit 1f19d26

Browse files
committed
fix(sandbox,podman): escape generated TOML and require explicit proxy URL form
Escape backslashes, quotes, and control characters when gateway.sh writes proxy values into gateway.toml, so a hostile or unusual environment value cannot corrupt the config or inject extra keys. Restrict the upstream proxy URL grammar to the documented http://host:port form: a scheme-less value is no longer normalized to http:// and a missing port is no longer silently defaulted to 80. Docs, README, and CLI help now state the explicit-form requirement consistently. Also fix a test-only call of handle_tcp_connection that was missing the upstream_proxy argument added in an earlier commit. Signed-off-by: Philippe Martin <[email protected]>
1 parent c6a92fa commit 1f19d26

9 files changed

Lines changed: 138 additions & 35 deletions

File tree

‎architecture/sandbox.md‎

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -116,9 +116,9 @@ The conventional `HTTPS_PROXY`/`HTTP_PROXY`/`NO_PROXY` variables a sandbox
116116
controls are ignored on this path. Reserved `NO_PROXY` destinations and
117117
loopback always dial directly; add driver-injected host aliases (e.g.
118118
`host.containers.internal`) to the reserved `NO_PROXY` list when the corporate
119-
proxy cannot reach the container host. Only `http://` proxy URLs in
120-
`scheme://host:port` form are supported; a path, query, or fragment is
121-
rejected. Local DNS resolution and SSRF validation still run before the
119+
proxy cannot reach the container host. Only `http://` proxy URLs in explicit
120+
`http://host:port` form are supported — the scheme and port are both
121+
required, and a path, query, or fragment is rejected. Local DNS resolution and SSRF validation still run before the
122122
proxied dial; the CONNECT target sent to the corporate proxy is the requested
123123
hostname. The workload child's proxy variables are unaffected — they are
124124
always rewritten to point at the local policy proxy.

‎crates/openshell-core/src/driver_utils.rs‎

Lines changed: 81 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -91,7 +91,7 @@ pub const UPSTREAM_PROXY_AUTH_MOUNT_PATH: &str = "/etc/openshell/auth/upstream-p
9191
pub struct UpstreamProxyAddr {
9292
/// Proxy hostname, IPv4, or IPv6 address (IPv6 without brackets).
9393
pub host: String,
94-
/// Proxy TCP port (defaults to 80 when the URL has none).
94+
/// Proxy TCP port (always explicit in the accepted URL grammar).
9595
pub port: u16,
9696
}
9797

@@ -108,13 +108,23 @@ pub enum UpstreamProxyUrlError {
108108
/// The value does not parse as a URL.
109109
#[error("not a valid proxy URL: {0}")]
110110
Invalid(url::ParseError),
111+
/// The value has no `scheme://` prefix. Bare `host[:port]` forms are
112+
/// rejected so the accepted grammar matches the documented
113+
/// `http://host:port` contract exactly.
114+
#[error("proxy URL must include an explicit scheme, e.g. http://proxy.corp.com:3128")]
115+
MissingScheme,
111116
/// The URL uses a scheme other than `http` (TLS and SOCKS proxies are
112117
/// not supported by the sandbox supervisor).
113118
#[error(
114119
"unsupported proxy scheme '{0}': only http:// forward proxies are \
115120
supported by the sandbox supervisor"
116121
)]
117122
UnsupportedScheme(String),
123+
/// The URL has no explicit port. Corporate proxies rarely listen on the
124+
/// scheme default (80), so a forgotten port is rejected instead of
125+
/// silently dialing port 80.
126+
#[error("proxy URL must include an explicit proxy port, e.g. http://proxy.corp.com:3128")]
127+
MissingPort,
118128
/// The URL embeds `user:pass@` credentials, which would leak into config
119129
/// and container metadata. Credentials must come from the proxy auth file.
120130
#[error("proxy URL must not embed credentials; supply them via the proxy auth file")]
@@ -132,11 +142,11 @@ pub enum UpstreamProxyUrlError {
132142

133143
/// Parse and validate a corporate upstream-proxy URL.
134144
///
135-
/// A bare `host:port` (no `://`) is normalized to `http://host:port`. Only
136-
/// `http://` proxies are accepted, inline userinfo is rejected, and the port
137-
/// defaults to 80. The URL must address the proxy only: a path (other than
138-
/// a bare trailing `/`), query, or fragment is rejected rather than silently
139-
/// discarded.
145+
/// The accepted grammar is exactly `http://host:port`: the scheme and the
146+
/// port must both be explicit, only `http://` proxies are accepted, and
147+
/// inline userinfo is rejected. The URL must address the proxy only: a path
148+
/// (other than a bare trailing `/`), query, or fragment is rejected rather
149+
/// than silently discarded.
140150
///
141151
/// # Errors
142152
///
@@ -147,12 +157,10 @@ pub fn parse_upstream_proxy_url(raw: &str) -> Result<UpstreamProxyAddr, Upstream
147157
if trimmed.is_empty() {
148158
return Err(UpstreamProxyUrlError::Empty);
149159
}
150-
let parsed = if trimmed.contains("://") {
151-
url::Url::parse(trimmed)
152-
} else {
153-
url::Url::parse(&format!("http://{trimmed}"))
160+
if !trimmed.contains("://") {
161+
return Err(UpstreamProxyUrlError::MissingScheme);
154162
}
155-
.map_err(UpstreamProxyUrlError::Invalid)?;
163+
let parsed = url::Url::parse(trimmed).map_err(UpstreamProxyUrlError::Invalid)?;
156164

157165
if !parsed.scheme().eq_ignore_ascii_case("http") {
158166
return Err(UpstreamProxyUrlError::UnsupportedScheme(
@@ -183,12 +191,43 @@ pub fn parse_upstream_proxy_url(raw: &str) -> Result<UpstreamProxyAddr, Upstream
183191
if parsed.fragment().is_some() {
184192
return Err(UpstreamProxyUrlError::UnexpectedComponent("fragment"));
185193
}
194+
if !authority_has_explicit_port(trimmed) {
195+
return Err(UpstreamProxyUrlError::MissingPort);
196+
}
186197
Ok(UpstreamProxyAddr {
187198
host,
199+
// Explicit-port presence was verified above; `port()` is `None` only
200+
// when the URL spells out the scheme default (`:80`), which the url
201+
// crate normalizes away.
188202
port: parsed.port().unwrap_or(80),
189203
})
190204
}
191205

206+
/// Return `true` when the raw URL's authority carries an explicit `:port`.
207+
///
208+
/// The `url` crate normalizes a scheme-default port (`:80` for http) to
209+
/// `None`, making it indistinguishable from an absent port in the parsed
210+
/// form, so the raw authority must be inspected instead.
211+
fn authority_has_explicit_port(raw: &str) -> bool {
212+
let after_scheme = raw.split_once("://").map_or(raw, |(_, rest)| rest);
213+
let authority_end = after_scheme
214+
.find(['/', '?', '#'])
215+
.unwrap_or(after_scheme.len());
216+
let authority = &after_scheme[..authority_end];
217+
// Userinfo is rejected by the caller, but strip it anyway so this check
218+
// never misreads a `user:pass@` colon as a port.
219+
let host_port = authority.rsplit_once('@').map_or(authority, |(_, hp)| hp);
220+
host_port.rfind(']').map_or_else(
221+
|| {
222+
host_port
223+
.rsplit_once(':')
224+
.is_some_and(|(_, port)| !port.is_empty())
225+
},
226+
// Bracketed IPv6 literal: a port can only follow the bracket.
227+
|end| host_port[end + 1..].starts_with(':'),
228+
)
229+
}
230+
192231
/// Why an upstream proxy credential was rejected by
193232
/// [`parse_upstream_proxy_credential`].
194233
///
@@ -344,12 +383,38 @@ mod tests {
344383
}
345384

346385
#[test]
347-
fn upstream_proxy_url_defaults_scheme_and_port() {
348-
let addr = parse_upstream_proxy_url("proxy.corp.com").unwrap();
349-
assert_eq!(addr.host, "proxy.corp.com");
386+
fn upstream_proxy_url_rejects_missing_scheme() {
387+
for url in [
388+
"proxy.corp.com",
389+
"proxy.corp.com:3128",
390+
"user:[email protected]:8080",
391+
] {
392+
assert_eq!(
393+
parse_upstream_proxy_url(url),
394+
Err(UpstreamProxyUrlError::MissingScheme),
395+
"{url}"
396+
);
397+
}
398+
}
399+
400+
#[test]
401+
fn upstream_proxy_url_rejects_missing_port() {
402+
for url in [
403+
"http://proxy.corp.com",
404+
"http://proxy.corp.com/",
405+
"http://proxy.corp.com:",
406+
"http://[fd00::1]",
407+
] {
408+
assert_eq!(
409+
parse_upstream_proxy_url(url),
410+
Err(UpstreamProxyUrlError::MissingPort),
411+
"{url}"
412+
);
413+
}
414+
// An explicit scheme-default port is accepted even though the url
415+
// crate normalizes it away in the parsed form.
416+
let addr = parse_upstream_proxy_url("http://proxy.corp.com:80").unwrap();
350417
assert_eq!(addr.port, 80);
351-
let addr = parse_upstream_proxy_url("proxy.corp.com:3128").unwrap();
352-
assert_eq!(addr.port, 3128);
353418
}
354419

355420
#[test]
@@ -396,7 +461,6 @@ mod tests {
396461
fn upstream_proxy_url_rejects_path_query_and_fragment() {
397462
for (url, component) in [
398463
("http://proxy.corp.com:8080/some/path", "path"),
399-
("proxy.corp.com:8080/some/path", "path"),
400464
("http://proxy.corp.com:8080?x=1", "query"),
401465
("http://proxy.corp.com:8080/?x=1", "query"),
402466
("http://proxy.corp.com:8080#frag", "fragment"),

‎crates/openshell-driver-podman/README.md‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -345,7 +345,7 @@ Podman resources after out-of-band container removal or label drift.
345345
| `OPENSHELL_PODMAN_TLS_CA` | `--podman-tls-ca` | unset | Host path to the CA certificate mounted for sandbox mTLS. |
346346
| `OPENSHELL_PODMAN_TLS_CERT` | `--podman-tls-cert` | unset | Host path to the client certificate mounted for sandbox mTLS. |
347347
| `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 for the supervisor's upstream TLS dials, chained with HTTP CONNECT. Only credential-free `http://` URLs are supported. Plain-HTTP requests always dial directly. |
348+
| `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://host:port` URLs are supported (scheme and port required). Plain-HTTP requests always dial directly. |
349349
| `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. |
350350
| `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. |
351351

‎crates/openshell-driver-podman/src/config.rs‎

Lines changed: 17 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -140,7 +140,8 @@ pub struct PodmanComputeConfig {
140140
///
141141
/// The in-container supervisor chains policy-approved TLS tunnels
142142
/// through this proxy with HTTP CONNECT instead of dialing upstream
143-
/// destinations directly. Only `http://` proxy URLs are supported.
143+
/// destinations directly. Only `http://` proxy URLs in explicit
144+
/// `http://host:port` form (scheme and port required) are supported.
144145
/// This is an operator-owned egress boundary: it is written in the
145146
/// required-variable tier so sandbox/template environment cannot override
146147
/// it, and the conventional `HTTPS_PROXY` variables are not used.
@@ -542,6 +543,21 @@ mod tests {
542543
}
543544
}
544545

546+
#[test]
547+
fn validate_proxy_config_rejects_missing_scheme_or_port() {
548+
// A scheme-less value (previously normalized to http://) and a
549+
// port-less value (previously defaulted to 80) are both rejected so
550+
// gateway.toml matches the documented http://host:port grammar.
551+
for url in ["proxy.corp.com:8080", "http://proxy.corp.com"] {
552+
let cfg = PodmanComputeConfig {
553+
https_proxy: Some(url.to_string()),
554+
..PodmanComputeConfig::default()
555+
};
556+
let err = cfg.validate_proxy_config().unwrap_err();
557+
assert!(err.to_string().contains("explicit"), "{url}: {err}");
558+
}
559+
}
560+
545561
#[test]
546562
fn validate_proxy_config_rejects_empty_value() {
547563
let cfg = PodmanComputeConfig {
@@ -578,7 +594,6 @@ mod tests {
578594
for url in [
579595
"http://user:[email protected]:8080",
580596
"http://[email protected]:8080",
581-
"user:[email protected]:8080",
582597
] {
583598
let cfg = PodmanComputeConfig {
584599
https_proxy: Some(url.to_string()),

‎crates/openshell-driver-podman/src/main.rs‎

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -104,8 +104,9 @@ struct Args {
104104
#[arg(long, env = "OPENSHELL_PODMAN_TLS_KEY")]
105105
podman_tls_key: Option<PathBuf>,
106106

107-
/// Corporate forward proxy URL for the supervisor's upstream TLS dials
108-
/// (http:// only). Credentials must not be embedded in the URL; use
107+
/// Corporate forward proxy URL for the supervisor's upstream TLS dials,
108+
/// in explicit `http://host:port` form (scheme and port required).
109+
/// Credentials must not be embedded in the URL; use
109110
/// `--sandbox-proxy-auth-file` instead.
110111
#[arg(long, env = "OPENSHELL_SANDBOX_HTTPS_PROXY")]
111112
sandbox_https_proxy: Option<String>,

‎crates/openshell-supervisor-network/src/proxy.rs‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5112,6 +5112,7 @@ network_policies: {}
51125112
None,
51135113
None,
51145114
Arc::new(None),
5115+
Arc::new(None),
51155116
None,
51165117
None,
51175118
None,

‎crates/openshell-supervisor-network/src/upstream_proxy.rs‎

Lines changed: 13 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -280,7 +280,7 @@ impl UpstreamProxyConfig {
280280
}
281281
}
282282

283-
/// Parse an `http://host[:port]` proxy URL with the same validation rules the
283+
/// Parse an `http://host:port` proxy URL with the same validation rules the
284284
/// compute driver applies at sandbox-create time
285285
/// ([`parse_upstream_proxy_url`](openshell_core::driver_utils::parse_upstream_proxy_url)).
286286
///
@@ -508,10 +508,18 @@ mod tests {
508508
}
509509

510510
#[test]
511-
fn scheme_defaults_to_http_and_port_defaults_to_80() {
512-
let cfg = config_ok(&[(HTTPS_PROXY, "proxy.corp.com")]);
513-
let ep = cfg.proxy_for("example.com").unwrap();
514-
assert_eq!(ep.display_addr(), "proxy.corp.com:80");
511+
fn scheme_less_or_port_less_proxy_url_is_fatal() {
512+
// The accepted grammar is exactly `http://host:port`; lenient
513+
// defaulting would let a typo silently target the wrong proxy.
514+
for url in [
515+
"proxy.corp.com",
516+
"proxy.corp.com:3128",
517+
"http://proxy.corp.com",
518+
] {
519+
let err = config_from(&[(HTTPS_PROXY, url)]).unwrap_err();
520+
assert!(err.contains(HTTPS_PROXY), "{url}: {err}");
521+
assert!(err.contains("explicit"), "{url}: {err}");
522+
}
515523
}
516524

517525
// -- Fail-closed configuration validation --

‎docs/reference/gateway-config.mdx‎

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -393,8 +393,9 @@ health_check_interval_secs = 10
393393
# supervisor chains policy-approved TLS tunnels through this proxy with HTTP
394394
# CONNECT instead of dialing destinations directly. Plain-HTTP requests are
395395
# not proxied and always dial the destination directly. Only http:// proxy
396-
# URLs are supported, in scheme://host:port form: a URL carrying a path,
397-
# query, or fragment is rejected rather than silently truncated.
396+
# URLs in explicit http://host:port form are supported: the scheme and port
397+
# are both required, and a URL carrying a path, query, or fragment is
398+
# rejected rather than silently truncated.
398399
# NO_PROXY entries (hostnames, domain suffixes, IPs, CIDRs) are dialed
399400
# directly. This is an operator-owned egress boundary:
400401
# sandbox and template environment cannot override it, and the conventional

‎tasks/scripts/gateway.sh‎

Lines changed: 16 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -110,6 +110,19 @@ detect_driver() {
110110
exit 2
111111
}
112112

113+
# Escape a value for embedding in a double-quoted TOML basic string, so
114+
# quotes, backslashes, or control characters in an environment value cannot
115+
# corrupt gateway.toml or inject extra configuration keys.
116+
toml_escape() {
117+
local s=$1
118+
s=${s//\\/\\\\}
119+
s=${s//\"/\\\"}
120+
s=${s//$'\n'/\\n}
121+
s=${s//$'\r'/\\r}
122+
s=${s//$'\t'/\\t}
123+
printf '%s' "${s}"
124+
}
125+
113126
port_is_in_use() {
114127
local port=$1
115128
if command_available lsof; then
@@ -360,13 +373,13 @@ EOF
360373
# gateway's fail-closed proxy validation rejects it at startup instead of
361374
# this script silently dropping it.
362375
if [[ -n "${OPENSHELL_SANDBOX_HTTPS_PROXY+x}" ]]; then
363-
printf 'https_proxy = "%s"\n' "${OPENSHELL_SANDBOX_HTTPS_PROXY}" >>"${CONFIG_PATH}"
376+
printf 'https_proxy = "%s"\n' "$(toml_escape "${OPENSHELL_SANDBOX_HTTPS_PROXY}")" >>"${CONFIG_PATH}"
364377
fi
365378
if [[ -n "${OPENSHELL_SANDBOX_NO_PROXY+x}" ]]; then
366-
printf 'no_proxy = "%s"\n' "${OPENSHELL_SANDBOX_NO_PROXY}" >>"${CONFIG_PATH}"
379+
printf 'no_proxy = "%s"\n' "$(toml_escape "${OPENSHELL_SANDBOX_NO_PROXY}")" >>"${CONFIG_PATH}"
367380
fi
368381
if [[ -n "${OPENSHELL_SANDBOX_PROXY_AUTH_FILE+x}" ]]; then
369-
printf 'proxy_auth_file = "%s"\n' "${OPENSHELL_SANDBOX_PROXY_AUTH_FILE}" >>"${CONFIG_PATH}"
382+
printf 'proxy_auth_file = "%s"\n' "$(toml_escape "${OPENSHELL_SANDBOX_PROXY_AUTH_FILE}")" >>"${CONFIG_PATH}"
370383
fi
371384
;;
372385
esac

0 commit comments

Comments
 (0)