mirror of
https://github.com/project-zot/zot.git
synced 2026-06-17 21:17:58 +08:00
fix: add support for sha256 and sha512 in htpasswd (#3497)
feat: add support for sha256 and sha512 htpasswd formats Fixes issue #3495 We currently support only bcrypt htpasswd hashes, however bcrypt is not FIPS-140 approved since it uses Blowfish. This PR adds support for sha256 and sha512 formats and enforces that bcrypt be disabled when fips140 mode is enabled. Signed-off-by: Ramkumar Chinchani <rchincha.dev@gmail.com>
This commit is contained in:
committed by
GitHub
parent
aaba362b4f
commit
04ae0a9409
@@ -28,8 +28,8 @@ func TestProfilingAuthz(t *testing.T) {
|
||||
password, seedPass := test.GenerateRandomString()
|
||||
authorizationAllRepos := test.AuthorizationAllRepos
|
||||
|
||||
testCreds := test.GetCredString(adminUsername, adminPassword) +
|
||||
test.GetCredString(username, password)
|
||||
testCreds := test.GetBcryptCredString(adminUsername, adminPassword) +
|
||||
test.GetBcryptCredString(username, password)
|
||||
htpasswdPath := test.MakeHtpasswdFileFromString(testCreds)
|
||||
|
||||
defer os.Remove(htpasswdPath)
|
||||
|
||||
Reference in New Issue
Block a user