xmidt-org / bascule

Provides authentication and authorization workflows
Apache License 2.0
2 stars 4 forks source link

Feature/password hashing #291

Closed johnabass closed 1 week ago

johnabass commented 2 weeks ago

This PR adds basic password hashing support. The password hashing is modular and extensible, and currently only bcrypt is supported because it's easy.

Included is also a command-line tool for generating hashes in the OpenSSL crypt format. We can use that command to nab the string that should be put into configuration files for servers that accept basic auth or other password-like secrets. The configuration files no longer need to be closed source or encrypted, as any secrets will be one-way hashed.

codecov[bot] commented 2 weeks ago

Codecov Report

Attention: Patch coverage is 96.07843% with 2 lines in your changes missing coverage. Please review.

Project coverage is 99.76%. Comparing base (af4b32b) to head (a94899c). Report is 14 commits behind head on main.

Files with missing lines Patch % Lines
cmd/hash/main.go 90.47% 2 Missing :warning:
Additional details and impacted files ```diff @@ Coverage Diff @@ ## main #291 +/- ## =========================================== - Coverage 100.00% 99.76% -0.24% =========================================== Files 21 25 +4 Lines 789 840 +51 =========================================== + Hits 789 838 +49 - Misses 0 2 +2 ``` | [Flag](https://app.codecov.io/gh/xmidt-org/bascule/pull/291/flags?src=pr&el=flags&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=xmidt-org) | Coverage Δ | | |---|---|---| | [unittests](https://app.codecov.io/gh/xmidt-org/bascule/pull/291/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=xmidt-org) | `99.76% <96.07%> (-0.24%)` | :arrow_down: | Flags with carried forward coverage won't be shown. [Click here](https://docs.codecov.io/docs/carryforward-flags?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=xmidt-org#carryforward-flags-in-the-pull-request-comment) to find out more.

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.