Skip to content
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

Conversation

DarshitChanpura
Copy link
Member

Checklist

  • By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license and subject to the Developers Certificate of Origin.
    For more information on following Developer Certificate of Origin and signing off your commits, please check here.

Copy link
Contributor

@cwillum cwillum left a 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:
Copy link
Contributor

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"?

Copy link
Member Author

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
Copy link
Contributor

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.
Copy link
Contributor

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.

Suggested change
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:

Copy link
Member Author

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.


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.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
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.

Copy link
Member Author

@DarshitChanpura DarshitChanpura Aug 31, 2023

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.'


```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.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
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
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
## System Index permissions
## System index permissions

@DarshitChanpura
Copy link
Member Author

@cwillum Addressed all the comments. please have another lookeru.

Signed-off-by: Darshit Chanpura <[email protected]>
Copy link
Contributor

@cwillum cwillum left a 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.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
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.

Copy link
Member Author

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]>
@cwillum cwillum merged commit ec6972d into opensearch-project:fix#4736-permissionable-sys-indexes Aug 31, 2023
cwillum added a commit that referenced this pull request Sep 11, 2023
…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]>
harshavamsi pushed a commit to harshavamsi/documentation-website that referenced this pull request Oct 31, 2023
…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]>
vagimeli pushed a commit that referenced this pull request Dec 21, 2023
…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]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants