-
Notifications
You must be signed in to change notification settings - Fork 532
Hide SPA OIDC Providers from JSF login screen #11922
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
Hide SPA OIDC Providers from JSF login screen #11922
Conversation
src/main/java/edu/harvard/iq/dataverse/authorization/AuthenticationProvider.java
Outdated
Show resolved
Hide resolved
...main/java/edu/harvard/iq/dataverse/authorization/providers/oauth2/oidc/OIDCAuthProvider.java
Outdated
Show resolved
Hide resolved
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
src/main/java/edu/harvard/iq/dataverse/authorization/AuthenticationProvider.java
Outdated
Show resolved
Hide resolved
...arvard/iq/dataverse/authorization/providers/oauth2/AbstractOAuth2AuthenticationProvider.java
Outdated
Show resolved
Hide resolved
...arvard/iq/dataverse/authorization/providers/oauth2/AbstractOAuth2AuthenticationProvider.java
Outdated
Show resolved
Hide resolved
...arvard/iq/dataverse/authorization/providers/oauth2/AbstractOAuth2AuthenticationProvider.java
Outdated
Show resolved
Hide resolved
...arvard/iq/dataverse/authorization/providers/oauth2/AbstractOAuth2AuthenticationProvider.java
Outdated
Show resolved
Hide resolved
This comment has been minimized.
This comment has been minimized.
1 similar comment
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
2 similar comments
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
|
📦 Pushed preview images as 🚢 See on GHCR. Use by referencing with full name as printed above, mind the registry name. |
qqmyers
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good. This makes the new MPConfig settings the only way to configure an SPA-only provider. Per the discussion - further changes might be needed if/when the JSF is dropped, or the SPA needs more than one provider, or there are more UIs, etc.
I'm leaving a comment about the doc wording but won't hold up approval for it.
|
|
||
| For Dataverse instances deploying both the current JSF UI and the new SPA UI, this fix allows the OIDC Keycloak provider configured for the SPA to be hidden in the JSF UI (useful in cases where it would duplicate other configured providers). | ||
|
|
||
| Note: The API to create a new Auth Provider can only be used to create a provider for both JSF and SPA. Use JVM / MicroProfile config setting to create SPA only providers. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Something like: Note: If you are using the old and new Dataverse UIs, you must use JVM/MPConfig to create the SPA provider if the old UI will continue using other providers (registered via the API).
|
|
||
| POST http://$SERVER/api/admin/authenticationProviders | ||
|
|
||
| .. note:: This endpoint will create providers for both JSF and SPA. Use :ref:`jvm-options` / *MicroProfile Config* if you need to create SPA only providers. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If you use this API to add an OIDC provider for use with the new (SPA) Dataverse UI, it will also be visible in the old (JSF) UI. To avoid this, use the :ref:jvm-options / MicroProfile Config to create an SPA-only provider.
|
Tested this with and without additional auth providers configured. The login works as expected from both JSF and SPA. |
What this PR does / why we need it: Some OIDC providers created for SPA fail when selected in JSF UI login screen. These need to only show in the SPA login screen.
Which issue(s) this PR closes: #11606
Special notes for your reviewer:
Suggestions on how to test this: See AdminIT for setup.
Does this PR introduce a user interface change? If mockups are available, please link/include them here: No
Is there a release notes update needed for this change?: included
Additional documentation: