-
Notifications
You must be signed in to change notification settings - Fork 564
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Allow WebSocket's ServerEndpointConfig.Configurator.modifyHandShake to control the outcome of the upgrade request #7953
Comments
The problem is that Tyrus is only honoring the header updates in the |
@jansupol Please let us know when a new release of Tyrus with this fix becomes available |
Waiting for resolution of #7954 |
Tyrus was upgraded to 2.1.5. See #8277. |
We picked up version 3.2.6 but the issue persists from a Helidon client perspective. Status set in the updated Tyrus version is still not propagated to clients. |
@spericas I don't see an option to re-open this issue here. Could you please help with that? Thank you. |
@dmutreja Could you share your WS client code that is looking for the status code? |
So I went back and analyze the HTTP upgrade flow through Netty -> Helidon -> Tyrus (I didn't get this far before due the issue in Tyrus):
In summary, I think with the current integration in Helidon 3.x, we cannot support this use case as it is. It may be different in Helidon 4.x where we have full control over the WS stack (no Netty there). Have you considered any other ways to implement your auth use case? For more information on what Netty does, you can check |
Our use case is to intercept a "upgrade to WebSocket" request, run some custom logic to inspect Authorization header in the HTTP request and control the outcome of that upgrade request.
The suggested interception point from Helidon team is a custom jakarta.websocket.server.ServerEndpointConfig.Configurator added to the WebSocket routing that overrides the modiyHandshake method. Custom implementation can fail the handshake (as desired) but there are couple of issues with the approach:
Environment Details
Problem Description
See above
Steps to reproduce
The text was updated successfully, but these errors were encountered: