Compare commits

...

4 commits

Author SHA1 Message Date
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>
2026-11-04 13:54:48 -07:00
Matthew Slipper
f374500020
Revert "Add opt-in SSH credential proxying (#297)" (#301)
This reverts commit 6eee95bfa4.
2026-11-04 13:53:46 -07:00
goodwin-klaviyo
6eee95bfa4
Add opt-in SSH credential proxying (#297) 2026-11-04 13:52:12 -07:00
Matthew Slipper
fd1c8bc735
fix(secrets): share one 1Password client across all sources (#299)
Every secrets transform, credential source, and config reload builds its
own source registry, and each registry had its own 1Password client cache.
The 1Password SDK loads its Wasm core lazily without synchronization, so
concurrent first fetches from different registries each compiled a separate
copy of the core (~150 MB RSS apiece). Twenty requests needing three
1Password-backed secrets peaked at ~470 MB.

Use a single process-wide client cache so SDK client creation is serialized
and the core is loaded once.
2026-10-30 22:29:27 -06:00
22 changed files with 2052 additions and 20 deletions