Interface CompromisedPasswordChecker
- All Known Implementing Classes:
LocalBlocklistCompromisedPasswordChecker, NoOpCompromisedPasswordChecker
- Functional Interface:
- This is a functional interface and can therefore be used as the assignment target for a lambda expression or method reference.
SPI for compromised-password lookups.
Implementations must not log, persist or transmit the candidate password (CWE-359, CWE-532). Network-backed implementations are required to use a privacy-preserving protocol such as k-anonymity range queries — the plain candidate must never leave the process.
The check is invoked from the credential set / change / reset
pipeline only. CompromisedPasswordPolicy.checkOnLogin()
defaults to false to keep the login hot path constant-time
and avoid burning external rate-limit budget on every attempt
(CWE-203, CWE-307).
-
Method Summary
-
Method Details
-
check
Evaluates the candidate password.- Parameters:
password- caller-owned secret. The implementation must not modify it, log it, or hold a reference past the call.- Returns:
CompromisedPasswordResult.Cleanwhen the password is not known to be breached,CompromisedPasswordResult.Pwnedwhen it matches a known entry, orCompromisedPasswordResult.CheckFailedwhen no verdict could be produced.
-