network.detectors
Class MultipleLoginAttemptsEventDetector

java.lang.Object
  extended bynetwork.detectors.EventDetector
      extended bynetwork.detectors.MultipleLoginAttemptsEventDetector
All Implemented Interfaces:
java.lang.Runnable, java.io.Serializable

public class MultipleLoginAttemptsEventDetector
extends EventDetector
implements java.io.Serializable

Detects if a user has tried to login a specified number of times in a specified time period. These two parameters are passed in an input file

See Also:
Serialized Form

Field Summary
 
Fields inherited from class network.detectors.EventDetector
agentURN, cred, dbModule, eventIDGenerator, eventTable, host, localTriggeringEvents, remoteTriggeringEvents, reportTable
 
Constructor Summary
MultipleLoginAttemptsEventDetector(ConfigObject configObj)
          Uses the default User file specified in AdminClient.
MultipleLoginAttemptsEventDetector(java.lang.String monitorUsersFile, ConfigObject configObj)
          Uses the specified User file to instantiate this detector.
 
Method Summary
 java.util.Vector generateEvent(Event triggeredEvent)
          Detects if a user has exceeded his log in threshold This threshold is specified in the User configuration file
 java.lang.String getGeneratingEventClassName()
          Returns a String with the event that this class creates
static java.lang.String[] getParamList()
          Returns array of strings containing all the parameters that can be used as input to modify this detector.
 void modifyDetector(java.lang.Object object)
          Allows modification of the detector as it is running
static void parseMonitorUsersFile(java.lang.String monitorUsersFile, java.util.Vector monitorUsersLoginVector)
          Parses the given User configuration file.
static java.lang.Object[] translateParameters(java.lang.String[] inputarray)
          This function takes an array of strings from GUI which contains input and converts them to array of objects and returns.
 
Methods inherited from class network.detectors.EventDetector
getAlarmLevel, getAlertLevel, getLocalTriggeringEventClassNames, getRemoteTriggeringEventClassNames, getSynchronizer, InitializeFields, modifyDetector, populatePatterns, printRunningThreads, run, setAgentURN, setAlarmLevel, setAlertLevel, setDB, setEventIDGenerator, setEventTable, setLocalTriggeringEvents, setRemoteTriggeringEvents, setReportTable, stopDetector, switchOffPrintRunningThreads
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

MultipleLoginAttemptsEventDetector

public MultipleLoginAttemptsEventDetector(ConfigObject configObj)
                                   throws java.lang.Exception
Uses the default User file specified in AdminClient. The user file contains information regarding which users may login and the number of times they may login over a certain period of time


MultipleLoginAttemptsEventDetector

public MultipleLoginAttemptsEventDetector(java.lang.String monitorUsersFile,
                                          ConfigObject configObj)
                                   throws java.lang.Exception
Uses the specified User file to instantiate this detector. The user file contains information regarding which users may login and the number of times they may login over a certain period of time

Parameters:
monitorUsersFile - A path to a User file
Method Detail

getGeneratingEventClassName

public java.lang.String getGeneratingEventClassName()
Returns a String with the event that this class creates

Specified by:
getGeneratingEventClassName in class EventDetector
Returns:
A string with the event that this class creates

generateEvent

public java.util.Vector generateEvent(Event triggeredEvent)
Detects if a user has exceeded his log in threshold This threshold is specified in the User configuration file

Specified by:
generateEvent in class EventDetector
Parameters:
triggeredEvent - The event triggering this detector. Should be an instance of ConnectEvent
Returns:
A Vector of events. One MultipleLoginAttemptEvent per user who has exceeded their login threshold

parseMonitorUsersFile

public static void parseMonitorUsersFile(java.lang.String monitorUsersFile,
                                         java.util.Vector monitorUsersLoginVector)
                                  throws java.lang.Exception
Parses the given User configuration file.

Parameters:
monitorUsersFile - A path to the User configuration file
monitorUsersLoginVector - A Vector in which to store user login threshold information parsed from the input file
Throws:
java.lang.Exception

getParamList

public static java.lang.String[] getParamList()
Returns array of strings containing all the parameters that can be used as input to modify this detector. Each entry in the array corresponds to one parameter with structure " : ".

Returns:
parameterList, an array of Strings indicating parameters and their types

translateParameters

public static java.lang.Object[] translateParameters(java.lang.String[] inputarray)
                                              throws java.lang.Exception
This function takes an array of strings from GUI which contains input and converts them to array of objects and returns.

Parameters:
inputarray - an array of strings that contains user inputs.
Returns:
objArray an array of objects converted from the array of strings got from user.
Throws:
java.lang.Exception

modifyDetector

public void modifyDetector(java.lang.Object object)
Allows modification of the detector as it is running

Parameters:
object - An object describing how the detector should be modified. Should be an instance of PatternObject