Skip to content

Commit

Permalink
Manually backport Refactor and update exisiting ml roles opensearch-p…
Browse files Browse the repository at this point in the history
…roject#4151

Signed-off-by: Stephen Crawford <[email protected]>
  • Loading branch information
stephen-crawford committed Mar 22, 2024
1 parent a4496dd commit 2426340
Show file tree
Hide file tree
Showing 2 changed files with 25 additions and 1 deletion.
23 changes: 23 additions & 0 deletions config/roles.yml
Original file line number Diff line number Diff line change
Expand Up @@ -271,17 +271,40 @@ cross_cluster_search_remote_full_access:
- 'indices:admin/shards/search_shards'
- 'indices:data/read/search'

# Allow users to operate query assistant
query_assistant_access:
reserved: true
cluster_permissions:
- 'cluster:admin/opensearch/ml/config/get'
- 'cluster:admin/opensearch/ml/execute'
- 'cluster:admin/opensearch/ml/predict'
- 'cluster:admin/opensearch/ppl'

# Allow users to read ML stats/models/tasks
ml_read_access:
reserved: true
cluster_permissions:
- 'cluster:admin/opensearch/ml/config/get'
- 'cluster:admin/opensearch/ml/connectors/get'
- 'cluster:admin/opensearch/ml/connectors/search'
- 'cluster:admin/opensearch/ml/controllers/get'
- 'cluster:admin/opensearch/ml/memory/conversation/get'
- 'cluster:admin/opensearch/ml/memory/conversation/interaction/search'
- 'cluster:admin/opensearch/ml/memory/conversation/list'
- 'cluster:admin/opensearch/ml/memory/conversation/search'
- 'cluster:admin/opensearch/ml/memory/interaction/get'
- 'cluster:admin/opensearch/ml/memory/interaction/list'
- 'cluster:admin/opensearch/ml/memory/trace/get'
- 'cluster:admin/opensearch/ml/model_groups/get'
- 'cluster:admin/opensearch/ml/model_groups/search'
- 'cluster:admin/opensearch/ml/models/get'
- 'cluster:admin/opensearch/ml/models/search'
- 'cluster:admin/opensearch/ml/profile/nodes'
- 'cluster:admin/opensearch/ml/stats/nodes'
- 'cluster:admin/opensearch/ml/tasks/get'
- 'cluster:admin/opensearch/ml/tasks/search'
- 'cluster:admin/opensearch/ml/tools/get'
- 'cluster:admin/opensearch/ml/tools/list'

# Allows users to use all ML functionality
ml_full_access:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -117,7 +117,8 @@ public class DoNotFailOnForbiddenTests {
"indices:data/read/msearch",
"indices:data/read/scroll",
"cluster:monitor/state",
"cluster:monitor/health"
"cluster:monitor/health",
"cluster:monitor/term"
)
.indexPermissions(
"indices:data/read/search",
Expand Down

0 comments on commit 2426340

Please sign in to comment.