-
Notifications
You must be signed in to change notification settings - Fork 789
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
Spring Boot 3.4/Spring Cloud Dependencies 2024/OpenFeign 4.2 Upgrade Returns 403s For Every Call #1141
Comments
Hello, @stephenmontgomery, thanks for reporting the issue. Please provide a minimal, complete, verifiable example that reproduces the issue. |
Hi @OlgaMaciaszek, Just tried https://github.com/spring-projects/spring-boot/wiki/Spring-Boot-3.4-Release-Notes#apache-http-components-and-envoy without any luck. |
Hi @stephenmontgomery, there's only a single issue that comes to mind at this point that could be related in terms of changing the way the request is created: #1070 - you can see if those upstream changes are not affecting you and change the prop if they are. If this is not the case, you may want to enable full logging on the client side in SC OF (https://docs.spring.io/spring-cloud-openfeign/reference/spring-cloud-openfeign.html#spring-cloud-feign-overriding-defaults) on both versions and compare the requests to see what's changed. |
Hi @OlgaMaciaszek, Bit further on here though, with some of our Operations team's input - they found something similar with istio/istio#53239 - outlines the 403 behaviour even though using http and not https. As mentioned above, I did try https://github.com/spring-projects/spring-boot/wiki/Spring-Boot-3.4-Release-Notes#apache-http-components-and-envoy - which should have workedaround this issue but it had no effect so I'm wondering if the default config didn't take. I'm also considering downgrading the HC5 version. As per spring-projects/spring-boot#43139, this TLS stuff came in HC5 5.4. As mentioned above, the last SB 3.3.6 version used HC5 5.3.1 |
I don't have a better suggestion than for you to compare the full requests on both versions. Once you identify the issue (i.e. what has changed and is breaking you, we can take a look at how to resolve it). |
Sorry @OlgaMaciaszek - I thought I have given the full Feign request logging. Is there additional debug logging I can add? |
I don't see any information about headers, for example. Some other request details might be missing. Also, we need to have the full log from both versions (the working one and then not working one) to compare for differences. Please make sure to add a |
Ok @OlgaMaciaszek worth checking but I confirm FULL feign logging was enabled and headers are seen (request + response) in the screenshots above. Can't give u actual text because accessible from DataDog and I'll have to search over again.
Anyho just making sure I'm not missing any extra diagnostic debug. |
That should be fine. If it takes effect, you should be easily able to spot it in the logs, as it's quite verbose. |
Also seeing this behaviour. Having enabled logging in the HTTP client it looks like the suggested fix (to disable the protocol upgrade) isn't having the desired effect. The output is the same with or without the fix applied: Strangely when we upgraded the HTTP client and applied a similar fix in the previous Spring Boot it worked fine. |
@jaccarte Could you please do this: #1141 (comment) and provide request info for comparison? |
I did Anyhow I found a working solution by adding the following to my configuration. I guess the other fix isn't touching the Feign configuration for some reason (or maybe it's not intended to?). @Bean
public HttpClient5FeignConfiguration.HttpClientBuilderCustomizer httpClientBuilder() {
return (httpClientBuilder) -> {
var rcBuilder = RequestConfig.custom();
rcBuilder.setProtocolUpgradeEnabled(false);
httpClientBuilder.setDefaultRequestConfig(rcBuilder.build());
};
} |
@jaccarte thanks for the update and I'm happy there's a workaround.
|
I see now this is related to https://github.com/spring-projects/spring-boot/wiki/Spring-Boot-3.4-Release-Notes#apache-http-components-and-envoy. Will look into creating a better way of handling this. |
FYI the issue is can be easily reproducible whenever a plain non-encrypted HTTP call is made using a Feign client that hits Istio. Istio, instead of ignoring or upgrading the request to upgrade the connection to be encrypted, simply refuses the request and returns 403. |
Describe the bug
Updating from Spring Boot 3.3.6 to Spring Boot 3.4, has lead to Feign returning 403/FORBIDDEN for every Feign call, for every FeignClient call.
Spring Boot 3.4.0
Spring Cloud Dependencies: 2024.0.0
Spring Cloud OpenFeign: 4.2.0
Apache Http Client5: 5.13.5
Rolling back to previous SB 3.3.6 version:
Spring Boot 3.3.6
Spring Cloud Dependencies: 2023.0.4
Spring Cloud OpenFeign: 4.1.4
Apache Http Client5: 5.3.1
gives:
No change to the component being called by Feign - it's still deployed/processing/unchanged. There are no error messages/exceptions in either component ie either the caller or callee - there is nothing to suggest any issue.
application.yml:
Has this been seen before? Any further troubleshooting steps I can do?
Thanks.
The text was updated successfully, but these errors were encountered: