Skip to content

Support custom CAs in oauth login #16920

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

Open
gbaso opened this issue Apr 10, 2025 · 0 comments
Open

Support custom CAs in oauth login #16920

gbaso opened this issue Apr 10, 2025 · 0 comments
Labels
status: waiting-for-triage An issue we've not yet triaged type: enhancement A general enhancement

Comments

@gbaso
Copy link
Contributor

gbaso commented Apr 10, 2025

Expected Behavior

The internal rest clients should trust custom CAs.

Current Behavior

The internal clients only support CAs in the jdk truststore.

Context

In corporate environments sometime the identity provider is part of the corporate network and has an HTTPS certificate that is signed by the corporate CA.

Applications with oauth/oidc login perform several requests to the IdP, for retrieving metadata or for exchanging tokens. This is done with internal clients, for example in ClientRegistrations or in AbstractRestClientOAuth2AccessTokenResponseClient, that are not configurable. While the latter allows to replace the RestClient, at the cost of having to reconfigure the message converters and status handler, the former does not.

The only avenue then is to add your custom CAs to the jdk truststore, usually done with the ca-certificates buildpack. Unfortunately, loading CAs at runtime doesn't seem to work in native image.

It would be useful to be able to specify ssl bundles when configuring registrations via properties, and for those bundles to be applied to the internal clients.

@gbaso gbaso added status: waiting-for-triage An issue we've not yet triaged type: enhancement A general enhancement labels Apr 10, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
status: waiting-for-triage An issue we've not yet triaged type: enhancement A general enhancement
Projects
None yet
Development

No branches or pull requests

1 participant