Interface Tarpit


public interface Tarpit
Used by AuthenticateBasicActeur. Too many failed password attempts and you go in the tar pit - first responses are delayed, then blocked altogether.

Callers are identified by default by their IP address, but you can inject a TarpitCacheKeyFactory to look at cookies or whatever you want.

Author:
Tim Boudreau
  • Field Details

    • SETTINGS_KEY_TARPIT_EXPIRATION_TIME_MINUTES

      static final String SETTINGS_KEY_TARPIT_EXPIRATION_TIME_MINUTES
      See Also:
    • DEFAULT_TARPIT_EXPIRATION_TIME_MINUTES

      static final int DEFAULT_TARPIT_EXPIRATION_TIME_MINUTES
      See Also:
  • Method Details

    • add

      int add(HttpEvent evt)
      Add an entry to the tarpit for failing to authenticate, incrementing the count if necessary.
      Parameters:
      evt - The http request
      Returns:
      The updated number of bad requests
    • count

      int count(HttpEvent evt)
      Get the number of bad requests
      Parameters:
      evt - An http request
      Returns:
      The
    • remove

      void remove(HttpEvent evt)