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

For [Doc] Alerting plugin RBAC - backend roles usage #1866

Merged
merged 10 commits into from
Nov 15, 2022

Conversation

alicejw1
Copy link
Contributor

…site/issues/1810

Signed-off-by: alicejw alicejw@amazon.com

Description

How to use new RBAC role parameter to create a monitor and specify a role.

Issues Resolved

Alerting plugin RBAC

Checklist

  • [ x] 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.

Signed-off-by: alicejw <alicejw@amazon.com>
@alicejw1 alicejw1 added this to the v2.4 milestone Nov 14, 2022
@alicejw1 alicejw1 added the 2 - In progress Issue/PR: The issue or PR is in progress. label Nov 14, 2022
@alicejw1 alicejw1 self-assigned this Nov 14, 2022
Signed-off-by: alicejw <alicejw@amazon.com>
Signed-off-by: alicejw <alicejw@amazon.com>
@alicejw1 alicejw1 changed the title for doc issue https://github.com/opensearch-project/documentation-web… For [Doc] Alerting plugin RBAC - backend roles usage Nov 14, 2022
@alicejw1 alicejw1 marked this pull request as ready for review November 14, 2022 19:18
@alicejw1 alicejw1 requested a review from a team as a code owner November 14, 2022 19:18
@alicejw1 alicejw1 added 3 - Tech review PR: Tech review in progress and removed 2 - In progress Issue/PR: The issue or PR is in progress. labels Nov 14, 2022
Signed-off-by: alicejw <alicejw@amazon.com>
@alicejw1 alicejw1 linked an issue Nov 14, 2022 that may be closed by this pull request
4 tasks
_monitoring-plugins/alerting/api.md Outdated Show resolved Hide resolved
_monitoring-plugins/alerting/api.md Outdated Show resolved Hide resolved
_monitoring-plugins/alerting/security.md Outdated Show resolved Hide resolved
_monitoring-plugins/alerting/security.md Outdated Show resolved Hide resolved
_monitoring-plugins/alerting/security.md Outdated Show resolved Hide resolved
_security-plugin/access-control/api.md Outdated Show resolved Hide resolved
Signed-off-by: alicejw <alicejw@amazon.com>
…ckend roles section

Signed-off-by: alicejw <alicejw@amazon.com>
Signed-off-by: alicejw <alicejw@amazon.com>
@alicejw1
Copy link
Contributor Author

thanks @lezzago ! Would you please take another look to verify the changes are correct? best regards

_monitoring-plugins/alerting/api.md Show resolved Hide resolved
_monitoring-plugins/alerting/security.md Outdated Show resolved Hide resolved
Signed-off-by: alicejw <alicejw@amazon.com>
@alicejw1
Copy link
Contributor Author

Hi @lezzago , i've made the updates. Please take a look and verify. thanks

@alicejw1 alicejw1 added 4 - Doc review PR: Doc review in progress v2.4.0 'Issues and PRs related to version v2.4.0' and removed 3 - Tech review PR: Tech review in progress labels Nov 15, 2022
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 couple of short comments, otherwise LGTM.

}
```

To learn more about using backend roles to limit access, see [\(Advanced\) Limit access by backend role]({{site.url}}{{site.baseurl}}/monitoring-plugins/alerting/security/#advanced-limit-access-by-backend-role).
Copy link
Collaborator

Choose a reason for hiding this comment

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

Are the backslashes here intentional?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

i thought it wouldn't render the link properly with the title in parenthesis. but tested it without, and it's fine. thanks!


- For admin users, an empty list is considered the same as removing all permissions that the user possesses. If a non-admin user passes in an empty list, that will throw an exception, because that is not allowed by non-admin users.
- If the user tries to associate roles that they don't have permission to use, it will throw an exception.
{: .note }
Copy link
Collaborator

Choose a reason for hiding this comment

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

Does the above unordered list format correctly in your local jekyll build?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

yes. i used asterisks before, but got MDLint error: expected dashes.
the bullets render within the callout like this:
Screen Shot 2022-11-15 at 9 30 45 AM


#### Sample request

The following request creates a query-level monitor and provides two backend roles `role1` and `role2`. The section at the bottom of the request shows the line that specifies the roles with this syntax: `"rbac_roles": ["role1", "role2"]`.
Copy link
Contributor

Choose a reason for hiding this comment

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

"... and provides two backend roles, role1 and role2."
just a comma.


### Specify RBAC backend roles

You can specify RBAC backend roles when you create or update a monitor with the Alerting API.
Copy link
Contributor

Choose a reason for hiding this comment

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

might be worthwhile spelling out Rule Based Access Control here. I don't think it appears before this on the page.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

thanks. adding "role-based access control" with acronym in parentheses


User type | Role is specified by user or not (Y/N) | How to use the RBAC roles
:--- | :--- | :---
Admin user | Yes | Remove all the backend roles associate to the monitor and then use all the specified backend roles to associate to the monitor.
Copy link
Contributor

Choose a reason for hiding this comment

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

"Remove all the backend roles associated to the monitor ..."
"associated" correct?

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.

LGTM, with suggestions.

Signed-off-by: alicejw <alicejw@amazon.com>
@alicejw1 alicejw1 merged commit fce9256 into opensearch-project:main Nov 15, 2022
@alicejw1 alicejw1 removed the 4 - Doc review PR: Doc review in progress label Nov 15, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
v2.4.0 'Issues and PRs related to version v2.4.0'
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[DOC] Alerting plugin RBAC enhancement feature
4 participants