Skip to content

Add cat shard api permission #2217

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

Merged
merged 2 commits into from
Apr 24, 2025

Conversation

SwethaGuptha
Copy link
Contributor

Description

With introduction of CatShardsAction, the _cat/shard call requires extra cluster permission cluster:monitor/shards for a non-admin user to call the API which was not required for versions prior to 2.17.
Adding the new action to list of cluster permission that can be granted to a user.

Category

Bug fix

Why these changes are required?

Add granular cluster:monitor/shards permission to list of cluster permission that can be granted to a user via opensearch dashboard.

What is the old behavior before changes and new behavior after changes?

None. A wildcard permission cluster:monitor/* could be given to non-admin user to access _cat/shards API.

Issues Resolved

N/A

Testing

N/A

Check List

  • [N/A ] New functionality includes testing
  • [N/A] 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.

Signed-off-by: Swetha Guptha <[email protected]>
Copy link

codecov bot commented Apr 24, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 71.92%. Comparing base (d17ac9e) to head (1d2e140).
Report is 1 commits behind head on main.

Additional details and impacted files
@@           Coverage Diff           @@
##             main    #2217   +/-   ##
=======================================
  Coverage   71.92%   71.92%           
=======================================
  Files          97       97           
  Lines        2682     2682           
  Branches      418      410    -8     
=======================================
  Hits         1929     1929           
  Misses        638      638           
  Partials      115      115           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@cwperks cwperks merged commit f0baa61 into opensearch-project:main Apr 24, 2025
19 checks passed
opensearch-trigger-bot bot pushed a commit that referenced this pull request Apr 24, 2025
Signed-off-by: Swetha Guptha <[email protected]>
Co-authored-by: Swetha Guptha <[email protected]>
Co-authored-by: Derek Ho <[email protected]>
(cherry picked from commit f0baa61)
Signed-off-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
cwperks pushed a commit that referenced this pull request Apr 25, 2025
(cherry picked from commit f0baa61)

Signed-off-by: Swetha Guptha <[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: Swetha Guptha <[email protected]>
Co-authored-by: Derek Ho <[email protected]>
peterzhuamazon pushed a commit that referenced this pull request Apr 29, 2025
* Changes to remove tenant panels from roles pages when multitenancy is disabled (#2215) (#2218)

* Changes to remove tenant panels from roles pages when multitenancy is disabled



* Modified test files as per comments on PR



---------


(cherry picked from commit e7ffb2e)

Signed-off-by: nishthm <[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>

* Explicitly cd to security-dashboards-plugin directory before running cypress tests (#2216) (#2222)

(cherry picked from commit d17ac9e)

Signed-off-by: Craig Perkins <[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>

* Add cat shard api permission (#2217) (#2223)

(cherry picked from commit f0baa61)

Signed-off-by: Swetha Guptha <[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: Swetha Guptha <[email protected]>
Co-authored-by: Derek Ho <[email protected]>

* Increment version to 3.0.0.0 (#2226)

Signed-off-by: opensearch-ci-bot <[email protected]>
Co-authored-by: opensearch-ci-bot <[email protected]>

* Removes beta1 qualifier from security-dashboards-plugin

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

---------

Signed-off-by: nishthm <[email protected]>
Signed-off-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
Signed-off-by: Craig Perkins <[email protected]>
Signed-off-by: Swetha Guptha <[email protected]>
Signed-off-by: opensearch-ci-bot <[email protected]>
Signed-off-by: Darshit Chanpura <[email protected]>
Co-authored-by: opensearch-trigger-bot[bot] <98922864+opensearch-trigger-bot[bot]@users.noreply.github.com>
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
Co-authored-by: Swetha Guptha <[email protected]>
Co-authored-by: Derek Ho <[email protected]>
Co-authored-by: opensearch-ci-bot <[email protected]>
opensearch-trigger-bot bot added a commit that referenced this pull request Apr 29, 2025
* Changes to remove tenant panels from roles pages when multitenancy is disabled (#2215) (#2218)

* Changes to remove tenant panels from roles pages when multitenancy is disabled

* Modified test files as per comments on PR

---------

(cherry picked from commit e7ffb2e)

Signed-off-by: nishthm <[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>

* Explicitly cd to security-dashboards-plugin directory before running cypress tests (#2216) (#2222)

(cherry picked from commit d17ac9e)

Signed-off-by: Craig Perkins <[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>

* Add cat shard api permission (#2217) (#2223)

(cherry picked from commit f0baa61)

Signed-off-by: Swetha Guptha <[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: Swetha Guptha <[email protected]>
Co-authored-by: Derek Ho <[email protected]>

* Increment version to 3.0.0.0 (#2226)

Signed-off-by: opensearch-ci-bot <[email protected]>
Co-authored-by: opensearch-ci-bot <[email protected]>

* Removes beta1 qualifier from security-dashboards-plugin

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

---------

Signed-off-by: nishthm <[email protected]>
Signed-off-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
Signed-off-by: Craig Perkins <[email protected]>
Signed-off-by: Swetha Guptha <[email protected]>
Signed-off-by: opensearch-ci-bot <[email protected]>
Signed-off-by: Darshit Chanpura <[email protected]>
Co-authored-by: opensearch-trigger-bot[bot] <98922864+opensearch-trigger-bot[bot]@users.noreply.github.com>
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
Co-authored-by: Swetha Guptha <[email protected]>
Co-authored-by: Derek Ho <[email protected]>
Co-authored-by: opensearch-ci-bot <[email protected]>
(cherry picked from commit cf24968)
Signed-off-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
peterzhuamazon pushed a commit that referenced this pull request Apr 29, 2025
* Changes to remove tenant panels from roles pages when multitenancy is disabled (#2215) (#2218)

* Changes to remove tenant panels from roles pages when multitenancy is disabled

* Modified test files as per comments on PR

---------

(cherry picked from commit e7ffb2e)





* Explicitly cd to security-dashboards-plugin directory before running cypress tests (#2216) (#2222)

(cherry picked from commit d17ac9e)





* Add cat shard api permission (#2217) (#2223)

(cherry picked from commit f0baa61)







* Increment version to 3.0.0.0 (#2226)




* Removes beta1 qualifier from security-dashboards-plugin



---------












(cherry picked from commit cf24968)

Signed-off-by: nishthm <[email protected]>
Signed-off-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
Signed-off-by: Craig Perkins <[email protected]>
Signed-off-by: Swetha Guptha <[email protected]>
Signed-off-by: opensearch-ci-bot <[email protected]>
Signed-off-by: Darshit Chanpura <[email protected]>
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
Co-authored-by: opensearch-trigger-bot[bot] <98922864+opensearch-trigger-bot[bot]@users.noreply.github.com>
Co-authored-by: Swetha Guptha <[email protected]>
Co-authored-by: Derek Ho <[email protected]>
Co-authored-by: opensearch-ci-bot <[email protected]>
DarshitChanpura pushed a commit to DarshitChanpura/security-dashboards-plugin that referenced this pull request Apr 29, 2025
…ct#2230)

* Changes to remove tenant panels from roles pages when multitenancy is disabled (opensearch-project#2215) (opensearch-project#2218)

* Changes to remove tenant panels from roles pages when multitenancy is disabled

* Modified test files as per comments on PR

---------

(cherry picked from commit e7ffb2e)





* Explicitly cd to security-dashboards-plugin directory before running cypress tests (opensearch-project#2216) (opensearch-project#2222)

(cherry picked from commit d17ac9e)





* Add cat shard api permission (opensearch-project#2217) (opensearch-project#2223)

(cherry picked from commit f0baa61)







* Increment version to 3.0.0.0 (opensearch-project#2226)




* Removes beta1 qualifier from security-dashboards-plugin



---------












(cherry picked from commit cf24968)

Signed-off-by: nishthm <[email protected]>
Signed-off-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
Signed-off-by: Craig Perkins <[email protected]>
Signed-off-by: Swetha Guptha <[email protected]>
Signed-off-by: opensearch-ci-bot <[email protected]>
Signed-off-by: Darshit Chanpura <[email protected]>
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
Co-authored-by: opensearch-trigger-bot[bot] <98922864+opensearch-trigger-bot[bot]@users.noreply.github.com>
Co-authored-by: Swetha Guptha <[email protected]>
Co-authored-by: Derek Ho <[email protected]>
Co-authored-by: opensearch-ci-bot <[email protected]>
cwperks added a commit that referenced this pull request May 8, 2025
* Complete 3.0 version bump (#2229) (#2230)

* Changes to remove tenant panels from roles pages when multitenancy is disabled (#2215) (#2218)

* Changes to remove tenant panels from roles pages when multitenancy is disabled

* Modified test files as per comments on PR

---------

(cherry picked from commit e7ffb2e)





* Explicitly cd to security-dashboards-plugin directory before running cypress tests (#2216) (#2222)

(cherry picked from commit d17ac9e)





* Add cat shard api permission (#2217) (#2223)

(cherry picked from commit f0baa61)







* Increment version to 3.0.0.0 (#2226)




* Removes beta1 qualifier from security-dashboards-plugin



---------












(cherry picked from commit cf24968)

Signed-off-by: nishthm <[email protected]>
Signed-off-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
Signed-off-by: Craig Perkins <[email protected]>
Signed-off-by: Swetha Guptha <[email protected]>
Signed-off-by: opensearch-ci-bot <[email protected]>
Signed-off-by: Darshit Chanpura <[email protected]>
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
Co-authored-by: opensearch-trigger-bot[bot] <98922864+opensearch-trigger-bot[bot]@users.noreply.github.com>
Co-authored-by: Swetha Guptha <[email protected]>
Co-authored-by: Derek Ho <[email protected]>
Co-authored-by: opensearch-ci-bot <[email protected]>

* Removes beta1 qualifier and solves CVE-2024-52798

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

---------

Signed-off-by: nishthm <[email protected]>
Signed-off-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
Signed-off-by: Craig Perkins <[email protected]>
Signed-off-by: Swetha Guptha <[email protected]>
Signed-off-by: opensearch-ci-bot <[email protected]>
Signed-off-by: Darshit Chanpura <[email protected]>
Co-authored-by: opensearch-trigger-bot[bot] <98922864+opensearch-trigger-bot[bot]@users.noreply.github.com>
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
Co-authored-by: Swetha Guptha <[email protected]>
Co-authored-by: Derek Ho <[email protected]>
Co-authored-by: opensearch-ci-bot <[email protected]>
Co-authored-by: Craig Perkins <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants