Compare commits

...

11 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
Matthew Slipper
60ed3566e5
fix: require patched Go toolchain for emudhra CA compromise (#288)
* fix: block compromised emudhra CA chains in proxy images

* refactor: rely on Go's emudhra certificate rejection

* test: remove redundant emudhra verifier fixtures

* docs: remove emudhra README addition
2026-10-21 06:03:54 -06:00
Leonardo Yvens
7c6a6e9261
fix WS hang (#244) 2026-10-16 13:37:33 -06:00
Matthew Slipper
5bb325ace6 fix(postgres): harden managed-session statement policy (#275)
* fix(postgres): reject callback-binding definitions such as CREATE AGGREGATE

* test(postgres): cover aggregate alias and harden fixture grants

* test(postgres): keep fixture privileges default so tests exercise the proxy
2026-10-06 12:33:26 -06:00
Matthew Slipper
b345f88756
fix(postgres): reject writes to pg_settings (#274)
Harden the postgres policy by rejecting UPDATE and INSERT on pg_settings,
along with view and rule definitions that reference it.
2026-10-06 11:45:21 -06:00
Matthew Slipper
8a0eb0beb6
fix: inspect postgres routine definitions (#267)
* fix: inspect postgres routine definitions

* docs: describe postgres routine inspection
2026-09-28 23:05:43 -06:00
Matthew Slipper
8bffd32664
fix: bound postgres frontend messages (#266)
* fix: bound postgres frontend messages

* docs: document postgres message limit
2026-09-28 22:16:00 -06:00
Matthew Slipper
4002e146fe
fix: harden postgres RLS function handling (#265)
* fix: harden postgres function call policy

* docs: describe postgres function restrictions
2026-09-28 22:01:43 -06:00
38 changed files with 3217 additions and 201 deletions