-
Notifications
You must be signed in to change notification settings - Fork 205
[FEATURE] Use index templates for tenant_template #1222
Copy link
Copy link
Closed
Labels
Description
Is your feature request related to a problem?
security-dashboards-plugin/server/multitenancy/tenant_index.ts
Lines 41 to 62 in 3abb707
| await esClient.indices.putTemplate({ | |
| name: 'tenant_template', | |
| body: { | |
| index_patterns: [ | |
| opensearchDashboardsIndex + '_-*_*', | |
| opensearchDashboardsIndex + '_0*_*', | |
| opensearchDashboardsIndex + '_1*_*', | |
| opensearchDashboardsIndex + '_2*_*', | |
| opensearchDashboardsIndex + '_3*_*', | |
| opensearchDashboardsIndex + '_4*_*', | |
| opensearchDashboardsIndex + '_5*_*', | |
| opensearchDashboardsIndex + '_6*_*', | |
| opensearchDashboardsIndex + '_7*_*', | |
| opensearchDashboardsIndex + '_8*_*', | |
| opensearchDashboardsIndex + '_9*_*', | |
| ], | |
| settings: { | |
| number_of_shards: 1, | |
| }, | |
| mappings, | |
| }, | |
| }); |
Since the legacy template currently being used can be overridden by index templates, it would be better to have tenant_template created as an index template and with the highest possible priority to protect all .kibana* system indices from being corrupted simply because their mapping was overridden by some overzealous index template.
What solution would you like?
Use client.indices.putIndexTemplate and set priority to perhaps 263-1.
What alternatives have you considered?
None
Do you have any additional context?
No
Reactions are currently unavailable