Skip to content

Commit 6a1e4af

Browse files
committed
Address review comments
1 parent c07df16 commit 6a1e4af

File tree

3 files changed

+4
-4
lines changed

3 files changed

+4
-4
lines changed

x-pack/plugin/security/qa/security-trial/src/javaRestTest/java/org/elasticsearch/xpack/security/failurestore/FailureStoreSecurityRestIT.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1290,7 +1290,7 @@ public void testFailureStoreAccess() throws Exception {
12901290
request,
12911291
containsString(
12921292
"this action is granted by the index privileges [read,all] for data access, "
1293-
+ "or by [read_failure_store] for access with the [failures] selector"
1293+
+ "or by [read_failure_store] for access with the [::failures] selector"
12941294
)
12951295
);
12961296
break;
@@ -2272,7 +2272,7 @@ private static void expectThrows(ThrowingRunnable runnable, int statusCode) {
22722272
}
22732273

22742274
private void expectThrowsUnauthorized(String user, Search search, Matcher<String> errorMatcher) {
2275-
ResponseException ex = expectThrows(ResponseException.class, () -> performRequest(user, search.toSearchRequest()));
2275+
ResponseException ex = expectThrows(ResponseException.class, () -> performRequestMaybeUsingApiKey(user, search.toSearchRequest()));
22762276
assertThat(ex.getResponse().getStatusLine().getStatusCode(), equalTo(403));
22772277
assertThat(ex.getMessage(), errorMatcher);
22782278
}

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -130,7 +130,7 @@ public String actionDenied(
130130
message = message
131131
+ " for data access, or by ["
132132
+ collectionToCommaDelimitedString(privilegesForFailuresOnly)
133-
+ "] for access with the [failures] selector";
133+
+ "] for access with the [::failures] selector";
134134
}
135135
}
136136
}

x-pack/plugin/security/src/test/java/org/elasticsearch/xpack/security/authz/AuthorizationDenialMessagesTests.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -255,7 +255,7 @@ public void testActionDeniedWithFailuresAndCorrectActionIncludesFailuresMessage(
255255
denialMessages.actionDenied(authentication, null, action, request, null),
256256
endsWith(
257257
"this action is granted by the index privileges [read,all] for data access, "
258-
+ "or by [read_failure_store] for access with the [failures] selector"
258+
+ "or by [read_failure_store] for access with the [::failures] selector"
259259
)
260260
);
261261
}

0 commit comments

Comments
 (0)