9 Commits

Author SHA1 Message Date
cfba630f5c RBAC: Don't additionally cache all users permissions (#105607)
* RBAC: Don't additionally cache all users permissions

* remove unused tests
2025-05-20 09:28:46 +02:00
757be6365a CI: Bump golangci-lint to 2.0.2 (#103572) 2025-04-10 14:42:23 +02:00
d89235aa8c IAM: fix GetSearchPermissionCacheKey uniqueness (#95192)
* fix: Change users permissions search to use a consistent key without collisions

* Move HashString to cacheutils

* Change error handling logic for what to do with a cache key

* Add a test that confirms search cache key consistency
2024-10-23 15:37:30 -05:00
88259da745 RBAC: Optimize permissions caching (#92673)
* Access control: Use composite cache key for team permissions

* use composite key for teams

* use cache for hotpath (getCachedUserPermissions)

* don't cache empty teams set

* don't pass permissions as argument

* early return if no teams found

* reload cache correctly

* optimize allocations

* Clear user's teams cache

* remove composite cache for teams

* fix linter

* don't clear teams permissions

* pre-allocate memory for basic roles permissions
2024-09-03 15:46:56 +02:00
86e8e3b75d Revert "RBAC: Optimize permissions caching" (#92548)
Revert "RBAC: Optimize permissions caching (#92412)"

This reverts commit 488e994d378363fd6a866d3aa62e299462582d24.

Co-authored-by: gamab <gabriel.mabille@grafana.com>
2024-08-28 10:44:38 +02:00
488e994d37 RBAC: Optimize permissions caching (#92412)
* Access control: Use composite cache key for team permissions

* use composite key for teams

* use cache for hotpath (getCachedUserPermissions)

* fix linter

* fix sorting

---------

Co-authored-by: Jeff Levin <jeff@levinology.com>
2024-08-27 10:31:52 +02:00
99d8025829 Chore: Move identity and errutil to apimachinery module (#89116) 2024-06-13 07:11:35 +03:00
0302b75721 Access control: Use search options for computing permissions cache key (#87589) 2024-05-10 12:06:52 +03:00
d1c582815a Access control: Fix searching permissions from cache (#87489)
* Fix searching permissions from cache

* Write permissions to cache
2024-05-08 16:08:21 +02:00