OCI Search with OpenSearch supports the multi-tenancy
OpenSearch feature. Tenants are spaces to save index patterns, visualizations, and other
OpenSearch Dashboards objects, which enables you to share them with other OpenSearch
Dashboards users.
The following tenants are available by default:
Private: Specific to the user, and can't be shared.
Global: Shared with all OpenSearch Dashboard users, however the user's role must be
granted access to the global tenant.
You can also create additional tenants, and grant roles read or read/write access to those
tenants.
To use the multi-tenancy feature in Search with OpenSearch, the security mode for the cluster
must be set to enforcing. For more information about how to check this setting, and update if
necessary, see Verify Security Mode and Updating Cluster Security Mode to Enforcing.
Multi-tenancy should be enabled by default for new clusters. You can check if multi-tenancy
is enabled for your cluster by making a get request with the Configuration API:
Copy
GET _plugins/_security/api/securityconfig
The following response example shows the relevant part of the response for determining if
the multi-tenancy feature is enabled, specifically the multitenancy_enabled
attribute in the kibana element.
If you need to enable multi-tenancy, use a put request with the Configuration API to update
the setting, as shown in the following example:
Copy
PUT _plugins/_security/api/securityconfig/config
{
"dynamic": {
"security_mode": "ENFORCING",
"kibana": {
"multitenancy_enabled": true,
"server_username": "kibanaserver",
"index": ".kibana_1"
},
<additional securityconfig details for PUT request>...
Using Multi-Tenancy in Search with OpenSearch 🔗
After you've confirmed that the multi-tenancy feature is enabled for your cluster, you
can do the following:
Create a tenant. You must have admin permissions
to create a new tenant.
Give roles access to tenants. In addition to doing
this for any custom tenants you create, you also need to do this for the global tenant.
You can grant roles read access or read/write access to tenants.
Switching Tenants 🔗
To switch tenants when you're logged into OpenSearch Dashboards:
Click the icon for your account in the top menu.
Click Switch tenants. If you can't select the tenant you want to access, check
that your user account is assigned to a role that has permissions to that tenant.