Unlimited index privileges cache can lead to OOM #126015
Labels
>bug
:Security/Authorization
Roles, Privileges, DLS/FLS, RBAC/ABAC
Team:Security
Meta label for security team
Elasticsearch Version
8.x
Installed Plugins
No response
Java Version
bundled
OS Version
all
Problem Description
Currently, the IndexPrivielge#CACHE is an unbounded
ConcurrentHashMap
. This can lead to a high memory consumption in clusters with many roles.Local testing showed that roughly ~500 roles with random set of index privileges can lead to OOM errors with 500MB heap.
example stacktrace
Steps to Reproduce
Logs (if relevant)
No response
The text was updated successfully, but these errors were encountered: