Skip to content

Commit fb599ca

Browse files
committed
Prevent privilege checks
1 parent 400a1f7 commit fb599ca

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

x-pack/plugin/core/src/main/java/org/elasticsearch/xpack/core/security/authz/AuthorizationEngine.java

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -366,6 +366,14 @@ public ActionRequestValidationException validate(ActionRequestValidationExceptio
366366
&& application.length == 0) {
367367
validationException = addValidationError("must specify at least one privilege", validationException);
368368
}
369+
if (index != null) {
370+
for (RoleDescriptor.IndicesPrivileges indexPrivilege : index) {
371+
if (Arrays.stream(indexPrivilege.getPrivileges())
372+
.anyMatch(p -> "read_failure_store".equals(p) || "manage_failure_store".equals(p))) {
373+
validationException = addValidationError("checking failure store privileges is not supported", validationException);
374+
}
375+
}
376+
}
369377
return validationException;
370378
}
371379

0 commit comments

Comments
 (0)