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

Add workflow cluster permissions to alerting roles #2994

Merged
merged 2 commits into from
Jul 21, 2023

Conversation

eirsep
Copy link
Member

@eirsep eirsep commented Jul 12, 2023

Description

Adds cluster permissions for alerting workflows to alerting roles

alerting_read_access role is mapped additionally to
'cluster:admin/opensearch/alerting/workflow/get' and cluster:admin/opensearch/alerting/workflow_alerts/get'

alerting_ack_alerts is mapped to 'cluster:admin/opendistro/alerting/workflow_alerts/*` and 'cluster:admin/opendistro/alerting/chained_alerts/*'

These roles are merged in https://github.com/opensearch-project/common-utils/blob/main/src/main/kotlin/org/opensearch/commons/alerting/action/AlertingActions.kt#L9-L20

Issues Resolved

[List any issues this PR will resolve]

Is this a backport? If so, please add backport PR # and/or commits #

Testing

[Please provide details of testing done: unit testing, integration testing and manual testing]

Check List

  • New functionality includes testing
  • New functionality has been documented
  • Commits are signed per the DCO using --signoff

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

@codecov
Copy link

codecov bot commented Jul 12, 2023

Codecov Report

Merging #2994 (8053387) into main (ab6778d) will decrease coverage by 0.17%.
The diff coverage is n/a.

@@             Coverage Diff              @@
##               main    #2994      +/-   ##
============================================
- Coverage     62.49%   62.32%   -0.17%     
+ Complexity     3378     3369       -9     
============================================
  Files           267      267              
  Lines         19774    19774              
  Branches       3355     3355              
============================================
- Hits          12357    12325      -32     
- Misses         5776     5806      +30     
- Partials       1641     1643       +2     

see 8 files with indirect coverage changes

cwperks
cwperks previously approved these changes Jul 12, 2023
config/roles.yml Show resolved Hide resolved
@cwperks
Copy link
Member

cwperks commented Jul 17, 2023

@eirsep Can you please re-base this PR with main?

This PR was included directly into 2.9 in this PR, but still needs to be merged into main and 2.x

@cwperks
Copy link
Member

cwperks commented Jul 20, 2023

@eirsep Checking in, can you rebase this branch with main?

This PR was included directly into 2.9 in this #2996, but still needs to be merged into main and 2.x

@cwperks cwperks added the backport 2.x backport to 2.x branch label Jul 21, 2023
@cwperks cwperks merged commit 59e2657 into opensearch-project:main Jul 21, 2023
opensearch-trigger-bot bot pushed a commit that referenced this pull request Jul 21, 2023
* add workflow cluster permissions to alerting roles

Signed-off-by: Surya Sashank Nistala <[email protected]>

* fix ordering of new cluster permissions in roles.yml
Signed-off-by: Surya Sashank Nistala <[email protected]>

---------

Signed-off-by: Surya Sashank Nistala <[email protected]>
(cherry picked from commit 59e2657)
cwperks added a commit that referenced this pull request Aug 1, 2023
)

Backport 59e2657 from #2994

Co-authored-by: Surya Sashank Nistala <[email protected]>
Co-authored-by: Craig Perkins <[email protected]>
@peternied peternied changed the title add workflow cluster permissions to alerting roles Add workflow cluster permissions to alerting roles Aug 31, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backport 2.x backport to 2.x branch
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants