-
Notifications
You must be signed in to change notification settings - Fork 337
Description
Is your feature request related to a problem?
New reserved roles are often added between releases when a new plug-in is released and associated roles are created to provision access to features of the new plugin. Reserved roles are added to the security repo roles.yml like is done in this PR: #2192 which introduces 3 new reserved roles between 2.3.0 and 2.4.0.
When starting up a cluster with the upgraded version of OpenSearch I receive the following line:
Index .opendistro_security already contains doc with id roles, skipping update
indicating that the new reserved roles in roles.yml will need to be manually added either via the API by an admin or via securityadmin tool connecting via clientcert as a super admin.
This becomes additionally complicated when users of OpenSearch add custom roles or modify the security index in any way via the OSD UI or API as it is destructive to run securityadmin.sh because it can delete custom configuration. In order to get around this I have:
- Ran a backup of the security index using security admin: https://opensearch.org/docs/latest/security-plugin/configuration/security-admin/#a-word-of-caution
- Reconcile the exported
roles.ymlwith new reserved roles in the repo'sroles.yml: https://github.com/opensearch-project/security/blob/main/config/roles.yml - Run securityadmin.sh with the coalesced exported
roles.ymlwith custom roles and the repo'sroles.ymlof the corresponding version of opensearch
This is not an idea process and there can be a better solution to source new reserved roles during an upgrade