Repository navigation
server: preserve websocket close code when proxying to outposts (cherry-pick #26090 to version-2026.8) - #26132
Conversation
* server: preserve websocket close code when proxying to outposts The websocket proxy that bridges outpost connections to the gunicorn/uvicorn backend replaced every relayed close frame with a code-less close (`Message::Close(None)`), discarding the status code and reason from the peer. When a web worker is recycled (routinely, via web.max_requests) or restarted on upgrade, uvicorn closes the outpost websocket gracefully with 1012 (service restart). Because the proxy relayed `Close(None)`, the outpost instead received a close frame with no status code, which surfaces as `websocket: close 1005 (no status)` and is logged at warning level - indistinguishable from a genuine fault, so a healthy deployment warns on every recycle and trips outpost-disconnect alerting. The reverse direction stripped the outpost's own close code too. Relay the received close frame verbatim in both directions so the peer sees the real close code and reason. The tail-of-stream case (peer closes without sending a Close frame) still sends `Close(None)`, which is correct. Co-Authored-By: Claude Opus 4.8 <[email protected]> * no claude comments Signed-off-by: Jens Langhammer <[email protected]> --------- Signed-off-by: Jens Langhammer <[email protected]> Co-authored-by: Claude Opus 4.8 <[email protected]> Co-authored-by: Jens Langhammer <[email protected]>
✅ Deploy Preview for authentik-integrations ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
✅ Deploy Preview for authentik-storybook ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## version-2026.8 #26132 +/- ##
===============================================
Coverage 91.81% 91.81%
===============================================
Files 1160 1160
Lines 74633 74635 +2
Branches 4054 4056 +2
===============================================
+ Hits 68525 68527 +2
Misses 6066 6066
Partials 42 42
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Harness. |
|
authentik PR Installation instructions Instructions for docker-composeAdd the following block to your AUTHENTIK_IMAGE=ghcr.io/goauthentik/dev-server
AUTHENTIK_TAG=gh-7e2bc6cec1b773b1a9589894b36a93198e84ecd6
AUTHENTIK_OUTPOSTS__CONTAINER_IMAGE_BASE=ghcr.io/goauthentik/dev-%(type)s:gh-%(build_hash)sAfterwards, run the upgrade commands from the latest release notes. Instructions for KubernetesAdd the following block to your authentik:
outposts:
container_image_base: ghcr.io/goauthentik/dev-%(type)s:gh-%(build_hash)s
global:
image:
repository: ghcr.io/goauthentik/dev-server
tag: gh-7e2bc6cec1b773b1a9589894b36a93198e84ecd6Afterwards, run the upgrade commands from the latest release notes. |
Cherry-pick of #26090 to
version-2026.8branch.Original PR: #26090
Original Author: @robisonjoel
Cherry-picked commit: fce697d