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

Add utility for hashing SCRAM-SHA-256 password #4031

Merged
merged 20 commits into from
Feb 12, 2024

Conversation

henvic
Copy link
Contributor

@henvic henvic commented Feb 1, 2024

Description

Closes #3784.

Readiness checklist

  • I added/updated unit tests (and they pass).
  • I added/updated integration/compatibility tests (and they pass).
  • I added/updated comments and checked rendering.
  • I made spot refactorings.
  • I updated user documentation.
  • I ran task all, and it passed.
  • I ensured that PR title is good enough for the changelog.
  • (for maintainers only) I set Reviewers (@FerretDB/core), Milestone (Next), Labels, Project and project's Sprint fields.
  • I marked all done items in this checklist.

@henvic henvic added the code/feature Some user-visible feature is not implemented yet label Feb 1, 2024
@henvic henvic self-assigned this Feb 1, 2024
Copy link

codecov bot commented Feb 1, 2024

Codecov Report

Attention: 6 lines in your changes are missing coverage. Please review.

Comparison is base (19dc041) 75.48% compared to head (6c57478) 74.44%.

Additional details and impacted files

Impacted file tree graph

@@            Coverage Diff             @@
##             main    #4031      +/-   ##
==========================================
- Coverage   75.48%   74.44%   -1.05%     
==========================================
  Files         341      342       +1     
  Lines       21774    21809      +35     
==========================================
- Hits        16437    16236     -201     
- Misses       4043     4312     +269     
+ Partials     1294     1261      -33     
Files Coverage Δ
internal/util/password/scramsha256.go 82.85% <82.85%> (ø)

... and 17 files with indirect coverage changes

Flag Coverage Δ
filter-true 66.39% <0.00%> (-1.40%) ⬇️
hana-1 ?
integration 66.39% <0.00%> (-1.40%) ⬇️
mongodb-1 4.81% <0.00%> (-0.01%) ⬇️
postgresql-1 49.62% <0.00%> (-0.03%) ⬇️
postgresql-2 46.57% <0.00%> (-0.08%) ⬇️
postgresql-3 ?
sqlite-1 48.81% <0.00%> (-0.17%) ⬇️
sqlite-2 45.70% <0.00%> (-0.05%) ⬇️
sqlite-3 46.98% <0.00%> (-0.08%) ⬇️
unit 32.52% <82.85%> (+0.08%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

@henvic henvic requested review from a team, rumyantseva, chilagrow and noisersup February 1, 2024 13:03
@henvic henvic marked this pull request as ready for review February 1, 2024 13:03
@henvic henvic requested review from AlekSi and a team as code owners February 1, 2024 13:03
@henvic henvic enabled auto-merge (squash) February 1, 2024 14:47
Copy link
Member

@chilagrow chilagrow left a comment

Choose a reason for hiding this comment

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

Just a few minor comments 🤗

internal/util/password/scramsha256_test.go Show resolved Hide resolved
internal/util/password/scramsha256_test.go Outdated Show resolved Hide resolved
internal/util/password/scramsha256_test.go Outdated Show resolved Hide resolved
internal/util/password/scramsha256_test.go Outdated Show resolved Hide resolved
internal/util/password/scramsha256_test.go Outdated Show resolved Hide resolved
internal/util/password/scramsha256.go Show resolved Hide resolved
internal/util/password/scramsha256_test.go Outdated Show resolved Hide resolved
internal/util/password/scramsha256_test.go Show resolved Hide resolved
@henvic henvic requested a review from chilagrow February 2, 2024 09:28
chilagrow
chilagrow previously approved these changes Feb 2, 2024
Copy link
Member

@chilagrow chilagrow left a comment

Choose a reason for hiding this comment

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

Great work!

noisersup
noisersup previously approved these changes Feb 2, 2024
@AlekSi AlekSi added this to the Next milestone Feb 5, 2024
@henvic henvic dismissed stale reviews from noisersup and chilagrow via f0ec447 February 7, 2024 01:19
internal/util/password/scramsha256_test.go Outdated Show resolved Hide resolved
internal/util/password/scramsha256_test.go Show resolved Hide resolved
internal/util/password/scramsha256.go Outdated Show resolved Hide resolved
internal/util/password/scramsha256.go Show resolved Hide resolved
internal/util/password/scramsha256_test.go Show resolved Hide resolved
internal/util/password/scramsha256_test.go Show resolved Hide resolved
internal/util/password/scramsha256_test.go Show resolved Hide resolved
henvic and others added 3 commits February 7, 2024 08:25
@henvic henvic requested a review from AlekSi February 7, 2024 08:14
@henvic henvic requested a review from ptrfarkas as a code owner February 8, 2024 09:16
@henvic henvic requested a review from chilagrow February 8, 2024 09:24
Copy link
Member

@chilagrow chilagrow left a comment

Choose a reason for hiding this comment

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

LGTM 🤗

@henvic henvic merged commit b00e27c into FerretDB:main Feb 12, 2024
26 of 27 checks passed
@AlekSi AlekSi added code/chore Code maintenance improvements and removed code/feature Some user-visible feature is not implemented yet labels Feb 19, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
code/chore Code maintenance improvements
Projects
Archived in project
Development

Successfully merging this pull request may close these issues.

Support SCRAM-SHA-256 authentication mechanism
6 participants