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

Refactor security provider instantiation #4605

Conversation

terryquigleysas
Copy link
Contributor

Description

Category (Refactoring)

Refactor call to add the BouncyCastleProvider in OpenSearchSecurityPlugin.java and any associated code.

Helps towards potential support of FIPS-compatible Bouncy Castle provider. This class does not exist in other providers.

Backwards compatible.

Issues Resolved

Resolves #4583
Derived from and replaces #4588 - please refer to it for additional context

Testing

Bulk Integration Test Github action

Run latest 3.x Core and OpenSearch Security plugin. Smoke tests (Indexing, searching, user creation, role creation, security admin script calls) run against both:

  • JDK 17 - local
  • JDK 21 - shipped with OS

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 Jul 27, 2024

Codecov Report

Attention: Patch coverage is 73.33333% with 4 lines in your changes missing coverage. Please review.

Project coverage is 65.29%. Comparing base (004d07b) to head (b3e067b).
Report is 1 commits behind head on main.

Additional details and impacted files

Impacted file tree graph

@@            Coverage Diff             @@
##             main    #4605      +/-   ##
==========================================
+ Coverage   65.28%   65.29%   +0.01%     
==========================================
  Files         317      317              
  Lines       22277    22285       +8     
  Branches     3582     3582              
==========================================
+ Hits        14544    14552       +8     
  Misses       5941     5941              
  Partials     1792     1792              
Files Coverage Δ
.../opensearch/security/OpenSearchSecurityPlugin.java 84.59% <73.33%> (-0.11%) ⬇️

... and 3 files with indirect coverage changes

@terryquigleysas terryquigleysas mentioned this pull request Jul 27, 2024
5 tasks
@terryquigleysas
Copy link
Contributor Author

@cwperks This is the latest proposed change for the provider issue. Thanks for your comments so far on the other tickets.

@cwperks cwperks added the backport 2.x backport to 2.x branch label Jul 30, 2024
@terryquigleysas
Copy link
Contributor Author

Thanks all for the comments and approvals. Is there anything else you need from me for it to be merged?

@willyborankin willyborankin merged commit d97cca8 into opensearch-project:main Jul 30, 2024
43 checks passed
@terryquigleysas terryquigleysas deleted the refactor_security_provider branch July 30, 2024 14:59
@opensearch-trigger-bot
Copy link
Contributor

The backport to 2.x failed:

The process '/usr/bin/git' failed with exit code 128

To backport manually, run these commands in your terminal:

# Navigate to the root of your repository
cd $(git rev-parse --show-toplevel)
# Fetch latest updates from GitHub
git fetch
# Create a new working tree
git worktree add ../.worktrees/security/backport-2.x 2.x
# Navigate to the new working tree
pushd ../.worktrees/security/backport-2.x
# Create a new branch
git switch --create backport/backport-4605-to-2.x
# Cherry-pick the merged commit of this pull request and resolve the conflicts
git cherry-pick -x --mainline 1 d97cca822c40c983d560e606577af4019827b9a5
# Push it to GitHub
git push --set-upstream origin backport/backport-4605-to-2.x
# Go back to the original working tree
popd
# Delete the working tree
git worktree remove ../.worktrees/security/backport-2.x

Then, create a pull request where the base branch is 2.x and the compare/head branch is backport/backport-4605-to-2.x.

@willyborankin
Copy link
Collaborator

Hi, @terryquigleysas, could you please make a backport manually?

@terryquigleysas
Copy link
Contributor Author

@willyborankin I am out of the office for a few weeks starting today. This will be picked up by @dancristiancecoi

dancristiancecoi pushed a commit to dancristiancecoi/security that referenced this pull request Jul 31, 2024
Signed-off-by: Terry Quigley <[email protected]>
(cherry picked from commit d97cca8)
@dancristiancecoi
Copy link
Contributor

@willyborankin created the backport: #4611

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.

Remove hardcoded security provider
6 participants