Have OIDC DevUI web-app function included with quarkus.oidc.provider #32971
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This is a minor tweak to OIDC DevUI
provider.html
to have a function dealing withquarkus.oidc.application-type=web-app
included in the produced script, when we only have something likequarkus.oidc.provider=google
etc.With
quarkus.oidc.provider=google
only, theapplication-type=web-app
is set internally onOidcTenantConfig
.Build steps can detect it, but
provider.html
itself seesinfo:oidcApplicationType
prepared by the build step only ifquarkus.oidc.application-type
is explicitly set inapplication.properties
. Looks like the scripts are resolved early, before the build step (OidcDevConsoleProcessor
) preparesinfo:oidcApplicationType
by fetching the correct value fromOidcTenantConfig
created fromquarkus.oidc.provider=google
.So the solution I've come up with is this, the top branch in
provider.html
checks if is the type is eitherservice
orhybrid
and now, instead of also checking if it isweb-app
I just doelse
- it can only beweb-app
in this branch because we only have 3 application types.And now
quarkus.oidc.application-type=web-app
is working correctly forquarkus.oidc.provider=google
.This is not a proper fix, kind of a hack, but it is safe nonetheless, it will work fine for explicitly declared
quarkus.oidc.application-type
.The other thing is that testing
web-app
from Dev UI is not useful - since Quarkus is in control of the flow (i.e, once the authentication is complete, the control is not returned back to DevUI, it stays with the browser), but for the purpose of the demo, it can be useful to show it and thus explain whyquarkus.oidc.provider=google
should have an extraquarkus.oidc.application-type=service
(orhybrid
) property inapplication.properties
for it to be tested from SPA such as Dev UI