Record Class AbusePatternSignal
java.lang.Object
java.lang.Record
com.svenruppert.jsentinel.credential.abuse.AbusePatternSignal
- Record Components:
pattern- which pattern firedat- when the signal was raisedwindowSize- sliding-window length the count was measured acrossdistinctTargets- size of the distinct-target set (e.g. distinct usernames for SPRAYING, distinct clients for STUFFING)attempts- total attempts in the window (≥ distinctTargets)
public record AbusePatternSignal(AbusePattern pattern, Instant at, Duration windowSize, int distinctTargets, int attempts)
extends Record
Privacy-minimised signal emitted by an
AbusePatternMonitor detector when a pattern crosses its
threshold.
The signal carries aggregates only — counts of distinct usernames / clients, never the usernames or addresses themselves (CWE-359). Audit sinks may add their own metadata if the operator decides that's acceptable for their deployment, but the signal itself stays minimal.
-
Constructor Summary
ConstructorsConstructorDescriptionAbusePatternSignal(AbusePattern pattern, Instant at, Duration windowSize, int distinctTargets, int attempts) Creates an instance of aAbusePatternSignalrecord class. -
Method Summary
Modifier and TypeMethodDescriptionat()Returns the value of theatrecord component.intattempts()Returns the value of theattemptsrecord component.intReturns the value of thedistinctTargetsrecord component.final booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.pattern()Returns the value of thepatternrecord component.final StringtoString()Returns a string representation of this record class.Returns the value of thewindowSizerecord component.
-
Constructor Details
-
AbusePatternSignal
public AbusePatternSignal(AbusePattern pattern, Instant at, Duration windowSize, int distinctTargets, int attempts) Creates an instance of aAbusePatternSignalrecord class.- Parameters:
pattern- the value for thepatternrecord componentat- the value for theatrecord componentwindowSize- the value for thewindowSizerecord componentdistinctTargets- the value for thedistinctTargetsrecord componentattempts- the value for theattemptsrecord component
-
-
Method Details
-
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. -
pattern
-
at
-
windowSize
Returns the value of thewindowSizerecord component.- Returns:
- the value of the
windowSizerecord component
-
distinctTargets
public int distinctTargets()Returns the value of thedistinctTargetsrecord component.- Returns:
- the value of the
distinctTargetsrecord component
-
attempts
-