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

Adding explanation for editing permissions 20230825 #6606

Conversation

leanneeliatra
Copy link
Contributor

Description

A customer submitted a query in relation to this page of the documentation:
https://opensearch.org/docs/latest/security/access-control/document-level-security/

Customer query

This document did not provide information on how edit the document level permissions.

Fix

To add a section in to address how to edit the document level permissions.

Issues Resolved

This ticket addresses one part of #4314

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.

@leanneeliatra leanneeliatra changed the title adding explanation for editing permissions 20230825 Adding explanation for editing permissions 20230825 Mar 6, 2024
@Naarcha-AWS Naarcha-AWS self-assigned this Mar 6, 2024
@leanneeliatra
Copy link
Contributor Author

This PR is ready for review please.
I'm not sure about the review dog failure, to me it is as it should be. Please advise thank you cc @scrawfor99 @hdhalter

@Naarcha-AWS Naarcha-AWS added 4 - Doc review PR: Doc review in progress backport 2.12 PR: Backport label for 2.12 labels Mar 7, 2024
Copy link
Collaborator

@Naarcha-AWS Naarcha-AWS left a comment

Choose a reason for hiding this comment

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

I think we should change this to a step through to make it more readable. Also, we should decide whether the role changes occur in Dashboards on in the configuration level? Specifically, do we need to run securityadmin.sh in order to DLS role changes to occur?

_security/access-control/document-level-security.md Outdated Show resolved Hide resolved
_security/access-control/document-level-security.md Outdated Show resolved Hide resolved
_security/access-control/document-level-security.md Outdated Show resolved Hide resolved
_security/access-control/document-level-security.md Outdated Show resolved Hide resolved
_security/access-control/document-level-security.md Outdated Show resolved Hide resolved
_security/access-control/document-level-security.md Outdated Show resolved Hide resolved
_security/access-control/document-level-security.md Outdated Show resolved Hide resolved
Copy link
Collaborator

@Naarcha-AWS Naarcha-AWS left a comment

Choose a reason for hiding this comment

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

A few more suggestions and then we can pass this to editorial.

_security/access-control/document-level-security.md Outdated Show resolved Hide resolved
_security/access-control/document-level-security.md Outdated Show resolved Hide resolved
_security/access-control/document-level-security.md Outdated Show resolved Hide resolved
_security/access-control/document-level-security.md Outdated Show resolved Hide resolved
_security/access-control/document-level-security.md Outdated Show resolved Hide resolved
_security/access-control/users-roles.md Outdated Show resolved Hide resolved
_security/access-control/users-roles.md Outdated Show resolved Hide resolved
_security/access-control/users-roles.md Outdated Show resolved Hide resolved
_security/access-control/users-roles.md Outdated Show resolved Hide resolved
_security/access-control/users-roles.md Outdated Show resolved Hide resolved
@leanneeliatra
Copy link
Contributor Author

leanneeliatra commented Mar 22, 2024

A few more suggestions and then we can pass this to editorial.

Yes thanks a million for that in-depth review @Naarcha-AWS. Much appreciated. All comments have now been addressed.

@leanneeliatra
Copy link
Contributor Author

leanneeliatra commented Mar 26, 2024

This should be ready to merge, all comments addressed from my end. They just need to be accepted. Thank you. cc @Naarcha-AWS

@Naarcha-AWS Naarcha-AWS added 5 - Editorial review PR: Editorial review in progress and removed 4 - Doc review PR: Doc review in progress labels Mar 26, 2024
Copy link
Collaborator

@natebower natebower left a comment

Choose a reason for hiding this comment

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

@leanneeliatra @Naarcha-AWS Please see my comments and changes and let me know if you have any questions. I'd like to see the resolution to my comment on line 24 of the first file before approving. Thanks!

_security/access-control/document-level-security.md Outdated Show resolved Hide resolved

A typical request to the `_search` API includes `{ "query": { ... } }` around the query, but in this case, you only need to specify the query itself.
Document-level security lets you restrict a role to a subset of documents in an index.
For more information about users and roles in OpenSearch, see the [documentation](https://opensearch.org/docs/latest/security/access-control/users-roles/#create-roles).
Copy link
Collaborator

Choose a reason for hiding this comment

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

What documentation, specifically?

_security/access-control/document-level-security.md Outdated Show resolved Hide resolved
_security/access-control/document-level-security.md Outdated Show resolved Hide resolved
2. Choose **Security** > **Roles**
3. Select **Create Role** and provide a name for the role.
4. Review the **Index permissions** section and any necessary [index permissions](https://opensearch.org/docs/latest/security/access-control/permissions/) for the role.
5. Add document-level security with the addition of a DSL query inside the `Document level security - optional` section. A typical request to the `_search` API includes the `{ "query": { ... } }` around the query, but when Document-level security in OpenSearch Dashboards, you only need to specify the query itself. For example, the following DSL query specifies that for the new role to have access to a document, the query's `genres` field must include `Comedy`:
Copy link
Collaborator

Choose a reason for hiding this comment

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

Should DSL be defined on first appearance?

_security/access-control/users-roles.md Outdated Show resolved Hide resolved
_security/access-control/users-roles.md Outdated Show resolved Hide resolved
_security/access-control/users-roles.md Outdated Show resolved Hide resolved

1. Choose **Security** > **Roles**. Under the **Create role** section, select **Explore existing roles**.
1. Select the role you would like to edit.
1. Choose **edit role** on the upper right. Make any updates you need to the role.
Copy link
Collaborator

Choose a reason for hiding this comment

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

Clarify: "on the upper right of the screen"?

_security/access-control/users-roles.md Outdated Show resolved Hide resolved
Copy link
Collaborator

@natebower natebower left a comment

Choose a reason for hiding this comment

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

@Naarcha-AWS A couple final changes. Otherwise, LGTM!

_security/access-control/document-level-security.md Outdated Show resolved Hide resolved
@hdhalter hdhalter added 3 - Done Issue is done/complete and removed 5 - Editorial review PR: Editorial review in progress labels Mar 27, 2024
@Naarcha-AWS Naarcha-AWS merged commit 6f8261b into opensearch-project:main Mar 28, 2024
3 checks passed
opensearch-trigger-bot bot pushed a commit that referenced this pull request Mar 28, 2024
* adding explination for editing permissions

Signed-off-by: [email protected] <[email protected]>

* changed to a h3 to see if review dog will accept

Signed-off-by: [email protected] <[email protected]>

* Update _security/access-control/document-level-security.md

Co-authored-by: Naarcha-AWS <[email protected]>
Signed-off-by: leanneeliatra <[email protected]>

* Update _security/access-control/document-level-security.md

Co-authored-by: Naarcha-AWS <[email protected]>
Signed-off-by: leanneeliatra <[email protected]>

* Update _security/access-control/document-level-security.md

Co-authored-by: Naarcha-AWS <[email protected]>
Signed-off-by: leanneeliatra <[email protected]>

* Update _security/access-control/document-level-security.md

Co-authored-by: Naarcha-AWS <[email protected]>
Signed-off-by: leanneeliatra <[email protected]>

* Updates to both the users roles and DLS sections to reflect need to add edit DLS section

Signed-off-by: [email protected] <[email protected]>

* updating after reviewdog comments

Signed-off-by: [email protected] <[email protected]>

* updating roles in OpenSearch updates

Signed-off-by: [email protected] <[email protected]>

* Apply suggestions from code review

Updates following review

Co-authored-by: Naarcha-AWS <[email protected]>
Signed-off-by: leanneeliatra <[email protected]>

* Apply suggestions from code review

Signed-off-by: Naarcha-AWS <[email protected]>

* Apply suggestions from code review

Co-authored-by: Nathan Bower <[email protected]>
Signed-off-by: Naarcha-AWS <[email protected]>

* Update document-level-security.md

Signed-off-by: Naarcha-AWS <[email protected]>

* Update _security/access-control/document-level-security.md

Co-authored-by: Nathan Bower <[email protected]>
Signed-off-by: leanneeliatra <[email protected]>

---------

Signed-off-by: [email protected] <[email protected]>
Signed-off-by: leanneeliatra <[email protected]>
Signed-off-by: Naarcha-AWS <[email protected]>
Co-authored-by: Naarcha-AWS <[email protected]>
Co-authored-by: Nathan Bower <[email protected]>
(cherry picked from commit 6f8261b)
Signed-off-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
Naarcha-AWS added a commit that referenced this pull request Mar 28, 2024
* adding explination for editing permissions



* changed to a h3 to see if review dog will accept



* Update _security/access-control/document-level-security.md




* Update _security/access-control/document-level-security.md




* Update _security/access-control/document-level-security.md




* Update _security/access-control/document-level-security.md




* Updates to both the users roles and DLS sections to reflect need to add edit DLS section



* updating after reviewdog comments



* updating roles in OpenSearch updates



* Apply suggestions from code review

Updates following review




* Apply suggestions from code review



* Apply suggestions from code review




* Update document-level-security.md



* Update _security/access-control/document-level-security.md




---------






(cherry picked from commit 6f8261b)

Signed-off-by: [email protected] <[email protected]>
Signed-off-by: leanneeliatra <[email protected]>
Signed-off-by: Naarcha-AWS <[email protected]>
Signed-off-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
Co-authored-by: Naarcha-AWS <[email protected]>
Co-authored-by: Nathan Bower <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
3 - Done Issue is done/complete backport 2.12 PR: Backport label for 2.12 security
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants