Files
teleport/lib
MajaandTiago Silva 3fd8ee76ba Extract gRPC bidi proxy to separate package and fix edge cases (#66143)
* Extract gRPC proxy func to separate package

* Use debug logs for err on `stream.Recv()`

* Add regression test for treating server response as authoritative

The current buggy code path: `forwardServerToClient` returns nil on
server trailer, main waits on `<-errCh`, `forwardClientToServer` is
parked in `client.Recv()` until either the connection is torn down
(hang) or the client happens to send another message whose `server.Send`
fails on the half-closed upstream (reshape: server's nil becomes a
proxy-side error).

* Treat server response as authoritative & propagate client-side errors

* Migrate tests to use a custom gRPC service

* Test if errs from client.Recv and server.Send are surfaced

* Fix flaky `TestProxyBidiStream_ReturnsEOFWhenServerReturnsEarly`

* Don't set `clientErrCh` to `nil`

* Use existing gRPC service instead of special one for tests

* Forward header and trailer to client; use bufconn in tests

Co-authored-by: Tiago Silva <[email protected]>

---------

Co-authored-by: Tiago Silva <[email protected]>
2026-05-11 10:38:30 +00:00
..
2026-04-30 19:05:23 +00:00
2025-07-15 18:11:10 +00:00
2025-09-15 21:49:53 +00:00
2025-08-01 18:42:18 +00:00
2026-04-22 23:40:37 +00:00