public class BruteForceProtector extends Object implements Runnable
Modifier and Type | Class and Description |
---|---|
protected class |
BruteForceProtector.FailedLogin |
protected class |
BruteForceProtector.LoginEvent |
protected class |
BruteForceProtector.ShutdownEvent |
protected class |
BruteForceProtector.SuccessfulLogin |
Modifier and Type | Field and Description |
---|---|
protected KeycloakSessionFactory |
factory |
protected long |
failures |
protected long |
lastFailure |
protected static org.jboss.logging.Logger |
logger |
protected int |
maxDeltaTimeSeconds |
protected LinkedBlockingQueue<BruteForceProtector.LoginEvent> |
queue |
protected boolean |
run |
protected CountDownLatch |
shutdownLatch |
protected long |
totalTime |
static int |
TRANSACTION_SIZE |
Constructor and Description |
---|
BruteForceProtector(KeycloakSessionFactory factory) |
Modifier and Type | Method and Description |
---|---|
void |
failedLogin(RealmModel realm,
String username,
ClientConnection clientConnection) |
void |
failure(KeycloakSession session,
BruteForceProtector.LoginEvent event) |
long |
getFailures() |
long |
getLastFailure() |
protected RealmModel |
getRealmModel(KeycloakSession session,
BruteForceProtector.LoginEvent event) |
protected UsernameLoginFailureModel |
getUserModel(KeycloakSession session,
BruteForceProtector.LoginEvent event) |
void |
invalidUser(RealmModel realm,
String username,
ClientConnection clientConnection) |
boolean |
isTemporarilyDisabled(KeycloakSession session,
RealmModel realm,
String username) |
protected void |
logFailure(BruteForceProtector.LoginEvent event) |
protected void |
logSuccess(BruteForceProtector.LoginEvent event) |
void |
run() |
void |
shutdown() |
void |
start() |
void |
successfulLogin(RealmModel realm,
String username,
ClientConnection clientConnection) |
protected static org.jboss.logging.Logger logger
protected volatile boolean run
protected int maxDeltaTimeSeconds
protected KeycloakSessionFactory factory
protected CountDownLatch shutdownLatch
protected volatile long failures
protected volatile long lastFailure
protected volatile long totalTime
protected LinkedBlockingQueue<BruteForceProtector.LoginEvent> queue
public static final int TRANSACTION_SIZE
public BruteForceProtector(KeycloakSessionFactory factory)
public void failure(KeycloakSession session, BruteForceProtector.LoginEvent event)
protected UsernameLoginFailureModel getUserModel(KeycloakSession session, BruteForceProtector.LoginEvent event)
protected RealmModel getRealmModel(KeycloakSession session, BruteForceProtector.LoginEvent event)
public void start()
public void shutdown()
protected void logSuccess(BruteForceProtector.LoginEvent event)
protected void logFailure(BruteForceProtector.LoginEvent event)
public void successfulLogin(RealmModel realm, String username, ClientConnection clientConnection)
public void invalidUser(RealmModel realm, String username, ClientConnection clientConnection)
public void failedLogin(RealmModel realm, String username, ClientConnection clientConnection)
public boolean isTemporarilyDisabled(KeycloakSession session, RealmModel realm, String username)
public long getFailures()
public long getLastFailure()
Copyright © 2015. All Rights Reserved.