Skip to content

Commit 7037533

Browse files
drop IAE as it may not actually be client error but rather internal ne
1 parent f5a1bc2 commit 7037533

File tree

2 files changed

+11
-9
lines changed

2 files changed

+11
-9
lines changed

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

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1801,12 +1801,7 @@ public void testWriteOperations() throws IOException {
18011801
expectThrows(() -> deleteDataStream(MANAGE_FAILURE_STORE_ACCESS, dataIndexName), 403);
18021802

18031803
expectThrows(() -> deleteDataStream(MANAGE_FAILURE_STORE_ACCESS, "test1"), 403);
1804-
// delete API does not allow selectors
1805-
expectThrows(
1806-
() -> deleteDataStream(MANAGE_FAILURE_STORE_ACCESS, "test1::failures"),
1807-
400,
1808-
"Index component selectors are not supported in this context but found selector in expression [test1::failures]"
1809-
);
1804+
expectThrows(() -> deleteDataStream(MANAGE_FAILURE_STORE_ACCESS, "test1::failures"), 403);
18101805

18111806
// manage user can delete data stream
18121807
deleteDataStream(MANAGE_ACCESS, "test1");

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

Lines changed: 10 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -503,9 +503,16 @@ private void authorizeAction(
503503
indicesAndAliasesResolver.resolve(action, request, projectMetadata, authorizedIndices)
504504
),
505505
e -> {
506-
if (e instanceof IndexNotFoundException
507-
|| e instanceof InvalidIndexNameException
508-
|| e instanceof IllegalArgumentException) {
506+
if (e instanceof IndexNotFoundException || e instanceof InvalidIndexNameException) {
507+
logger.debug(
508+
() -> Strings.format(
509+
"failed [%s] action authorization for [%s] due [%s] exception",
510+
action,
511+
authentication,
512+
e.getClass().getSimpleName()
513+
),
514+
e
515+
);
509516
listener.onFailure(e);
510517
} else {
511518
auditTrail.accessDenied(requestId, authentication, action, request, authzInfo);

0 commit comments

Comments
 (0)