Class ContextAwarePasswordValidator
java.lang.Object
com.svenruppert.jsentinel.credential.input.ContextAwarePasswordValidator
Context-aware password validator that wraps the structural
PasswordInputValidator with the checks the Konzept ยง14
mandates: a password must not contain its user's username, the
local part of their email, the email domain, or any of the
operator-supplied forbidden terms (CWE-521 / CWE-287).
No composition rules
Modern password guidance (NIST SP 800-63B) advises against
composition rules ("must contain a symbol", "must contain
a number"). This validator therefore does not
enforce composition; it relies on the configured
PasswordInputPolicy length window plus context-aware
rejection of brittle reused tokens. Operators who want strict
composition rules layer their own validator on top.
All substring checks are case-insensitive. Comparison uses
String.toLowerCase() on copies of the borrowed
char[] that the validator zeroes in a finally
block (CWE-226).
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvalidate(SecretValue secret, PasswordInputPolicy policy, PasswordContext context) Runs both the structural and context-aware checks.
-
Constructor Details
-
ContextAwarePasswordValidator
public ContextAwarePasswordValidator() -
ContextAwarePasswordValidator
-
-
Method Details
-
validate
public PasswordInputValidationResult validate(SecretValue secret, PasswordInputPolicy policy, PasswordContext context) Runs both the structural and context-aware checks. The first violation wins; subsequent checks are not consulted.
-