Class AppGuardianConfiguration
- java.lang.Object
-
- org.owasp.esapi.waf.configuration.AppGuardianConfiguration
-
public class AppGuardianConfiguration extends java.lang.Object
This class is the object model of the policy file. Also holds a number of constants used throughout the WAF.- Author:
- Arshan Dabirsiaghi
-
-
Field Summary
Fields Modifier and Type Field Description static int
BLOCK
static java.lang.String
DEFAULT_CHARACTER_ENCODING
static java.lang.String
DEFAULT_CONTENT_TYPE
static int
DEFAULT_FAIL_ACTION
static java.lang.String
JAVASCRIPT_REDIRECT
static java.lang.String
JAVASCRIPT_TARGET_TOKEN
static int
LOG
static java.lang.String
LOG_DIRECTORY
static org.apache.log4j.Level
LOG_LEVEL
static int
OPERATOR_CONTAINS
static int
OPERATOR_EQ
static int
OPERATOR_EXISTS
static int
OPERATOR_IN_LIST
static int
REDIRECT
-
Constructor Summary
Constructors Constructor Description AppGuardianConfiguration()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
addAfterBodyRule(Rule r)
void
addBeforeBodyRule(Rule r)
void
addBeforeResponseRule(Rule r)
void
addCookieRule(Rule r)
java.util.List<Rule>
getAfterBodyRules()
java.util.List<Rule>
getBeforeBodyRules()
java.util.List<Rule>
getBeforeResponseRules()
java.util.List<Rule>
getCookieRules()
java.lang.String
getDefaultErrorPage()
int
getDefaultResponseCode()
java.lang.String
getSessionCookieName()
boolean
isUsingHttpOnlyFlagOnSessionCookie()
boolean
isUsingSecureFlagOnSessionCookie()
void
setApplyHTTPOnlyFlagToSessionCookie(boolean shouldApply)
void
setApplySecureFlagToSessionCookie(boolean shouldApply)
void
setDefaultErrorPage(java.lang.String defaultErrorPage)
void
setDefaultResponseCode(int defaultResponseCode)
void
setSessionCookieName(java.lang.String sessionCookieName)
java.lang.String
toString()
-
-
-
Field Detail
-
LOG
public static final int LOG
- See Also:
- Constant Field Values
-
REDIRECT
public static final int REDIRECT
- See Also:
- Constant Field Values
-
BLOCK
public static final int BLOCK
- See Also:
- Constant Field Values
-
OPERATOR_EQ
public static final int OPERATOR_EQ
- See Also:
- Constant Field Values
-
OPERATOR_CONTAINS
public static final int OPERATOR_CONTAINS
- See Also:
- Constant Field Values
-
OPERATOR_IN_LIST
public static final int OPERATOR_IN_LIST
- See Also:
- Constant Field Values
-
OPERATOR_EXISTS
public static final int OPERATOR_EXISTS
- See Also:
- Constant Field Values
-
LOG_LEVEL
public static org.apache.log4j.Level LOG_LEVEL
-
LOG_DIRECTORY
public static java.lang.String LOG_DIRECTORY
-
DEFAULT_FAIL_ACTION
public static int DEFAULT_FAIL_ACTION
-
DEFAULT_CHARACTER_ENCODING
public static java.lang.String DEFAULT_CHARACTER_ENCODING
-
DEFAULT_CONTENT_TYPE
public static java.lang.String DEFAULT_CONTENT_TYPE
-
JAVASCRIPT_TARGET_TOKEN
public static final java.lang.String JAVASCRIPT_TARGET_TOKEN
- See Also:
- Constant Field Values
-
JAVASCRIPT_REDIRECT
public static final java.lang.String JAVASCRIPT_REDIRECT
- See Also:
- Constant Field Values
-
-
Method Detail
-
getSessionCookieName
public java.lang.String getSessionCookieName()
-
setSessionCookieName
public void setSessionCookieName(java.lang.String sessionCookieName)
-
getDefaultErrorPage
public java.lang.String getDefaultErrorPage()
-
setDefaultErrorPage
public void setDefaultErrorPage(java.lang.String defaultErrorPage)
-
getDefaultResponseCode
public int getDefaultResponseCode()
-
setDefaultResponseCode
public void setDefaultResponseCode(int defaultResponseCode)
-
getBeforeBodyRules
public java.util.List<Rule> getBeforeBodyRules()
-
getAfterBodyRules
public java.util.List<Rule> getAfterBodyRules()
-
getBeforeResponseRules
public java.util.List<Rule> getBeforeResponseRules()
-
getCookieRules
public java.util.List<Rule> getCookieRules()
-
addBeforeBodyRule
public void addBeforeBodyRule(Rule r)
-
addAfterBodyRule
public void addAfterBodyRule(Rule r)
-
addBeforeResponseRule
public void addBeforeResponseRule(Rule r)
-
addCookieRule
public void addCookieRule(Rule r)
-
setApplyHTTPOnlyFlagToSessionCookie
public void setApplyHTTPOnlyFlagToSessionCookie(boolean shouldApply)
-
setApplySecureFlagToSessionCookie
public void setApplySecureFlagToSessionCookie(boolean shouldApply)
-
isUsingHttpOnlyFlagOnSessionCookie
public boolean isUsingHttpOnlyFlagOnSessionCookie()
-
isUsingSecureFlagOnSessionCookie
public boolean isUsingSecureFlagOnSessionCookie()
-
toString
public java.lang.String toString()
- Overrides:
toString
in classjava.lang.Object
-
-