Repository navigation
Efficiently Fetching All User Menu Permissions in Keycloak: Performance Issues and Alternatives #40773
Unanswered
charlestaocn
asked this question in
Q&A
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Hello Folks,
I am using Keycloak to implement a feature that retrieves all the menu items (resources) a user has permission to access. Currently, I use the
permission/evaluateendpoint for this purpose. In my setup, there are about200 menu resources (type = "page")under the client, andeach menu can be accessed by 3 to 5 different roles.Each user usually has around 15 roles.When I call the evaluate endpoint, I pass in resourceType="page", userId, and clientId to get the list of permitted menus for that user.
However, I've noticed that with this design,
the computation is very slow, and my 4C8G container seems unable to handle the workload efficiently.The response time for the evaluation API is extremely long. Is my design appropriate for this scenario? Or is there a better way to achieve this functionality with Keycloak?I would be very grateful if you could kindly share any suggestions or best practices for my scenario. Thank you so much for your help and support!
All reactions