Skip to content

Commit

Permalink
Add query assistant role and new ml system indices (opensearch-projec…
Browse files Browse the repository at this point in the history
…t#4141)

Signed-off-by: Sicheng Song <[email protected]>
  • Loading branch information
b4sjoo authored Mar 19, 2024
1 parent 91efc3b commit 633ff9b
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 0 deletions.
9 changes: 9 additions & 0 deletions config/roles.yml
Original file line number Diff line number Diff line change
Expand Up @@ -271,6 +271,15 @@ cross_cluster_search_remote_full_access:
- 'indices:admin/shards/search_shards'
- 'indices:data/read/search'

# Allow users to operate query assistant
ml_query_assistant_access:
reserved: true
cluster_permissions:
- 'cluster:admin/opensearch/ml/execute'
- 'cluster:admin/opensearch/ml/memory/conversation/create'
- 'cluster:admin/opensearch/ml/memory/interaction/create'
- 'cluster:admin/opensearch/ml/predict'

# Allow users to read ML stats/models/tasks
ml_read_access:
reserved: true
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -47,8 +47,10 @@ public class SecuritySettingsConfigurer {

static final List<String> REST_ENABLED_ROLES = List.of("all_access", "security_rest_api_access");
static final List<String> SYSTEM_INDICES = List.of(
".plugins-ml-agent",
".plugins-ml-config",
".plugins-ml-connector",
".plugins-ml-controller",
".plugins-ml-model-group",
".plugins-ml-model",
".plugins-ml-task",
Expand Down

0 comments on commit 633ff9b

Please sign in to comment.