Class LoginAttemptConfigurationLoader

java.lang.Object
com.svenruppert.jsentinel.bruteforce.LoginAttemptConfigurationLoader

public final class LoginAttemptConfigurationLoader extends Object
Loads LoginAttemptConfiguration from system properties and environment variables, with a caller-supplied default.

Sources, in order of precedence

  1. System property (highest)
  2. Environment variable
  3. Caller-provided default (lowest)

Keys

Configuration keys (default scope = login endpoint)
System propertyEnvironment variable
security.login.attempts.threshold SECURITY_LOGIN_ATTEMPTS_THRESHOLD
security.login.attempts.window SECURITY_LOGIN_ATTEMPTS_WINDOW
security.login.attempts.initial-lockout SECURITY_LOGIN_ATTEMPTS_INITIAL_LOCKOUT
security.login.attempts.max-lockout SECURITY_LOGIN_ATTEMPTS_MAX_LOCKOUT

Duration values are parsed as ISO-8601 (e.g. PT5M, PT1H). The forBootstrap() variant uses security.bootstrap.attempts.* prefixes so the bootstrap endpoint can be tuned independently of the normal login endpoint.

Invalid values fail fast with IllegalArgumentException.