-
Notifications
You must be signed in to change notification settings - Fork 2.7k
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 http/2 requests to fallback to host header if authority pseudoheader is not provided #37531
Comments
cc @vietj |
pseudo header must be provided, otherwise it is rejected by the server an not valid HTTP/2 request, can you elaborate what is happening ? |
@vietj see keycloak/keycloak#20959 for a more detailed description and reproducer that simulates a http/2 request without authority. |
I see, so the load balancer sends an HTTP/2 request that does not have an authority pseudo header but does have a currently the vertx server differs from that (it ignores the host header) but it it does provides an authority made of the socket remote host and port values when no pseudo header is provided, which I am not certain is actually valid as it seems that providing a request without an authority has actually a specific semantic and is allowed. maybe this is something we could actually do in vertx-web ForwardedParser instead of Vert.x HTTP request implementation because it already handles the x-forwarded for behavior. |
That is my understanding as well. cc @wadahiro |
Hi all, is there any plan to fix this or support H2 doesn't REQUIRE https://www.rfc-editor.org/rfc/rfc9113.html#section-8.3.1-1
Also under certain scenarios,
So I think it's reasonable to support this fallback when authority is not provided. Or would introducing an option feasible approach? |
The code was changed from How do you think about making changes like
to provide backward compatibility to previous version? |
We're currently using Quarkus behind an AWS LB and this is preventing us from upgrading to 3.13.x or later. Confirmed with a packet capture that the AWS LB does not set the Is there any way to manually set this header at runtime? I tried using a |
@vietj we may need to adapt the Vert.x code. |
I confirm it might be a defect of HTTP server. Is the LB translating from HTTP/1 to HTTP/2 ? |
I'll create an issue for it in Vert.x project |
In the case I tested it was HTTP/2 to HTTP/2 - using grpcurl as the client. |
why is the authority header missing in that case ? is there a Host HTTP header instead ? |
thanks @vietj - I can confirm that the ALB does not forward the request with the |
I think it hsould be tolerated however as HTTP/2 client it is totally misbheaving I think |
Client: Here's the request the service receives when we query it directly:
Here's what it looks like when we go through the AWS ALB:
So, |
thanks for the details @j-white |
It looks like this needs to be addressed in vert.x core (vs vertx-web) I took a go here: eclipse-vertx/vert.x#5426 |
Description
See keycloak/keycloak#20959 - the user is reporting that AWS ALB is not appropriately including :authority nor x-forwarded- for http/2 requests. The resulting behavior for keycloak is to resolve 0.0.0.0 as the host.
It would appear this behavior by the ALB is not compliant with https://www.rfc-editor.org/rfc/rfc9113.html#section-8.3.1-1 so this is being captured as an enhancement, rather than a bug.
Implementation ideas
No response
The text was updated successfully, but these errors were encountered: