feat!: refuse insecure credential transport
Summary
Enforce ADR 0041 at the remote daemon, cloud, Metro bridge, and default proxy upstream credential boundaries. Surface the proxy refusal on health and RPC, including its remediation hint. Refused direct-upload tickets fall back through the daemon.
0.22 breaking change: agent-device refuses to send credentials over plain HTTP to hosts outside loopback. Use HTTPS or an SSH forward to loopback. For an already protected route, set AGENT_DEVICE_ALLOW_INSECURE_TRANSPORT=1 in the sending process. The default @agent-device/proxy transport has no environment override.
Closes #5182.
Before / after
| Call | Before | After |
|---|---|---|
| Send a remote daemon token to off-loopback HTTP | Warns and attempts the request | Refuses before connecting |
| Send a cloud credential to off-loopback HTTP | Fails with cloud_invalid_origin | Fails with insecure_credential_transport unless the operator enables the override |
| Connect through a proxy with an unsafe default upstream | Warns and attempts the upstream request | Health and RPC surface INVALID_ARGS and insecure_credential_transport with the upstream fix |
Validation
At 90160153ef, all eight Metro tests and six exact-commit incremental checks passed. The preceding production head f968015739 passed all 17 hosted checks and released-wire compatibility against v0.21.44. The new head changes only the Metro refusal assertion.
Open in [code]smith · Need help on this PR? Tag @codesmith-bot with what you need.