AuthZService: improve authz caching (#103633)
* remove the use of client side cache for in-proc authz client Co-authored-by: Gabriel MABILLE <gabriel.mabille@grafana.com> * add a permission denial cache, fetch perms if not in either of the caches Co-authored-by: Gabriel MABILLE <gabriel.mabille@grafana.com> * Clean up tests Co-authored-by: Ieva <ieva.vasiljeva@grafana.com> * Cache tests Co-authored-by: Ieva <ieva.vasiljeva@grafana.com> * Add test to list + cache Co-authored-by: Ieva <ieva.vasiljeva@grafana.com> * Add outdated cache test Co-authored-by: Ieva <ieva.vasiljeva@grafana.com> * Re-organize metrics Co-authored-by: Ieva <ieva.vasiljeva@grafana.com> --------- Co-authored-by: Gabriel MABILLE <gabriel.mabille@grafana.com>
This commit is contained in:
@@ -27,6 +27,10 @@ func userPermCacheKey(namespace, userUID, action string) string {
|
||||
return namespace + ".perm_" + userUID + "_" + action
|
||||
}
|
||||
|
||||
func userPermDenialCacheKey(namespace, userUID, action, name, parent string) string {
|
||||
return namespace + ".perm_" + userUID + "_" + action + "_" + name + "_" + parent
|
||||
}
|
||||
|
||||
func userBasicRoleCacheKey(namespace, userUID string) string {
|
||||
return namespace + ".basic_role_" + userUID
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user