Skip to content

Commit

Permalink
Add Resolve Index API to the "read" permission for an index (#87052) (#…
Browse files Browse the repository at this point in the history
…87169)

This commit allows the index "read" permission to also allow using the
resolve index Action.

Resolves #86977
  • Loading branch information
dakrone committed May 26, 2022
1 parent c333dc8 commit b403c0e
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 2 deletions.
6 changes: 6 additions & 0 deletions docs/changelog/87052.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
pr: 87052
summary: Add Resolve Index API to the "read" permission for an index
area: Indices APIs
type: bug
issues:
- 86977
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ public final class IndexPrivilege extends Privilege {
private static final Logger logger = LogManager.getLogger(IndexPrivilege.class);

private static final Automaton ALL_AUTOMATON = patterns("indices:*", "internal:transport/proxy/indices:*");
private static final Automaton READ_AUTOMATON = patterns("indices:data/read/*");
private static final Automaton READ_AUTOMATON = patterns("indices:data/read/*", ResolveIndexAction.NAME);
private static final Automaton READ_CROSS_CLUSTER_AUTOMATON = patterns(
"internal:transport/proxy/indices:data/read/*",
ClusterSearchShardsAction.NAME
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ setup:
body: >
{
"indices": [
{ "names": ["matches_none"], "privileges": ["read"] }
{ "names": ["matches_none"], "privileges": ["monitor"] }
]
}
Expand Down

0 comments on commit b403c0e

Please sign in to comment.