feat!: refuse insecure credential transport

Merged
TH
4h ago
+418-349

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

CallBeforeAfter
Send a remote daemon token to off-loopback HTTPWarns and attempts the requestRefuses before connecting
Send a cloud credential to off-loopback HTTPFails with cloud_invalid_originFails with insecure_credential_transport unless the operator enables the override
Connect through a proxy with an unsafe default upstreamWarns and attempts the upstream requestHealth 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.