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 can trip circuit breaker override #4697

Merged
merged 2 commits into from
Oct 4, 2024

Conversation

derek-ho
Copy link
Collaborator

@derek-ho derek-ho commented Sep 3, 2024

Description

Adds override that security APIs should not trip the circuit breaker

Issues Resolved

Fix: #4687
Is this a backport? If so, please add backport PR # and/or commits #, and remove backport-failed label from the original PR.
No

Do these changes introduce new permission(s) to be displayed in the static dropdown on the front-end? If so, please open a draft PR in the security dashboards plugin and link the draft PR here
No

Testing

None

Check List

  • New functionality includes testing
  • New functionality has been documented
  • New Roles/Permissions have a corresponding security dashboards plugin PR
  • API changes companion pull request created
  • 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.

Copy link

codecov bot commented Sep 3, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 67.94%. Comparing base (830b341) to head (c81ee08).
Report is 5 commits behind head on main.

Additional details and impacted files

Impacted file tree graph

@@            Coverage Diff             @@
##             main    #4697      +/-   ##
==========================================
- Coverage   67.98%   67.94%   -0.05%     
==========================================
  Files         310      310              
  Lines       20924    20927       +3     
  Branches     3318     3322       +4     
==========================================
- Hits        14225    14218       -7     
- Misses       4951     4958       +7     
- Partials     1748     1751       +3     
Files with missing lines Coverage Δ
...arch/security/dlic/rest/api/AbstractApiAction.java 83.39% <100.00%> (+0.06%) ⬆️

... and 3 files with indirect coverage changes

@cwperks
Copy link
Member

cwperks commented Oct 4, 2024

Thank you @derek-ho. This looks like an innocuous change that would enhance the security of a cluster. For instance, if a cluster has a single user eating up resources, this change will ensure that an admin can take actions to mitigate w/o running into the circuit breaker.

@derek-ho
Copy link
Collaborator Author

derek-ho commented Oct 4, 2024

Thank you @derek-ho. This looks like an innocuous change that would enhance the security of a cluster. For instance, if a cluster has a single user eating up resources, this change will ensure that an admin can take actions to mitigate w/o running into the circuit breaker.

Agree! Are there any APIs not covered by this that you think should also not trip the circuit breaker?

@cwperks
Copy link
Member

cwperks commented Oct 4, 2024

Agree! Are there any APIs not covered by this that you think should also not trip the circuit breaker?

No, I think this single change in the Abstract class covers the most important endpoints around internalusers, roles, roles mappings, etc.

@cwperks cwperks added the backport 2.x backport to 2.x branch label Oct 4, 2024
@derek-ho derek-ho self-assigned this Oct 4, 2024
@DarshitChanpura DarshitChanpura merged commit 49cdcb4 into opensearch-project:main Oct 4, 2024
41 of 43 checks passed
opensearch-trigger-bot bot pushed a commit that referenced this pull request Oct 4, 2024
Signed-off-by: Derek Ho <[email protected]>
(cherry picked from commit 49cdcb4)
Signed-off-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
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.

[BUG] Critical Security Admin APIs shouldn't trip memory circuit breakers
3 participants