-
Notifications
You must be signed in to change notification settings - Fork 2.7k
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
Initial support for generic OIDC properties #4398
Conversation
@stianst @pedroigor @stuartwdouglas, @pmlopes |
Fixes #4392 |
Having a single auth-server-url only works if it is used as the base for the discovery endpoint. Otherwise, it would not be able to support other IdPs than Keycloak. I see hardcoded URLs that are Keycloak specific here. Does Vert.X support discovery endpoint currently? |
@stianst thanks; the only hardcoded URL is a default relative introspection path here. I've set it to a Keycloak specific value for the KC users not having to type it when they need it. In other cases the users will point to something else for the introspection to work. The general approach in the Vertx adapter is not to depend on the discovery endpoint be available (which won't be I guess for some servers - given that, as discussed, having this adapter be able to validate the tokens not necessarily produced by the certified OIDC IDPs would be good) but to let the users point with the relative path properties to various important endpoints, see OAuthClientOptions @pmlopes linked to. I do like the idea of just having a discovery endpoint URL set and be done :-), I don't think VertX supports it yet, but when it will then we will just enhance the adapter a bit, for example, we can add a discovery relative path property added and say if this is set then all other relative paths are not required/will be ignored and the adapter will deduce itself the addresses, or if no relative addresses are set then assume Does it sound reasonable ? |
Not sure what the purpose of auth-base-url would be unless it points to the discovery endpoint. I would rather have the options a) specify discovery-uri (with or without .well-known/oidc-configuration), or b) specify individual endpoints. The introspection endpoint can also be found in the discovery endpoint as introspection_endpoint. So no need to set that separately. For good usability and portability it's important to support the discovery endpoint in Vert.X. |
publicKey is more a backup approach for IdPs that don't support discovery endpoint and don't have a proper JWK endpoint. For Keycloak keys should be loaded from jwks_uri from discovery endpoint and not specified directly in the config. |
@stianst The purpose is not to require users having to enter something like
instead the users of Keycloak/Okta/etc just do:
Once VertX supports the doscovery endpoint we will just say:
and that is it. So I don't see any contradiction between what we have now and what will be possible later on once the discovery endpoint is supported hopefully for 1.0. |
@stianst re the public key - sure, this property was there (with a 'realm' prefix which I dropped) and having it available for some users would be useful I guess, but of course, as you recommend, we;d encourage the users to use JWK keys and enable the key rotation |
Thanks for the clarification. That makes a lot more sense now. |
@stianst thanks Stian, we will definitely encourage the users to go the discovery endpoint way :-) once it is supported. I'll open an issue to track it and will CC you and Pedro |
@stuartwdouglas, @pmlopes, @pedroigor FYI, I've removed the code related to the public client and the use of the authorization header because it was not really clear it was required by the adapter itself. Stuart, should be good to go otherwise if we want 0.24.0 Keycloak users starting a new journey without an explicit |
@stuartwdouglas I've updated the |
Fixes #4392