-
Notifications
You must be signed in to change notification settings - Fork 3.4k
Gracefully handle IPv6 not fully respecting RFC7239 #2512
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
Comments
To add a note, we had this same problem with an IPv6 address without square brackets, and used the suggested workaround. I think we may need to consider handling this more gracefully. I suspect this is going to be more frequent as more users move over to IPv6 and more vendors not following the RFC7239 standard. |
I don't understand how this is a gateway issue when framework rejected it as well. I think the noted work around (which is from framework, not gateway) is how to deal with this. |
@spencergibb we encountered this issue as well although we don't use spring-cloud--gateway. |
@Illutax if you don't use spring-cloud-gateway, what is the point of commenting here was there is nothing specific to gateway? If you are using framework, comment on the issue linked above. |
Adding a note as the information within this issue may help others if they come across this issue. I think @spencergibb is right to close this ticket as I don't think this is the responsibility of Spring Cloud Gateway or the Spring framework. The correct resolution is to go back to the gateway that is providing the IPv6 traffic and ask them to comply with RFC7239. However, this can be challenging as we're seeing more and more mobile traffic that is not compliant, difficult to identify who should be contacted and whether they show interest in addressing the issue. This has an impact on users, thus SCG can be used to mitigate the issue with the suggested workaround but is not the ideal long-term fix. If you know your downstream does not need the forward header, an alternative is to use the following configuration however this is at your own risk.
|
Describe the bug
Google Cloud Run is not fully respecting the RFC7239 for their IPv6.
This has also been mentioned here:
https://issuetracker.google.com/issues/184230536?pli=1
The error message which is throw looks like this. The IP address in the header attribute
Forwarded: for=
has no[
and]
.I know this is an Google Cloud Run issue but could Spring handle this more gracefully?
Workaround
Remove the corresponding header attributes with a filter
Sample
Any request to a Spring Cloud Gateway with an invalid IPv6 results in an error.
The text was updated successfully, but these errors were encountered: