Skip to content

Commit be718df

Browse files
committed
Moar
1 parent d8ed014 commit be718df

File tree

1 file changed

+3
-2
lines changed
  • x-pack/plugin/security/src/main/java/org/elasticsearch/xpack/security/authz

1 file changed

+3
-2
lines changed

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

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -885,7 +885,8 @@ static AuthorizedIndices resolveAuthorizedIndicesFromRole(
885885
// TODO: can this be done smarter? I think there are usually more indices/aliases in the cluster then indices defined a roles?
886886
if (includeDataStreams) {
887887
for (IndexAbstraction indexAbstraction : lookup.values()) {
888-
// TODO clean this up and explain
888+
// failure indices are special: when accessed directly (not through ::failures on parent data stream) they are accessed
889+
// as implicitly as data. However, authz to the parent data stream happens via the failures selector
889890
if (indexAbstraction.isFailureIndexOfDataStream()
890891
&& predicate.test(indexAbstraction.getParentDataStream(), IndexComponentSelector.FAILURES)) {
891892
indicesAndAliases.add(indexAbstraction.getName());
@@ -927,8 +928,8 @@ static AuthorizedIndices resolveAuthorizedIndicesFromRole(
927928
}
928929
}
929930
}
930-
timeChecker.accept(indicesAndAliases);
931931
}
932+
timeChecker.accept(indicesAndAliases);
932933
return indicesAndAliases;
933934
}, (name, selectorString) -> {
934935
final IndexAbstraction indexAbstraction = lookup.get(name);

0 commit comments

Comments
 (0)