iron-proxy/internal
Matthew Slipper 3d96ce8dd2
feat(sshproxy): add opt-in SSH credential proxying on stock x/crypto (#300)
* Add opt-in SSH credential proxying

* fix(sshproxy): drop sshpiper fork, authorize only verified keys

Rebuild the SSH listener on stock golang.org/x/crypto/ssh:
- authorization, secret fetch, and upstream login run in
  VerifiedPublicKeyCallback, after the client proves key possession
- typed default-deny channel/request policy; refusals no longer drop
  the connection
- auth decisions and session requests emit the shared JSON/OTEL audit
  entries (mode ssh) with rejected_by and grant annotations
- upstream dials use the proxy-wide upstream_deny_cidrs guard

* fix(sshproxy): interrupt upstream SSH handshake on cancellation

ssh.NewClientConn ignores context, so shutdown or revocation during the
upstream login waited for the handshake deadline.

* test(sshproxy): port SSH proxy tests from #298

Adapt the stacked test suite to the stock x/crypto implementation:
exec/SFTP, revocation, wstunnel v11 and TLS identity, keepalives under
load, handshake deadlines and cancellation, grant validation, and config
loading. Packet-hook policy tests are replaced by a typed policy table.

Co-authored-by: Jonathan Goodwin <jonathan.goodwin@klaviyo.com>

* fix(sshproxy): satisfy errcheck on Close calls

* fix(sshproxy): detect dead peers, relay EOF, classify authorizer outages

- probe both peers with keepalive@openssh.com and end the session after
  three silent intervals, so a dropped client cannot hold upstream open
- relay upstream EOF once stdout and stderr drain, before channel close
- treat only 401/403 from the authorizer as denials; other statuses are
  audited as errors
- drain upstream requests when the downstream channel accept fails

---------

Co-authored-by: Jonathan Goodwin <jonathan.goodwin@klaviyo.com>
History 2026-11-04 13:54:48 -07:00
..
cagen feat: add generate-ca subcommand (#18) 2026-04-05 13:53:52 -06:00
certcache fix: regenerate expired cached certificates (#235) 2026-09-18 09:34:30 -06:00
config feat(sshproxy): add opt-in SSH credential proxying on stock x/crypto (#300) 2026-11-04 13:54:48 -07:00
controlplane feat: add gcp id token transform (#198) 2026-06-23 15:50:44 -07:00
dns feat: allow "*" as a wildcard host in allowlist matcher (#76) 2026-04-28 17:50:19 -06:00
dnsguard fix: allow configured retry handlers in denied private CIDRs (#219) 2026-08-05 09:17:43 -06:00
headers refactor: centralize case-sensitive header handling in internal/headers (#153) 2026-05-25 14:24:36 -06:00
hostmatch fix(hostmatch): case-insensitive domain glob matching per RFC 4343 and IPv6 bracket stripping in StripPort (#229) 2026-09-18 09:35:14 -06:00
management fix: harden managed readiness status (#195) 2026-06-16 08:43:01 -06:00
mcp fix(mcp): handle POST requests consistently (#254) 2026-09-18 09:27:31 -06:00
mcpgateway feat: add MCP gateway routing (#197) 2026-06-24 23:18:25 -06:00
metrics feat: add /healthz endpoint on metrics listen address (#23) 2026-04-06 13:49:48 -06:00
otel feat: auto-enable OTLP export in managed mode (#61) 2026-04-20 13:57:30 -06:00
postgres fix(postgres): harden managed-session statement policy (#275) 2026-10-06 12:33:26 -06:00
proxy fix WS hang (#244) 2026-10-16 13:37:33 -06:00
responseretry fix: include upstream scheme in retry decisions (#221) 2026-08-14 23:30:47 -06:00
sshproxy feat(sshproxy): add opt-in SSH credential proxying on stock x/crypto (#300) 2026-11-04 13:54:48 -07:00
transform feat(sshproxy): add opt-in SSH credential proxying on stock x/crypto (#300) 2026-11-04 13:54:48 -07:00
version feat(secrets): add 1Password secret source (#95) 2026-04-30 14:25:56 -06:00