You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This PR adds support for checking access to the failure store via the
Has Privileges API.
To check access for a data stream `logs`, a request must query for a
concrete named privilege, `read_failure_store` or
`manage_failure_store`, e.g., a request to the HasPrivileges API by a
user with `read_failure_store` over `logs`:
```
POST /_security/user/_has_privileges
{
"index": [
{
"names": ["logs"],
"privileges": ["read_failure_store", "read", "indices:data/read/*"]
}
]
}
```
Returns:
```
{ "username": "<...>", "has_all_requested": false,
"cluster": {}, "index": { "logs": {
"read_failure_store": true, "read": false, <1>
"indices:data/read/*": false <2> } }, "application": {}
}
```
Note that `<1>` and `<2>` are both `false` since `read` is not covered by `read_failure_store` and neither are any raw actions like `indices:data/read/*` since these implicitly correspond to data access.
Selectors are not allowed in the index patterns of HasPrivileges requests to avoid ambiguities such as checking `read` on `logs::failures` as well as the ambiguity of index patterns that are regular expressions.
(cherry picked from commit 0e0214d)
# Conflicts:
# x-pack/plugin/core/src/main/java/org/elasticsearch/xpack/core/security/authz/permission/IndicesPermission.java
Copy file name to clipboardExpand all lines: x-pack/plugin/core/src/main/java/org/elasticsearch/xpack/core/security/authz/permission/IndicesPermission.java
+78-23Lines changed: 78 additions & 23 deletions
Original file line number
Diff line number
Diff line change
@@ -317,36 +317,58 @@ public boolean checkResourcePrivileges(
0 commit comments