Skip to content

500 returned by oauth2 secured endpoint. #13415

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

Closed
zoobert opened this issue Jun 22, 2023 · 3 comments
Closed

500 returned by oauth2 secured endpoint. #13415

zoobert opened this issue Jun 22, 2023 · 3 comments
Assignees
Labels
status: duplicate A duplicate of another issue type: bug A general bug

Comments

@zoobert
Copy link

zoobert commented Jun 22, 2023

Describe the bug
When hitting an oath2 resource server secured endpoint while micrometer is recording trace spans and Reactor has automatic context propagation enabled, an exception is thrown and a 500 is returned to the caller.

To Reproduce
Follow the steps outlined in the README of https://github.com/zoobert/reactor-failure

Expected behavior
A 200 response to be returned for an authenticated call to the server.

Sample

https://github.com/zoobert/reactor-failure

This is related to fixes made to Spring Boot 3.1.1 (soon to be released). It was initially reported in Project Reactor as related to #3499 and originally found when applying the advice from #3916 in Micrometer.

@zoobert zoobert added status: waiting-for-triage An issue we've not yet triaged type: bug A general bug labels Jun 22, 2023
@jzheaux
Copy link
Contributor

jzheaux commented Jul 9, 2023

Thanks for the report, @zoobert.

I was able to isolate the issue to WebClient. I've updated your sample in a PR to exclude Spring Security and add a controller method that requests the https://dev-ymp8imynkijzas0o.us.auth0.com/.well-known/jwks.json endpoint.

@bclozel, at this point is Spring Framework the best place to continue investigating this issue?

@bclozel
Copy link
Member

bclozel commented Jul 11, 2023

I have updated the sample to Spring Boot 3.1.2-SNAPSHOT and the error goes away. I think this is related to micrometer-metrics/micrometer#3943 which was fixed in 1.11.2.

I confirmed that by setting the Spring Boot version in the sample to 3.1.1 and overriding the Micrometer version to ext.set("micrometer.version", "1.11.2") - the error is still gone. I think this issue can be closed as a duplicate of the Micrometer issue.

@spring-projects-issues spring-projects-issues added status: feedback-provided Feedback has been provided and removed status: waiting-for-feedback We need additional information before we can continue labels Jul 11, 2023
@jzheaux
Copy link
Contributor

jzheaux commented Jul 11, 2023

Closing in favor of micrometer-metrics/micrometer#3943

@jzheaux jzheaux closed this as completed Jul 11, 2023
@jzheaux jzheaux added status: duplicate A duplicate of another issue and removed status: duplicate A duplicate of another issue status: feedback-provided Feedback has been provided labels Jul 11, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
status: duplicate A duplicate of another issue type: bug A general bug
Projects
None yet
Development

No branches or pull requests

4 participants