Record Class AbusePatternMonitor.Config
java.lang.Object
java.lang.Record
com.svenruppert.jsentinel.credential.abuse.AbusePatternMonitor.Config
- Record Components:
sprayingDistinctUsers- number of distinct usernames per client per window that triggers SPRAYING; 0 to disablesprayingWindow- sliding-window length for SPRAYINGstuffingDistinctClients- number of distinct clients per username per window that triggers STUFFING; 0 to disablestuffingWindow- sliding-window length for STUFFINGresetAbuseAttempts- number of RESET_REQUEST attempts per username per window that triggers RESET_ABUSE; 0 to disableresetAbuseWindow- sliding-window length for RESET_ABUSE
- Enclosing class:
AbusePatternMonitor
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic AbusePatternMonitor.Configdefaults()Sensible default: 8 distinct usernames per client in 5 min → SPRAYING; 5 distinct clients per username in 15 min → STUFFING; 5 reset attempts per username in 1 h → RESET_ABUSE.final booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.intReturns the value of theresetAbuseAttemptsrecord component.Returns the value of theresetAbuseWindowrecord component.intReturns the value of thesprayingDistinctUsersrecord component.Returns the value of thesprayingWindowrecord component.intReturns the value of thestuffingDistinctClientsrecord component.Returns the value of thestuffingWindowrecord component.final StringtoString()Returns a string representation of this record class.
-
Constructor Details
-
Config
public Config(int sprayingDistinctUsers, Duration sprayingWindow, int stuffingDistinctClients, Duration stuffingWindow, int resetAbuseAttempts, Duration resetAbuseWindow) Creates an instance of aConfigrecord class.- Parameters:
sprayingDistinctUsers- the value for thesprayingDistinctUsersrecord componentsprayingWindow- the value for thesprayingWindowrecord componentstuffingDistinctClients- the value for thestuffingDistinctClientsrecord componentstuffingWindow- the value for thestuffingWindowrecord componentresetAbuseAttempts- the value for theresetAbuseAttemptsrecord componentresetAbuseWindow- the value for theresetAbuseWindowrecord component
-
-
Method Details
-
defaults
Sensible default: 8 distinct usernames per client in 5 min → SPRAYING; 5 distinct clients per username in 15 min → STUFFING; 5 reset attempts per username in 1 h → RESET_ABUSE. -
toString
-
hashCode
-
equals
Indicates whether some other object is "equal to" this one. The objects are equal if the other object is of the same class and if all the record components are equal. Reference components are compared withObjects::equals(Object,Object); primitive components are compared with thecomparemethod from their corresponding wrapper classes. -
sprayingDistinctUsers
public int sprayingDistinctUsers()Returns the value of thesprayingDistinctUsersrecord component.- Returns:
- the value of the
sprayingDistinctUsersrecord component
-
sprayingWindow
Returns the value of thesprayingWindowrecord component.- Returns:
- the value of the
sprayingWindowrecord component
-
stuffingDistinctClients
public int stuffingDistinctClients()Returns the value of thestuffingDistinctClientsrecord component.- Returns:
- the value of the
stuffingDistinctClientsrecord component
-
stuffingWindow
Returns the value of thestuffingWindowrecord component.- Returns:
- the value of the
stuffingWindowrecord component
-
resetAbuseAttempts
public int resetAbuseAttempts()Returns the value of theresetAbuseAttemptsrecord component.- Returns:
- the value of the
resetAbuseAttemptsrecord component
-
resetAbuseWindow
Returns the value of theresetAbuseWindowrecord component.- Returns:
- the value of the
resetAbuseWindowrecord component
-