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

Cache keycloak authz requests #1222

Merged
merged 2 commits into from Sep 6, 2019

Conversation

@rocketeerbkw
Copy link
Member

commented Sep 4, 2019

The new RBAC system means the API queries keycloak for permissions. In cases where the API returns a lot of data, it can hammer keycloak with a lot of permission check requests. Since it's unlikely that a users permissions will change in the middle of an API request, we can cache the results per request.

Also added some better logging when keycloak auth requests fail.

Checklist

  • Affected Issues have been mentioned in the Closing issues section
  • Documentation has been written/updated.
  • Changelog entry has been written

Explain the details for making this change. What existing problem does the pull request solve?

Changelog Entry

Bugfix - Fix API slowness by caching keycloak authz response per API request

Closing issues

N/A

rocketeerbkw added 2 commits Sep 4, 2019
@rocketeerbkw rocketeerbkw changed the title API performance improvements Cache keycloak authz requests Sep 4, 2019
@Schnitzel Schnitzel merged commit dc24e61 into master Sep 6, 2019
1 check failed
1 check failed
continuous-integration/jenkins/pr-merge The build of this commit was aborted
Details
@rocketeerbkw rocketeerbkw deleted the GOV-380-performance-improvements branch Sep 19, 2019
@Schnitzel Schnitzel added this to the v1.1.0 milestone Sep 27, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
2 participants
You can’t perform that action at this time.