forked from ESAPI/esapi-java-legacy
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathIntrusionDetector.java
More file actions
60 lines (54 loc) · 2.02 KB
/
Copy pathIntrusionDetector.java
File metadata and controls
60 lines (54 loc) · 2.02 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
/**
* OWASP Enterprise Security API (ESAPI)
*
* This file is part of the Open Web Application Security Project (OWASP)
* Enterprise Security API (ESAPI) project. For details, please see
* <a href="http://www.owasp.org/index.php/ESAPI">http://www.owasp.org/index.php/ESAPI</a>.
*
* Copyright (c) 2007 - The OWASP Foundation
*
* The ESAPI is published by OWASP under the BSD license. You should read and accept the
* LICENSE before you use, modify, and/or redistribute this software.
*
* @author Jeff Williams <a href="http://www.aspectsecurity.com">Aspect Security</a>
* @created 2007
*/
package org.owasp.esapi;
import org.owasp.esapi.errors.IntrusionException;
/**
* The IntrusionDetector interface is intended to track security relevant events and identify attack behavior. The
* implementation can use as much state as necessary to detect attacks, but note that storing too much state will burden
* your system.
* <P>
* <img src="doc-files/IntrusionDetector.jpg" height="600">
* <P>
* <P>
* The interface is currently designed to accept exceptions as well as custom events. Implementations can use this
* stream of information to detect both normal and abnormal behavior.
*
* @author Jeff Williams (jeff.williams .at. aspectsecurity.com) <a href="http://www.aspectsecurity.com">Aspect Security</a>
* @since June 1, 2007
*/
public interface IntrusionDetector {
/**
* Adds the exception to the IntrusionDetector.
*
* @param exception
* the exception
*
* @throws IntrusionException the intrusion exception
*/
void addException(Exception exception) throws IntrusionException;
/**
* Adds the event to the IntrusionDetector.
*
* @param eventName
* the event
* @param logMessage
* the message to log with the event
*
* @throws IntrusionException
* the intrusion exception
*/
void addEvent(String eventName, String logMessage) throws IntrusionException;
}