-
Notifications
You must be signed in to change notification settings - Fork 531
Parametrized datasource in Keycloak SPI #11500
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
Conversation
… multiple datasources support
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.
I'm not sure any of us can do justice in a review. From what I know of Keycloak, this makes sense and, as noted, it is already working to support beta and qa. I noticed the build failed so I've restarted a run. I think if that passes and QA can briefly test it (create built in users on beta and QA via jsf/api and then verify that the user can login via the SPA (showing that keycloak is checking the two databases on the two different machines), it's good to go.
|
looks good, thanks! Going to merge. |
What this PR does / why we need it:
Adds an input parameter to the built-in Users SPI that allows specifying the datasource to be used. Currently, the supported options are:
user-store
user-store-qa
In the quarkus.properties file, it's not required to define both datasources—only the ones in use (e.g., if user-store-qa isn't needed, it can be omitted). However, both must be declared in the persistence.xml file to properly configure the JPA persistence units.
This change enables support for multiple databases from a single Keycloak server. In our setup, beta-keycloak.dataverse.org connects to both the QA and Beta databases.
When configuring the SPI within a Keycloak realm, the appropriate target datasource must be specified.
Which issue(s) this PR closes:
Special notes for your reviewer:
This is already installed and tested on beta-keycloak.dataverse.org
Suggestions on how to test this:
You can verify that beta-keycloak supports both the beta.dataverse.org and qa.dataverse.org environments equally.
Does this PR introduce a user interface change? If mockups are available, please link/include them here:
N/A
Is there a release notes update needed for this change?:
N/A
Additional documentation:
None