# Indexing in Multi Tenancy

**URL:** <https://forum.opensearch.org/t/indexing-in-multi-tenancy/7743>\
**Category:** Security\
**Created:** [November 25, 2021, 1:28pm UTC](https://forum.opensearch.org/t/indexing-in-multi-tenancy/7743 "2021-11-25T13:28:07Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![mann](https://avatars.discourse-cdn.com/v4/letter/m/91b2a8/32.png) [@mann](https://forum.opensearch.org/u/mann)\
**Post date:** [November 25, 2021, 1:28pm UTC](https://forum.opensearch.org/t/indexing-in-multi-tenancy/7743/1 "2021-11-25T13:28:07Z")

</div>

How is indexing done in multiple tenants? So far what I observe is after creating a new tenant I don’t see any separate index which is created, which index stored all the data like roles, tenants, etc. information?. Is there any way to achieve a separate index for each tenant or not?

 ![image](https://us1.discourse-cdn.com/flex019/uploads/mauve_hedgehog/original/2X/0/0219fa1308286b0f7b244d23240031a14fc3efa0.png)

---

<div class="post-metadata">

**Author:** ![searchymcsearchface](https://sea1.discourse-cdn.com/flex019/user_avatar/forum.opensearch.org/searchymcsearchface/32/868_2.png) [@searchymcsearchface](https://forum.opensearch.org/u/searchymcsearchface)\
**Post date:** [November 25, 2021, 3:53pm UTC](https://forum.opensearch.org/t/indexing-in-multi-tenancy/7743/2 "2021-11-25T15:53:32Z")

</div>

[Moved to the security category]

---

<div class="post-metadata">

**Author:** ![pablo](https://sea1.discourse-cdn.com/flex019/user_avatar/forum.opensearch.org/pablo/32/10363_2.png) [@pablo](https://forum.opensearch.org/u/pablo)\
**Post date:** [November 25, 2021, 6:35pm UTC](https://forum.opensearch.org/t/indexing-in-multi-tenancy/7743/3 "2021-11-25T18:35:10Z")

</div>

@mann

Could you share your config.yaml and kibana.yaml files?

---

<div class="post-metadata">

**Author:** ![mann](https://avatars.discourse-cdn.com/v4/letter/m/91b2a8/32.png) [@mann](https://forum.opensearch.org/u/mann)\
**Post date:** [November 25, 2021, 6:59pm UTC](https://forum.opensearch.org/t/indexing-in-multi-tenancy/7743/4 "2021-11-25T18:59:15Z")

</div>

Sorry, but I didn’t see these files in my Opensearch and Opensearch-dashboard folder -

 ![image](https://us1.discourse-cdn.com/flex019/uploads/mauve_hedgehog/original/2X/d/d46090a436f174a1e3bd1f1c7e5382fa73937ab6.png)

Do you mean opensearch.yml and opensearch-dashboard.yml?

---

<div class="post-metadata">

**Author:** ![mann](https://avatars.discourse-cdn.com/v4/letter/m/91b2a8/32.png) [@mann](https://forum.opensearch.org/u/mann)\
**Post date:** [November 25, 2021, 7:07pm UTC](https://forum.opensearch.org/t/indexing-in-multi-tenancy/7743/5 "2021-11-25T19:07:46Z")

</div>

Attaching both these files for your reference -  
[https://drive.google.com/drive/folders/1LVtllmNVcfvqRUIfDNpbb5JZCWIDVsQ7?usp=sharing](https://drive.google.com/drive/folders/1LVtllmNVcfvqRUIfDNpbb5JZCWIDVsQ7?usp=sharing)

opensearch.yml -

```auto
network.host: 0.0.0.0
discovery.type: single-node
######## Start OpenSearch Security Demo Configuration ########
# WARNING: revise all the lines below before you go into production
plugins.security.ssl.transport.pemcert_filepath: esnode.pem
plugins.security.ssl.transport.pemkey_filepath: esnode-key.pem
plugins.security.ssl.transport.pemtrustedcas_filepath: root-ca.pem
plugins.security.ssl.transport.enforce_hostname_verification: false
plugins.security.ssl.http.enabled: true
plugins.security.ssl.http.pemcert_filepath: esnode.pem
plugins.security.ssl.http.pemkey_filepath: esnode-key.pem
plugins.security.ssl.http.pemtrustedcas_filepath: root-ca.pem
plugins.security.allow_unsafe_democertificates: true
plugins.security.allow_default_init_securityindex: true
plugins.security.authcz.admin_dn:
  - CN=kirk,OU=client,O=client,L=test, C=de

plugins.security.audit.type: internal_opensearch
plugins.security.enable_snapshot_restore_privilege: true
plugins.security.check_snapshot_restore_write_privileges: true
plugins.security.restapi.roles_enabled: ["all_access", "security_rest_api_access"]
plugins.security.system_indices.enabled: false
plugins.security.system_indices.indices: [".opendistro-alerting-config", ".opendistro-alerting-alert*", ".opendistro-anomaly-results*", ".opendistro-anomaly-detector*", ".opendistro-anomaly-checkpoints", ".opendistro-anomaly-detection-state", ".opendistro-reports-*", ".opendistro-notifications-*", ".opendistro-notebooks", ".opendistro-asynchronous-search-response*", ".replication-metadata-store"]
node.max_local_storage_nodes: 3
######## End OpenSearch Security Demo Configuration ########
compatibility.override_main_response_version: true

```

opensearch\_dashboard.yml

```auto
# Description:
# Default configuration for OpenSearch Dashboards
server.host: "10.0.14.174"
opensearch.hosts: ["https://localhost:9200"]
opensearch.ssl.verificationMode: none
opensearch.username: "kibanaserver"
opensearch.password: "kibanaserver"
opensearch.requestHeadersWhitelist: [authorization,securitytenant]

opensearch_security.multitenancy.enabled: true
opensearch_security.multitenancy.tenants.preferred: ["Private", "Global"]
opensearch_security.readonly_mode.roles: ["kibana_read_only"]
# Use this setting if you are running kibana without https
opensearch_security.cookie.secure: false

```

---

<div class="post-metadata">

**Author:** ![mann](https://avatars.discourse-cdn.com/v4/letter/m/91b2a8/32.png) [@mann](https://forum.opensearch.org/u/mann)\
**Post date:** [November 29, 2021, 5:49am UTC](https://forum.opensearch.org/t/indexing-in-multi-tenancy/7743/6 "2021-11-29T05:49:31Z")

</div>

@pablo @searchymcsearchface If you need more information then let me know I will provide those?
