public class DelayLockPolicy extends LockPolicy
For each failed attempt a counter is incremented. The delay doubles for each failed attempt, but to avoid creating too
much delay the counter value is capped at maxCounter
.
This counter is reset on the next successful authentication attempt.
initialDelay
of 2 seconds and a maxCounter
of 6 attempts we have the following:
Attempts | Seconds Delay |
1 | 2^1 = 2 |
2 | 2^2 = 4 |
3 | 2^3 = 8 |
4 | 2^4 = 16 |
5 | 2^5 = 32 |
6 or more | 2^6 = 64 |
NIST recommended mechanism according to SP 800-63-3
https://nvlpubs.nist.gov/nistpubs/SpecialPublications/NIST.SP.800-63-3.pdf
LockPolicy.LockType
Constructor and Description |
---|
DelayLockPolicy(int maxCounter,
int initialDelay)
Constructor
|
Modifier and Type | Method and Description |
---|---|
int |
getInitialDelay()
Returns the initial delay in seconds.
|
int |
getMaxCounterValue()
Returns the maximum counter value after which exponential delay is fixed.
|
String |
toString()
Displays a readable description of the lock policy.
|
getType
public DelayLockPolicy(int maxCounter, int initialDelay)
maxCounter
- maximum counter value after which exponential delay is fixedinitialDelay
- initial delay in secondspublic int getInitialDelay()
public int getMaxCounterValue()
public String toString()
toString
in class Object
Object.toString()
Copyright © 2005-2020 HID Global Corporation/ASSA ABLOY AB.