I’m trying to create a Workspace using the API but keep getting the following error:
OpenSearch Dashboards API POST /api/workspaces returned success=false. Details: no permissions for [indices:data/read/search] and User [name=dip-controlplane, backend_roles=[controlplane_role[], requestedTenant=null]: security_exception: [security_exception[] Reason: no permissions for [indices:data/read/search] and User [name=dip-controlplane, backend_roles=[controlplane_role], requestedTenant=null]
This is my current configuration for the controlplane_role backend_role:
controlplane_role:
reserved: true
description: "DIP controlplane service role"
cluster_permissions:
- "cluster:monitor/main"
- "restapi:admin/roles"
- "restapi:admin/rolesmapping"
index_permissions:
- index_patterns:
- "ss4o_logs-*"
- "dip-logs-*"
allowed_actions:
- "manage_aliases"
- "indices:admin/aliases/get"
- index_patterns:
- ".kibana*"
- ".opensearch_dashboards*"
- ".opensearch-dashboards*"
- ".plugins-workspace*"
- ".plugins-ml-config"
- ".ql-datasources*"
- ".opensearch-observability*"
allowed_actions:
# Workspace management is implemented through Dashboards saved objects and
# related system indices. Use full index access on this narrow set of
# Dashboards-owned indices to avoid brittle per-action gaps.
- "*"
- "system:admin/system_index"
- index_patterns:
- "*"
allowed_actions:
- "indices:data/read/search"
- "indices:admin/mappings/get"
@Ploef Thank you for sharing your opensearch.yml file.
The issue was caused by a missing tenant permission. This root cause isn’t reported in the OpenSearch logs properly.
I’ve found two solutions/workarounds
Add kibanauser backend role to your test user. This backend role already has built-in access to the Global tenant.
Alternatively, add Global tenant permission to your custom role.