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

Update DevServices for Keycloak to support Keycloak-X #19457

Merged
merged 1 commit into from
Nov 5, 2021

Conversation

sberyozkin
Copy link
Member

Fixes #19141

Importing the custom realm files does not work, see also https://keycloak.discourse.group/t/keycloak-x-distribution-import-configuration-issue/8583.

Some properties and endpoint addresses have changed - the final PR would support both WildFly and Quarkus based distributions, there will be some extra property like quarkus.keycloak.devservices.image-distribution=quarkus (or wildfly) for the dev services processor to set the properties correctly.

CC @pedroigor @stuartwdouglas @phillip-kruger

@geoand
Copy link
Contributor

geoand commented Sep 30, 2021

This seems pretty useful, what's the status of it?

@sberyozkin
Copy link
Member Author

We'll have to wait for the next Keycloak-X release containing some fixes (importing the realm works with http

@sberyozkin sberyozkin force-pushed the keycloak_x_for_devservices branch from cb447a7 to d079b08 Compare November 1, 2021 17:08
@sberyozkin sberyozkin changed the title Update DevServices for Keycloak to use Keycloak-X by default Update DevServices for Keycloak to support Keycloak-X Nov 2, 2021
@sberyozkin sberyozkin marked this pull request as ready for review November 2, 2021 18:18
@sberyozkin sberyozkin force-pushed the keycloak_x_for_devservices branch from d079b08 to 05f1737 Compare November 2, 2021 18:18
@sberyozkin
Copy link
Member Author

@phillip-kruger @stuartwdouglas Keycloak 16.0.0 will be hopefully coming soon but for now I've decided to finalize this PR with 15.0.2 - the only missing feature is that auto importing the realm file does not work well with Keycloak-X - which can be easily worked around by importing a realm via Keycloak Admin.

I'll follow up with another PR to use Keycloak-X by default once Keycloak 16.0.0 is released and the quickstart tests will start passing with Keycloak-X - in meantime the users should be able to start experimenting with Keycloak-X - I really should've guessed to complete this PR much earlier.

Have a look please and then I'll merge

@stuartwdouglas
Copy link
Member

Isn't importing the realm fairly important? I don't think it can 'be easily worked around via the admin console' because you can't really use the admin console in tests, and having to do this every time you start dev mode is a terrible user experience.

@sberyozkin
Copy link
Member Author

sberyozkin commented Nov 3, 2021

@stuartwdouglas Indeed, the quickstart tests won't pass yet - but one can start writing the tests without importing a custom realm as the default realm will be created, with the default users and roles - which can be customized with quarkus.keycloak.devservices.users (map of user-password pairs) and quarkus.keycloak.devservices.roles (map of user-role pairs).
So yes, the only restriction is the tests don't work yet with the custom realm - but the Keycloak-X image name is not a default yet - so this PR is for users to start experimenting with it using the defaults or even with the custom realm but from Dev UI.
I don't mind waiting, but not sure Keycloak 16.0 will be ready before 2.5.0.CR1

Copy link
Member

@stuartwdouglas stuartwdouglas left a comment

Choose a reason for hiding this comment

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

Can we have an Optional keycloakX config property to override the automatic detection? Looking for '-x' in the image name just feels kinda fragile to me.

@sberyozkin sberyozkin force-pushed the keycloak_x_for_devservices branch from 05f1737 to 00db64e Compare November 4, 2021 16:56
@sberyozkin
Copy link
Member Author

@stuartwdouglas Have a look please, added keycloak-x-image optional boolean, it is checked first: see https://github.com/quarkusio/quarkus/pull/19457/files#diff-67404a43520250b1ebd5a0c945e070e60d70d4a3ba06b15e3fac747f820320ccR327

@sberyozkin sberyozkin merged commit b9bb479 into quarkusio:main Nov 5, 2021
@quarkus-bot quarkus-bot bot added this to the 2.5 - main milestone Nov 5, 2021
@sberyozkin sberyozkin deleted the keycloak_x_for_devservices branch November 5, 2021 09:55
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.

Keycloak Dev Service doesn't use the Quarkus distribution of Keycloak
5 participants