Skip to content
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

Record HTTP client metrics when spring-security requests OAuth2 resources from an authorization server #31981

Open
simondemartini opened this issue Aug 3, 2022 · 1 comment
Labels
type: enhancement A general enhancement

Comments

@simondemartini
Copy link

When including the spring-boot-starter-oauth2-resource-server, it would be nice if external requests made by Spring Security were included in the default Micrometer http client metrics. Including these would give visibility and better insight into the performance of the authorization servers.

In many cases it might not be too hard to add. For example, the default JwtDecoder in the OAuth2ResourceServerJwtConfiguration is built by NimbusJwtDecoder which uses it's own RestTemplate instance behind the scenes. It looks like the JwkSetUriJwtDecoderBuilder we use for this already has an option to provide a custom RestOperations. We could use this to set the default RestTemplateBuilder instance to get those metrics with minimal effort.

@spring-projects-issues spring-projects-issues added the status: waiting-for-triage An issue we've not yet triaged label Aug 3, 2022
@wilkinsona
Copy link
Member

#20750 is related to this.

@philwebb philwebb added type: enhancement A general enhancement and removed status: waiting-for-triage An issue we've not yet triaged labels Dec 22, 2022
@philwebb philwebb added this to the General Backlog milestone Dec 22, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type: enhancement A general enhancement
Projects
None yet
Development

No branches or pull requests

4 participants