Skip to content

Conversation

@cwperks
Copy link
Member

@cwperks cwperks commented May 30, 2025

Description

In #5212 the user object was made immutable after instantiation. With the immutability, there were a few lines removed to temporarily add the mapped roles before setting the userInfo into the threadcontext. This PR adds them back in.

This PR explicitly passes the mapped roles

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

Bugfix

Issues Resolved

Fixes issues seen in AD and SAP plugin tests w/ security

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.

Signed-off-by: Craig Perkins <cwperx@amazon.com>
Signed-off-by: Craig Perkins <cwperx@amazon.com>
@codecov
Copy link

codecov bot commented May 30, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 72.18%. Comparing base (45e541d) to head (3a018c6).
Report is 2 commits behind head on main.

Additional details and impacted files

Impacted file tree graph

@@           Coverage Diff           @@
##             main    #5369   +/-   ##
=======================================
  Coverage   72.18%   72.18%           
=======================================
  Files         382      382           
  Lines       23628    23628           
  Branches     3629     3629           
=======================================
+ Hits        17055    17056    +1     
+ Misses       4789     4784    -5     
- Partials     1784     1788    +4     
Files with missing lines Coverage Δ
...earch/security/privileges/PrivilegesEvaluator.java 74.04% <100.00%> (ø)

... and 4 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.

Copy link
Collaborator

@nibix nibix left a comment

Choose a reason for hiding this comment

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

Good catch! 👍

@cwperks cwperks merged commit a4beb72 into opensearch-project:main Jun 2, 2025
69 of 70 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.

4 participants