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

Support for provider-neutral OIDC Dev UI #19969

Merged
merged 1 commit into from
Sep 8, 2021

Conversation

sberyozkin
Copy link
Member

Fixes #18427.

This PR simply makes Dev UI page which is currently only shown when Dev Services for Keycloak is started visible when quarkus.oidc.auth-server-url already points to a started Keycloak or indeed any other OpenId Connect provider which support the auto-discovery.

As far as the provider.html is concerned I just had to do a few ifs/elses as a provider like Auth0 does not return a logout URL, and also does not support returning the code as URL fragment, and do a few minor updates to avoid assuming that all provider URLs are Keycloak based.

Finally I had to move a few handlers to the quarkus.oidc.devservices package to reuse between Dev Services for Keycloak and generic OpenId Connect Dev Console - both are supported by the same provider.html.

Tested with Keycloak and Auth0.
In a follow up PR I'll do a bit more work to support more token grants with non-Keycloak providers.

@quarkus-bot
Copy link

quarkus-bot bot commented Sep 7, 2021

This workflow status is outdated as a new workflow run has been triggered.

Failing Jobs - Building 79a43d7

Status Name Step Failures Logs Raw logs
JVM Tests - JDK 11 Build Failures Logs Raw logs
JVM Tests - JDK 11 Windows Build Failures Logs Raw logs
JVM Tests - JDK 16 Build Failures Logs Raw logs

Full information is available in the Build summary check run.

Failures

⚙️ JVM Tests - JDK 11 #

- Failing: integration-tests/devmode 

📦 integration-tests/devmode

io.quarkus.test.devconsole.DevConsoleOidcSmokeTest.testCaches line 26 - More details - Source on GitHub

java.lang.AssertionError: 
1 expectation failed.
Response body doesn't match expectation.

⚙️ JVM Tests - JDK 11 Windows #

- Failing: integration-tests/devmode 

📦 integration-tests/devmode

io.quarkus.test.devconsole.DevConsoleOidcSmokeTest.testCaches line 26 - More details - Source on GitHub

java.lang.AssertionError: 
1 expectation failed.
Response body doesn't match expectation.

⚙️ JVM Tests - JDK 16 #

- Failing: integration-tests/devmode 

📦 integration-tests/devmode

io.quarkus.test.devconsole.DevConsoleOidcSmokeTest.testCaches line 26 - More details - Source on GitHub

java.lang.AssertionError: 
1 expectation failed.
Response body doesn't match expectation.

Copy link
Member

@phillip-kruger phillip-kruger left a comment

Choose a reason for hiding this comment

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

LGTM, just some Tests cases failing ? I think the tests needs updating ?

@sberyozkin
Copy link
Member Author

@phillip-kruger Hi Phillip, thanks, yes, just fixed it - as the title is now set dynamically, Keycloak is only set as a title if keycloak.url is set, OpenId Connect Dev Console otherwise - the latter might work better for both cases...

@sberyozkin
Copy link
Member Author

@phillip-kruger @stuartwdouglas thanks, I've been thinking since yesterday about experimenting with the way it is all named depending on whether it is Keycloak or not, but I'll give it a try a bit later

@sberyozkin sberyozkin merged commit 0809f59 into quarkusio:main Sep 8, 2021
@quarkus-bot quarkus-bot bot added this to the 2.3 - main milestone Sep 8, 2021
@sberyozkin sberyozkin deleted the oidc_dev_console branch September 8, 2021 08:25
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.

Provide Dev UI for OIDC when quarkus.oidc.auth-server-url is enabled which will work for all OIDC providers
3 participants