Versions (relevant - OpenSearch/Dashboard/Server OS/Browser): 2.17.1
Describe the issue:
I would like to use OpenSearch for a multitenant solution. However, I have such a requirement (compliance) that indexes dedicated to a given tenant are stored in a different location than indexes of another tenant. The reason is that it is possible to encrypt data for a given tenant with a different encryption key than data for another tenant.
However, I cannot find an option when creating an index that is responsible for the location of data storage for this index.
I would like to ask whether it is possible to control the location of data storage for an index in OpenSearch at all?
If not, what is the best way to handle such a requirement?
Check step 6 here Creating a cluster - OpenSearch Documentation
Basically you assign attributes to a node, then in the index templates you set
PUT newindex
{
"settings": {
"index.routing.allocation.require.zone": "X"
}
}
I’ve done something similar to move all indices off of a node for maintenance in the past but ymmv.
Thank you for your answer.
Unfortunately, at the node level I am not able to define an independent location for ZoneA and ZoneB.
I would have to have a dedicated OpenSearch node for a given ZoneA, i.e. tenant A, and an independent one for a given ZoneB, i.e. tenant B. If I wanted to have data replication, then two nodes for the tenant.
If I wanted to service many such tenants (dozens), it becomes problematic in terms of resources.
But this means that there is no way around it, unfortunately.