Skip to content

Conversation

@cwperks
Copy link
Member

@cwperks cwperks commented May 14, 2025

Description

This PR does a bit of a refactor on #5281 to refer to action groups as "access levels". In the context of sharable resources, I think access level helps to differentiate these from other action groups as they would be pertinent to sharable resources.

This also fixes a bug in the logic of ResourceSharing.isSharedWithEveryone

This PR also continues work from #5322 to remove instances in SampleResourcePluginLimitedPermissionsTests and SampleResourcePluginSystemIndexDisabledTests which previously used a workaround since core did not support testing with extended plugins.

  • Category (Enhancement, New feature, Bug fix, Test fix, Refactoring, Maintenance, Documentation)

Refactor

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.

cwperks added 3 commits May 13, 2025 17:40
Signed-off-by: Craig Perkins <[email protected]>
Signed-off-by: Craig Perkins <[email protected]>
Signed-off-by: Craig Perkins <[email protected]>
Signed-off-by: Craig Perkins <[email protected]>
@codecov
Copy link

codecov bot commented May 14, 2025

Codecov Report

Attention: Patch coverage is 70.71823% with 53 lines in your changes missing coverage. Please review.

Project coverage is 72.10%. Comparing base (7421138) to head (e7589f9).
Report is 5 commits behind head on main.

Files with missing lines Patch % Lines
...rch/security/spi/resources/sharing/Recipients.java 65.90% 14 Missing and 1 partial ⚠️
...ecurity/spi/resources/sharing/ResourceSharing.java 52.17% 7 Missing and 4 partials ⚠️
...ecurity/resources/ResourceSharingIndexHandler.java 76.47% 5 Missing and 3 partials ⚠️
...arch/security/spi/resources/sharing/CreatedBy.java 50.00% 5 Missing and 2 partials ⚠️
...tions/rest/revoke/RevokeResourceAccessRequest.java 25.00% 3 Missing ⚠️
...ource/actions/rest/share/ShareResourceRequest.java 50.00% 3 Missing ⚠️
...arch/security/spi/resources/sharing/ShareWith.java 84.21% 3 Missing ⚠️
...arch/security/resources/ResourceAccessHandler.java 83.33% 0 Missing and 2 partials ⚠️
...ce/actions/rest/share/ShareResourceRestAction.java 87.50% 0 Missing and 1 partial ⚠️
Additional details and impacted files

Impacted file tree graph

@@            Coverage Diff             @@
##             main    #5335      +/-   ##
==========================================
+ Coverage   72.03%   72.10%   +0.07%     
==========================================
  Files         384      382       -2     
  Lines       23927    23812     -115     
  Branches     3656     3650       -6     
==========================================
- Hits        17235    17170      -65     
+ Misses       4856     4814      -42     
+ Partials     1836     1828       -8     
Files with missing lines Coverage Δ
...ns/rest/revoke/RevokeResourceAccessRestAction.java 83.33% <100.00%> (ø)
...tions/transport/DeleteResourceTransportAction.java 69.44% <100.00%> (ø)
.../actions/transport/GetResourceTransportAction.java 93.84% <100.00%> (ø)
...transport/RevokeResourceAccessTransportAction.java 100.00% <100.00%> (ø)
...ctions/transport/ShareResourceTransportAction.java 78.57% <100.00%> (+1.64%) ⬆️
...tions/transport/UpdateResourceTransportAction.java 80.48% <100.00%> (ø)
...arch/security/spi/resources/sharing/Recipient.java 100.00% <ø> (+30.76%) ⬆️
...ecurity/resources/ResourceAccessControlClient.java 100.00% <100.00%> (ø)
...arch/security/resources/ResourceIndexListener.java 83.87% <100.00%> (ø)
...nsearch/security/resources/ResourcePluginInfo.java 100.00% <ø> (ø)
... and 9 more

... and 8 files with indirect coverage changes

🚀 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 added 6 commits May 14, 2025 15:19
Signed-off-by: Craig Perkins <[email protected]>
Signed-off-by: Craig Perkins <[email protected]>
Signed-off-by: Craig Perkins <[email protected]>
Signed-off-by: Craig Perkins <[email protected]>
@cwperks cwperks merged commit c31bd32 into opensearch-project:main May 16, 2025
46 of 47 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants