-
Notifications
You must be signed in to change notification settings - Fork 509
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fixes some wordings around system index permission access and usage #4948
Fixes some wordings around system index permission access and usage #4948
Conversation
Signed-off-by: Darshit Chanpura <[email protected]>
3e67cfc
to
fe43d4e
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@DarshitChanpura Thanks for the thorough review. I now see the configuration is a little different than I'd understood it before. So I've made some suggestions.
|
||
```yml | ||
alerting-maint-role: | ||
alerting-main-role: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The fictional name was meant to be an abbreviation for "alerting-maintenance-role". But that's fine. Why not call it simply "alerting-role"?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
even better. my understanding was it might have been a typo.
@@ -65,14 +65,16 @@ Rather than individual permissions, you can often achieve your desired security | |||
{: .tip } | |||
|
|||
|
|||
## System permissions | |||
## System Index permissions |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good call on renaming this.
|
||
System permissions are specified under `index_permissions` in the `roles.yml` configuration file (See [roles.yml]({{site.url}}{{site.baseurl}}/security/configuration/yaml/#rolesyml).) However, they begin with the prefix `.opendistro` to make them distinguishable from index permissions. For example, the system permission `.opendistro-alerting-config` gives a user permission to modify the system index that stores configurations for the Alerting plugin. The following example shows this system permission specified in a role called `alerting-maint-role`: | ||
System index permissions are specified under `index_permissions` in the `roles.yml` configuration file (See [roles.yml]({{site.url}}{{site.baseurl}}/security/configuration/yaml/#rolesyml).) and can be granted permission to as any regular index by specifying the action `system:admin/system_index` under `allowed_actions`. Here is an example, the `.opendistro-alerting-config` system index stores configurations for the Alerting plugin. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is a new consideration that I hadn't covered before. So I've rewritten this section.
System index permissions are specified under `index_permissions` in the `roles.yml` configuration file (See [roles.yml]({{site.url}}{{site.baseurl}}/security/configuration/yaml/#rolesyml).) and can be granted permission to as any regular index by specifying the action `system:admin/system_index` under `allowed_actions`. Here is an example, the `.opendistro-alerting-config` system index stores configurations for the Alerting plugin. | |
System index permissions are specified under `index_permissions` in the `roles.yml` configuration file (See [roles.yml]({{site.url}}{{site.baseurl}}/security/configuration/yaml/#rolesyml).) along with standard index permissions. They are, however, distinguished from standard index permissions in two ways. A system index permission name begins with the prefix `.opendistro`, and it is defined under `allowed_actions` as `system:admin/system_index`. | |
For example, the system index permission that gives a user permission to modify the system index that stores configurations for the Alerting plugin is defined by the index pattern `.opendistro-alerting-config` and its allowed action is defined as `system:admin/system_index`. The following role shows how this system index permission is configured along with other attributes: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't think the system index permissions always begin with .opendistro
, i know they begin with .
but that is more of a convention than a constraint.
_security/configuration/yaml.md
Outdated
|
||
When set to `true`, the feature is enabled and administrators can add the `system:admin/<system_index_name>` permission for a user. | ||
When set to `true`, the feature is enabled and users with access to modify roles can add the `system:admin/system_index` as an allowed action and an index pattern in the roles that will be used for system index access. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
When set to `true`, the feature is enabled and users with access to modify roles can add the `system:admin/system_index` as an allowed action and an index pattern in the roles that will be used for system index access. | |
When set to `true`, the feature is enabled and users with access to modify roles can add an index pattern and action for a system index permission to a role. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
made a slight tweak here. '... and the allowed action system:admin/system_index
to a role.'
_security/configuration/yaml.md
Outdated
|
||
```yml | ||
plugins.security.system_indices.additional_control.enabled: true | ||
``` | ||
When set to `false`, the permission is disabled and only admins with an admin certificate can make changes to system indexes. By default, the setting is `false` for a new cluster. | ||
|
||
To learn more about system permissions, see [System permissions]({{site.url}}{{site.baseurl}}/security/access-control/permissions/#system-permissions) in Permissions documentation. | ||
To learn more about system index permissions, see [System Index permissions]({{site.url}}{{site.baseurl}}/security/access-control/permissions/#system-index-permissions) in Permissions documentation. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
To learn more about system index permissions, see [System Index permissions]({{site.url}}{{site.baseurl}}/security/access-control/permissions/#system-index-permissions) in Permissions documentation. | |
To learn more about system index permissions, see [System index permissions]({{site.url}}{{site.baseurl}}/security/access-control/permissions/#system-index-permissions) in Permissions documentation. |
@@ -65,14 +65,16 @@ Rather than individual permissions, you can often achieve your desired security | |||
{: .tip } | |||
|
|||
|
|||
## System permissions | |||
## System Index permissions |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
## System Index permissions | |
## System index permissions |
@cwillum Addressed all the comments. please have another lookeru. |
Signed-off-by: Darshit Chanpura <[email protected]>
a6ed351
to
7f4566b
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just one last suggestion.
|
||
System permissions are specified under `index_permissions` in the `roles.yml` configuration file (See [roles.yml]({{site.url}}{{site.baseurl}}/security/configuration/yaml/#rolesyml).) However, they begin with the prefix `.opendistro` to make them distinguishable from index permissions. For example, the system permission `.opendistro-alerting-config` gives a user permission to modify the system index that stores configurations for the Alerting plugin. The following example shows this system permission specified in a role called `alerting-maint-role`: | ||
Along with standard index permissions, system index permissions are specified in the 'roles.yml' configuration file under 'index_permissions' (See [roles.yml](site.urlsite.baseurl/security/configuration/yaml/#rolesyml). The user gains access to the system index by specifying `system:admin/system_index` in the role's `allowed_actions` section. With the addition of this action, all system indices covered by patterns defined in `index_patterns` are now accessible to this role. The `*` pattern, on the other hand by itself, is an exception that cannot be used to grant access to all system indices at once. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Along with standard index permissions, system index permissions are specified in the 'roles.yml' configuration file under 'index_permissions' (See [roles.yml](site.urlsite.baseurl/security/configuration/yaml/#rolesyml). The user gains access to the system index by specifying `system:admin/system_index` in the role's `allowed_actions` section. With the addition of this action, all system indices covered by patterns defined in `index_patterns` are now accessible to this role. The `*` pattern, on the other hand by itself, is an exception that cannot be used to grant access to all system indices at once. | |
Along with standard index permissions, you specify system index permissions in the 'roles.yml' configuration file under 'index_permissions' (See [roles.yml](site.urlsite.baseurl/security/configuration/yaml/#rolesyml). You do this by specifying `system:admin/system_index` in the role's `allowed_actions` section and adding the system index in the `index_patterns` section. |
"The *
pattern, on the other hand by itself, is an exception that cannot be used to grant access to all system indices at once." is already stated below this in the "following considerations" bullet points. Let's say this here or there, but not both places.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
aah, good catch, i will use your suggestion here.
Signed-off-by: Darshit Chanpura <[email protected]>
c15d8f1
to
ef577c3
Compare
ec6972d
into
opensearch-project:fix#4736-permissionable-sys-indexes
…xes (#4849) * fix#4736 system index permission Signed-off-by: cwillum <[email protected]> * fix#4736 system index permission Signed-off-by: cwillum <[email protected]> * fix#4736 system index permission Signed-off-by: cwillum <[email protected]> * fix#4736 system index permission Signed-off-by: cwillum <[email protected]> * fix#4736 system index permission Signed-off-by: cwillum <[email protected]> * fix#4736 system index permission Signed-off-by: cwillum <[email protected]> * fix#4736 system index permission Signed-off-by: cwillum <[email protected]> * fix#4736 system index permission Signed-off-by: cwillum <[email protected]> * fix#4736 system index permission Signed-off-by: cwillum <[email protected]> * fix#4736 system index permission Signed-off-by: cwillum <[email protected]> * fix#4736 system index permission Signed-off-by: cwillum <[email protected]> * Fixes some wordings around system index permission access and usage (#4948) * Fixes some wordings around system index permission access and usage Signed-off-by: Darshit Chanpura <[email protected]> * Addresses PR feedback Signed-off-by: Darshit Chanpura <[email protected]> * Addresses more PR feedback Signed-off-by: Darshit Chanpura <[email protected]> --------- Signed-off-by: Darshit Chanpura <[email protected]> * fix#4736 system index permission Signed-off-by: cwillum <[email protected]> * fix#4736 system index permission Signed-off-by: cwillum <[email protected]> * Changes the feature flag key and updates some text (#4953) * Changes the feature flag key and updates description of a consideration Signed-off-by: Darshit Chanpura <[email protected]> * Addresses source PR feedback Signed-off-by: Darshit Chanpura <[email protected]> --------- Signed-off-by: Darshit Chanpura <[email protected]> * fix#4736 system index permission Signed-off-by: cwillum <[email protected]> * fix#4736 system index permission Signed-off-by: cwillum <[email protected]> * fix#4736 system index permission Signed-off-by: cwillum <[email protected]> * fix#4736 system index permission Signed-off-by: cwillum <[email protected]> * fix#4736 system index permission Signed-off-by: cwillum <[email protected]> * fix#4736 system index permission Signed-off-by: cwillum <[email protected]> * fix#4736 system index permission Signed-off-by: cwillum <[email protected]> * fix#4736 system index permission Signed-off-by: cwillum <[email protected]> * fix#4736 system index permission Signed-off-by: cwillum <[email protected]> --------- Signed-off-by: cwillum <[email protected]> Signed-off-by: Darshit Chanpura <[email protected]> Co-authored-by: Darshit Chanpura <[email protected]>
…xes (opensearch-project#4849) * fix#4736 system index permission Signed-off-by: cwillum <[email protected]> * fix#4736 system index permission Signed-off-by: cwillum <[email protected]> * fix#4736 system index permission Signed-off-by: cwillum <[email protected]> * fix#4736 system index permission Signed-off-by: cwillum <[email protected]> * fix#4736 system index permission Signed-off-by: cwillum <[email protected]> * fix#4736 system index permission Signed-off-by: cwillum <[email protected]> * fix#4736 system index permission Signed-off-by: cwillum <[email protected]> * fix#4736 system index permission Signed-off-by: cwillum <[email protected]> * fix#4736 system index permission Signed-off-by: cwillum <[email protected]> * fix#4736 system index permission Signed-off-by: cwillum <[email protected]> * fix#4736 system index permission Signed-off-by: cwillum <[email protected]> * Fixes some wordings around system index permission access and usage (opensearch-project#4948) * Fixes some wordings around system index permission access and usage Signed-off-by: Darshit Chanpura <[email protected]> * Addresses PR feedback Signed-off-by: Darshit Chanpura <[email protected]> * Addresses more PR feedback Signed-off-by: Darshit Chanpura <[email protected]> --------- Signed-off-by: Darshit Chanpura <[email protected]> * fix#4736 system index permission Signed-off-by: cwillum <[email protected]> * fix#4736 system index permission Signed-off-by: cwillum <[email protected]> * Changes the feature flag key and updates some text (opensearch-project#4953) * Changes the feature flag key and updates description of a consideration Signed-off-by: Darshit Chanpura <[email protected]> * Addresses source PR feedback Signed-off-by: Darshit Chanpura <[email protected]> --------- Signed-off-by: Darshit Chanpura <[email protected]> * fix#4736 system index permission Signed-off-by: cwillum <[email protected]> * fix#4736 system index permission Signed-off-by: cwillum <[email protected]> * fix#4736 system index permission Signed-off-by: cwillum <[email protected]> * fix#4736 system index permission Signed-off-by: cwillum <[email protected]> * fix#4736 system index permission Signed-off-by: cwillum <[email protected]> * fix#4736 system index permission Signed-off-by: cwillum <[email protected]> * fix#4736 system index permission Signed-off-by: cwillum <[email protected]> * fix#4736 system index permission Signed-off-by: cwillum <[email protected]> * fix#4736 system index permission Signed-off-by: cwillum <[email protected]> --------- Signed-off-by: cwillum <[email protected]> Signed-off-by: Darshit Chanpura <[email protected]> Co-authored-by: Darshit Chanpura <[email protected]>
…xes (#4849) * fix#4736 system index permission Signed-off-by: cwillum <[email protected]> * fix#4736 system index permission Signed-off-by: cwillum <[email protected]> * fix#4736 system index permission Signed-off-by: cwillum <[email protected]> * fix#4736 system index permission Signed-off-by: cwillum <[email protected]> * fix#4736 system index permission Signed-off-by: cwillum <[email protected]> * fix#4736 system index permission Signed-off-by: cwillum <[email protected]> * fix#4736 system index permission Signed-off-by: cwillum <[email protected]> * fix#4736 system index permission Signed-off-by: cwillum <[email protected]> * fix#4736 system index permission Signed-off-by: cwillum <[email protected]> * fix#4736 system index permission Signed-off-by: cwillum <[email protected]> * fix#4736 system index permission Signed-off-by: cwillum <[email protected]> * Fixes some wordings around system index permission access and usage (#4948) * Fixes some wordings around system index permission access and usage Signed-off-by: Darshit Chanpura <[email protected]> * Addresses PR feedback Signed-off-by: Darshit Chanpura <[email protected]> * Addresses more PR feedback Signed-off-by: Darshit Chanpura <[email protected]> --------- Signed-off-by: Darshit Chanpura <[email protected]> * fix#4736 system index permission Signed-off-by: cwillum <[email protected]> * fix#4736 system index permission Signed-off-by: cwillum <[email protected]> * Changes the feature flag key and updates some text (#4953) * Changes the feature flag key and updates description of a consideration Signed-off-by: Darshit Chanpura <[email protected]> * Addresses source PR feedback Signed-off-by: Darshit Chanpura <[email protected]> --------- Signed-off-by: Darshit Chanpura <[email protected]> * fix#4736 system index permission Signed-off-by: cwillum <[email protected]> * fix#4736 system index permission Signed-off-by: cwillum <[email protected]> * fix#4736 system index permission Signed-off-by: cwillum <[email protected]> * fix#4736 system index permission Signed-off-by: cwillum <[email protected]> * fix#4736 system index permission Signed-off-by: cwillum <[email protected]> * fix#4736 system index permission Signed-off-by: cwillum <[email protected]> * fix#4736 system index permission Signed-off-by: cwillum <[email protected]> * fix#4736 system index permission Signed-off-by: cwillum <[email protected]> * fix#4736 system index permission Signed-off-by: cwillum <[email protected]> --------- Signed-off-by: cwillum <[email protected]> Signed-off-by: Darshit Chanpura <[email protected]> Co-authored-by: Darshit Chanpura <[email protected]>
Checklist
For more information on following Developer Certificate of Origin and signing off your commits, please check here.