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

Allow multiple realms to be configured with quarkus.keycloak.devservices.realm-path (multi-tenancy) #28031

Closed
HerrDerb opened this issue Sep 17, 2022 · 6 comments · Fixed by #28327

Comments

@HerrDerb
Copy link
Contributor

HerrDerb commented Sep 17, 2022

Description

For the keycloak devservice, it is possible to define the property quarkus.keycloak.devservices.realm-path with a realm.json which initializes the dev service.

This works great if you only need one realm. File content -> { ... }

It does not work, when more than one realm are needed.
It would be great if one could define an array of realms inside the realm.json of which all are getting initialized. File content -> [ { ... }, { ... } ]
Currently, a file like this simply gets ignored.

Implementation ideas

No response

@HerrDerb HerrDerb added the kind/enhancement New feature or request label Sep 17, 2022
@HerrDerb HerrDerb changed the title Allow multiple realms to be configured with a real.json Allow multiple realms to be configured with a realm.json Sep 17, 2022
@HerrDerb HerrDerb changed the title Allow multiple realms to be configured with a realm.json Allow multiple realms to be configured with quarkus.keycloak.devservices.realm-path Sep 17, 2022
@quarkus-bot
Copy link

quarkus-bot bot commented Sep 17, 2022

/cc @geoand, @pedroigor, @stuartwdouglas

@sberyozkin
Copy link
Member

@HerrDerb, it can be simpler to support multiple files, and then upload each file in turn as opposed to parsing this JSON document.
However, what is your use case ? A single OIDC tenant has a client id/secret specific to a given realm. So not sure having more than 1 realm uploaded really helps - or do you have a multi-tenancy support in mind ?

@HerrDerb HerrDerb changed the title Allow multiple realms to be configured with quarkus.keycloak.devservices.realm-path Allow multiple realms to be configured with quarkus.keycloak.devservices.realm-path (multi-tenancy) Sep 17, 2022
@HerrDerb
Copy link
Contributor Author

@sberyozkin , yes I'm building a multi-tenancy system. I forgott to mention this. That why I would like to be able to initialize a keycloak devservice with more then one realm.

@sberyozkin
Copy link
Member

It will require a significant effort as importing multiple realms will not in itself affect a DevUI experience. Worth thinking though how it all can be managed

@sberyozkin
Copy link
Member

@HerrDerb I've been thinking about it, I believe we can let users select a realm they would like to login to at the OIDC Dev UI login page if more than one realm is available - I'll have a look

@HerrDerb
Copy link
Contributor Author

@sberyozkin That be cool 👍Thanks

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants