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

Fix env var password hashing for PBKDF2 #4773

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

terryquigleysas
Copy link
Contributor

Description

Category (Bug fix)

Passwords provided as environment variables are always hashed using BCrypt even when configured to use something else. Authentication fails when using PBKDF2 .

Issues Resolved

Resolves #4771

Testing

Initially found testing on a personal cluster. Confirmed fix works.
Included new test for PBKDF2 with PR.
Run Bulk Integration Tests.

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 Oct 3, 2024

Codecov Report

Attention: Patch coverage is 87.50000% with 1 line in your changes missing coverage. Please review.

Project coverage is 67.99%. Comparing base (830b341) to head (c5349de).
Report is 2 commits behind head on main.

Files with missing lines Patch % Lines
...org/opensearch/security/support/SecurityUtils.java 83.33% 1 Missing ⚠️
Additional details and impacted files

Impacted file tree graph

@@            Coverage Diff             @@
##             main    #4773      +/-   ##
==========================================
+ Coverage   67.98%   67.99%   +0.01%     
==========================================
  Files         310      310              
  Lines       20924    20925       +1     
  Branches     3318     3319       +1     
==========================================
+ Hits        14225    14228       +3     
+ Misses       4951     4947       -4     
- Partials     1748     1750       +2     
Files with missing lines Coverage Δ
...a/org/opensearch/security/tools/SecurityAdmin.java 48.45% <100.00%> (ø)
...org/opensearch/security/support/SecurityUtils.java 68.51% <83.33%> (ø)

... and 5 files with indirect coverage changes

Copy link
Member

@cwperks cwperks left a comment

Choose a reason for hiding this comment

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

LGTM!

@cwperks cwperks added the backport 2.x backport to 2.x branch label Oct 3, 2024
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] Password from Env Var Hashed Incorrectly
2 participants