zitadel/internal/user/repository/view
Livio Spring b0e71a81ef
fix: prevent error reason leakage in case of IgnoreUnknownUsernames (#8372)
# Which Problems Are Solved

ZITADEL administrators can enable a setting called "Ignoring unknown
usernames" which helps mitigate attacks that try to guess/enumerate
usernames. If enabled, ZITADEL will show the password prompt even if the
user doesn't exist and report "Username or Password invalid".
Due to a implementation change to prevent deadlocks calling the
database, the flag would not be correctly respected in all cases and an
attacker would gain information if an account exist within ZITADEL,
since the error message shows "object not found" instead of the generic
error message.

# How the Problems Are Solved

- Proper check of the error using an error function / type and
`errors.Is`

# Additional Changes

None.

# Additional Context

- raised in a support request

Co-authored-by: Silvan <silvan.reusser@gmail.com>
(cherry picked from commit a1d24353db)
2024-07-31 14:34:10 +02:00
..
model fix(oidc): IDP and passwordless user auth methods (#7998) 2024-05-28 08:59:49 +00:00
query.go fix: reduce eventual consistency (#7075) 2023-12-14 11:07:47 +01:00
refresh_token_view.go fix(login): improve auth handlers (#7969) 2024-05-22 15:26:02 +00:00
token_view.go fix(login): improve auth handlers (#7969) 2024-05-22 15:26:02 +00:00
user_by_id.sql feat: password age policy (#8132) 2024-06-18 11:27:44 +00:00
user_session_by_id.sql feat: password age policy (#8132) 2024-06-18 11:27:44 +00:00
user_session_view.go fix(login): improve auth handlers (#7969) 2024-05-22 15:26:02 +00:00
user_sessions_by_user_agent.sql fix: correctly set user agent / fingerprint id on user sessions (#8231) 2024-07-03 09:55:20 +02:00
user_view.go fix: prevent error reason leakage in case of IgnoreUnknownUsernames (#8372) 2024-07-31 14:34:10 +02:00