mirror of
https://github.com/zitadel/zitadel.git
synced 2025-08-11 21:07:31 +00:00
feat: integrate passwap for human user password hashing (#6196)
* feat: use passwap for human user passwords * fix tests * passwap config * add the event mapper * cleanup query side and api * solve linting errors * regression test * try to fix linter errors again * pass systemdefaults into externalConfigChange migration * fix: user password set in auth view * pin passwap v0.2.0 * v2: validate hashed password hash based on prefix * resolve remaining comments * add error tag and translation for unsupported hash encoding * fix unit test --------- Co-authored-by: Livio Spring <livio.a@gmail.com>
This commit is contained in:
@@ -577,15 +577,14 @@ func (s *Server) getUsers(ctx context.Context, org string, withPasswords bool, w
|
||||
}
|
||||
if withPasswords {
|
||||
ctx, pwspan := tracing.NewSpan(ctx)
|
||||
hashedPassword, hashAlgorithm, err := s.query.GetHumanPassword(ctx, org, user.ID)
|
||||
encodedHash, err := s.query.GetHumanPassword(ctx, org, user.ID)
|
||||
pwspan.EndWithError(err)
|
||||
if err != nil && !caos_errors.IsNotFound(err) {
|
||||
return nil, nil, nil, nil, err
|
||||
}
|
||||
if err == nil && hashedPassword != nil {
|
||||
if err == nil && encodedHash != "" {
|
||||
dataUser.User.HashedPassword = &management_pb.ImportHumanUserRequest_HashedPassword{
|
||||
Value: string(hashedPassword),
|
||||
Algorithm: hashAlgorithm,
|
||||
Value: encodedHash,
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user