Skip to content

Allow to customize OIDC discovery path#52667

Closed
sberyozkin wants to merge 1 commit intoquarkusio:mainfrom
sberyozkin:oidc_discovery_path
Closed

Allow to customize OIDC discovery path#52667
sberyozkin wants to merge 1 commit intoquarkusio:mainfrom
sberyozkin:oidc_discovery_path

Conversation

@sberyozkin
Copy link
Member

Fixes #49668

With MCP Authorization highlighting that not only .well-known/openid-configuration well known address for finding the provider metadata is possible it is time to let users customize it.

For ex, a GitHub OAuth2 provider associated with the GitHub MCP Server has its metadata available at .well-known/oauth-authorization-server/login/oauth

@quarkus-bot

This comment has been minimized.

@github-actions
Copy link

github-actions bot commented Feb 18, 2026

🙈 The PR is closed and the preview is expired.

@quarkus-bot

This comment has been minimized.

@sberyozkin sberyozkin marked this pull request as draft February 18, 2026 19:00
@sberyozkin
Copy link
Member Author

Sorry I thought it was green

@michalvavrik
Copy link
Member

Sorry I thought it was green

If you are not careful Guillaume will knock at your doors.

@sberyozkin
Copy link
Member Author

@michalvavrik I run the oidc-tenancy test on my laptop, it was fine, there is some slowness there when it tries to connect to a non existent address for some reasons, so may be it was a timeout

@quarkus-bot
Copy link

quarkus-bot bot commented Feb 19, 2026

Status for workflow Quarkus Documentation CI

This is the status report for running Quarkus Documentation CI on commit 4fa9a0b.

✅ The latest workflow run for the pull request has completed successfully.

It should be safe to merge provided you have a look at the other checks in the summary.

Warning

There are other workflow runs running, you probably need to wait for their status before merging.

@quarkus-bot
Copy link

quarkus-bot bot commented Feb 19, 2026

Status for workflow Quarkus CI

This is the status report for running Quarkus CI on commit 4fa9a0b.

✅ The latest workflow run for the pull request has completed successfully.

It should be safe to merge provided you have a look at the other checks in the summary.

You can consult the Develocity build scans.

*
* @deprecated use {@link #discoveryPath()} method instead
*/
@Deprecated(forRemoval = true)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

personally, I introduce them as private and thus avoid the deprecation, but that is just FYI, it makes no practical difference. IMO we should cut them soon anyway (Quarkus 4?)

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hi @michalvavrik Yeah, sounds like the right time

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@michalvavrik Ouch, I messed up with the squash and used the wrong base commit, I'll have to create a new commit, reverting squash did not go according to plan

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think you included other PR to avoid merge conflicts. No problem, I am not reviewing these parts.

Copy link
Member

@michalvavrik michalvavrik left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

OIDC Discovery path - LGTM and makes sense!

public static String getDiscoveryUri(String authServerUrl) {
return authServerUrl + OidcConstants.WELL_KNOWN_CONFIGURATION;
public static String getDiscoveryUri(String authServerUrl, String discoveryPath) {
return authServerUrl + prependSlash(discoveryPath != null ? discoveryPath : OidcConstants.WELL_KNOWN_CONFIGURATION);
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If you are going to make another push, you could apply "prependSlash" only on discoveryPath, not the constant. If not, let's keep it as is.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@michalvavrik hey, it would not add it if the path already starts with / so I'd probably avoid another push

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@michalvavrik hey, it would not add it if the path already starts with / so I'd probably avoid another push

cool, just please check that non-related code, because I think this PR contains changes it shouldn't. Thanks.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

state cookie

@cescoffier
Copy link
Member

🤖 Automatically associated with the WG - OIDC improvements Working Group based on AI classification.

@cescoffier
Copy link
Member

Removing the working group association.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Customize OIDC discovery endpoint address

3 participants