Repository navigation
Commit 2364978
committed
feat(supervisor): dial an https:// upstream proxy with TLS and a client cert
The supervisor sends its resolved sandbox id to the corporate proxy as the
Basic username, and that value is an identifier rather than a secret: the proxy
must not treat it as authorization on its own. Until now nothing on the hop
established either party. The proxy could not tell one caller from another, and
the supervisor could not tell the proxy from anything else answering on its
address -- the more serious direction, because an impostor there chooses where
the traffic actually leaves from while every layer reports success.
An https:// proxy is now dialed through TLS before the CONNECT is written:
--upstream-proxy-ca roots the proxy's certificate is verified
against, and the only roots used
--upstream-proxy-client-cert identity presented to the proxy
--upstream-proxy-client-key
Roots are the operator's CA alone, never the system roots: the proxy is a named
internal service, and accepting any publicly-trusted certificate for that name
would defeat the verification. The CONNECT request and any credential on it
also stop crossing the network in the clear.
Every misconfiguration is fatal at startup rather than degrading quietly: an
https:// proxy without a CA, TLS material against an http:// proxy (which would
be silently ignored while the argv claims the hop is authenticated), half a
client identity, or a readable CA bundle holding no certificate.
PrefixedStream carries either a plain or a TLS socket through an enum rather
than a generic, so it stays one concrete type for callers downstream.
Covered end to end: a proxy presenting a CA-signed certificate completes a real
TLS CONNECT, and one presenting a certificate outside the pinned CA yields no
tunnel.1 parent 2daf833 commit 2364978
2 files changed
Lines changed: 469 additions & 16 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
225 | 225 | | |
226 | 226 | | |
227 | 227 | | |
228 | | - | |
| 228 | + | |
| 229 | + | |
| 230 | + | |
| 231 | + | |
229 | 232 | | |
230 | 233 | | |
231 | 234 | | |
| |||
253 | 256 | | |
254 | 257 | | |
255 | 258 | | |
| 259 | + | |
| 260 | + | |
| 261 | + | |
| 262 | + | |
| 263 | + | |
| 264 | + | |
| 265 | + | |
| 266 | + | |
| 267 | + | |
| 268 | + | |
| 269 | + | |
| 270 | + | |
| 271 | + | |
| 272 | + | |
256 | 273 | | |
257 | 274 | | |
258 | 275 | | |
| |||
717 | 734 | | |
718 | 735 | | |
719 | 736 | | |
| 737 | + | |
| 738 | + | |
| 739 | + | |
720 | 740 | | |
721 | 741 | | |
722 | 742 | | |
| |||
0 commit comments