OpenSearch Dashboards multi-tenancy

  • Private - This tenant is exclusive to each user and can’t be shared. You can’t use it to access routes or index patterns made by the user’s global tenant.
  • Global - This tenant is shared between every OpenSearch Dashboards user.

The global tenant is not a primary tenant such that any action done within the global tenant is not replicated to a user’s private tenant. If you make a change to your global tenant, you won’t see that change reflected in your private tenant. Some example changes include, but are not limited to:

  • Change advanced settings
  • Create index patterns

You might use the private tenant for exploratory work, create detailed visualizations with your team in an tenant, and maintain a summary dashboard for corporate leadership in an executive tenant.

If you share a visualization or dashboard with someone, you can see that the URL includes the tenant:

  1. config:
  2. dynamic:
  3. opensearch-dashboards:
  4. multitenancy_enabled: true
  5. server_username: opensearch
  6. index: '.kibana'
  7. do_not_fail_on_forbidden: false

opensearch_dashboards.yml has some additional settings:

SettingDescription
opensearch.requestHeadersAllowlistOpenSearch Dashboards requires that you add all HTTP headers to the allow list so that the headers pass to OpenSearch. Multi-tenancy uses a specific header, securitytenant, that must be present with the standard Authorization header. If the securitytenant header is not on the allow list, OpenSearch Dashboards starts with a red status.
opensearch_security.multitenancy.enabledEnables or disables multi-tenancy in OpenSearch Dashboards. Default is true.
opensearch_security.multitenancy.tenants.enable_globalEnables or disables the global tenant. Default is true.
opensearch_security.multitenancy.tenants.enable_privateEnables or disables the private tenant. Default is true.
opensearch_security.multitenancy.tenants.preferredLets you change ordering in the Tenants tab of OpenSearch Dashboards. By default, the list starts with global and private (if enabled) and then proceeds alphabetically. You can add tenants here to move them to the top of the list.
opensearch_security.multitenancy.enable_filterIf you have many tenants, you can add a search bar to the top of the list. Default is false.

To create tenants, use OpenSearch Dashboards, the REST API, or tenants.yml.

OpenSearch Dashboards

  1. Open OpenSearch Dashboards.
  2. Choose Security, Tenants, and Create tenant.
  3. Give the tenant a name and description.
  4. Choose Create.

REST API

See .

tenants.yml

  1. ---
  2. type: "tenants"
  3. config_version: 2
  4. ## Demo tenants
  5. admin_tenant:
  6. reserved: false
  7. description: "Demo tenant for admin user"
  • Read-write (kibana_all_write) permissions let the role view and modify objects in the tenant.
  • Read-only (kibana_all_read) permissions let the role view objects, but not modify them.

OpenSearch Dashboards

  1. Open OpenSearch Dashboards.
  2. Choose Security, Roles, and a role.
  3. For Tenant permissions, add tenants, press Enter, and give the role read and/or write permissions to it.

REST API

See .

roles.yml

The open source version of OpenSearch Dashboards saves all objects to a single index: .kibana. The security plugin uses this index for the global tenant, but separate indices for every other tenant. Each user also has a private tenant, so you might see a large number of indices that follow two patterns:

  1. .kibana_<hash>_<tenant_name>

The security plugin scrubs these index names of special characters, so they might not be a perfect match of tenant names and usernames.