Skip to content

Commit 9b8b405

Browse files
committed
Tweak
1 parent 754e615 commit 9b8b405

File tree

2 files changed

+2
-7
lines changed

2 files changed

+2
-7
lines changed

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

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1381,9 +1381,7 @@ public String[] getIndices() {
13811381
public static Set<String> filterFailureIndices(Set<String> indices) {
13821382
return indices.stream().filter(index -> {
13831383
// TODO improve check
1384-
return index != null
1385-
&& (index.endsWith("::" + IndexComponentSelector.FAILURES.getKey())
1386-
|| index.endsWith("::" + IndexComponentSelector.FAILURES.getKey() + "/"));
1384+
return index != null && index.endsWith("::" + IndexComponentSelector.FAILURES.getKey());
13871385
}).collect(Collectors.toSet());
13881386
}
13891387

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

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -653,13 +653,10 @@ public static void buildRoleFromDescriptors(
653653
private static String stripFailuresSuffix(String input) {
654654
// TODO clean up
655655
String literalSuffix = "::failures";
656-
String regexSuffix = "::failures/";
657656
if (input.endsWith(literalSuffix)) {
658657
return input.substring(0, input.length() - literalSuffix.length());
659-
} else if (input.endsWith(regexSuffix)) {
660-
// TODO need to add back "/" since otherwise we break the regex
661-
return input.substring(0, input.length() - regexSuffix.length());
662658
}
659+
// TODO regex handling
663660
assert false : "unexpected failure index name: " + input;
664661
return input;
665662
}

0 commit comments

Comments
 (0)