KEYCLOAK-6096: Enhance Keycloak Web Admin Console to support a bigger amount of realms#8851
Closed
pmentz wants to merge 1 commit intokeycloak:mainfrom
Closed
KEYCLOAK-6096: Enhance Keycloak Web Admin Console to support a bigger amount of realms#8851pmentz wants to merge 1 commit intokeycloak:mainfrom
pmentz wants to merge 1 commit intokeycloak:mainfrom
Conversation
This comment was marked as off-topic.
This comment was marked as off-topic.
stianst
reviewed
Jun 29, 2023
Comment on lines
+263
to
+268
| session.realms().getRealmsStream() | ||
| .filter(r -> realmName == null || realmName.equals(r.getName())) | ||
| .forEach(realm -> { | ||
| ClientModel realmAdminApp = realm.getMasterAdminClient(); | ||
| getRealmAdminAccess(realm, realmAdminApp, user, realmAdminAccess); | ||
| }); |
Contributor
There was a problem hiding this comment.
Why list/filter and not just grab the realm by name? Something like this:
Suggested change
| session.realms().getRealmsStream() | |
| .filter(r -> realmName == null || realmName.equals(r.getName())) | |
| .forEach(realm -> { | |
| ClientModel realmAdminApp = realm.getMasterAdminClient(); | |
| getRealmAdminAccess(realm, realmAdminApp, user, realmAdminAccess); | |
| }); | |
| RealmModel realm = session.realms().getRealmByName(realmName); | |
| getRealmAdminAccess(realm, realmAdminApp, user, realmAdminAccess); |
Contributor
|
@pedroigor @mposolda @ahus1 something like this would probably be a nice small increment towards scaling better for many realms. @jonkoops @EricWittmann would it be hard to update this for the new admin console so it fetches whoAmI when the selected realm changes? |
Contributor
Should not be to hard, we can add the realm as a dependency here and it should re-fetch it automatically. |
Contributor
|
Follow-up for this one: #21554 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Hi everyone,
we use Keycloak in a multi-tenant environment (~700 tenants) and the master realm Admin Console is essentially unusable for us due to performance problems with the whoami endpoint.
This PR introduces a per-realm-usage of the whoami endpoint from the Web Admin Console. The changes should be backward compatible and the usage of the additional realm parameter for the whoami endpoint is limited to requests of the master realm.