firewall
Method Summary | |
public firewall |
init([any configurator="DefaultConfigurator"])
Initializes the Firewall, and returns a reference to itself |
public void |
addFilter(any filterInstance)
Adds a filter object to the firewall. |
public void |
addLogger(any logger)
Adds a logger to the firewall. |
public boolean |
allowRequest([string ip_address="#cgi.remote_addr#"])
Invokes each filter, and returns false if the request should be blocked. |
public void |
deRegisterEventListener(any listener)
Registers a listners.EventListener instance |
public void |
dumpConfiguration()
Dumps the configuration of the firewall instance. |
public any |
getAuthenticator()
Returns the authenticator object used for user authentication and management. |
public string |
getConfiguratorName()
Returns the name of the configurator used to configure this firewall instance |
public variablename |
getDatasource()
Returns the datasource name specified with setDatasource |
public date |
getDateConfigured()
Returns the date at which the firewall was started, or reconfigured last. |
public any |
getDefaultBlockHTML()
Returns the Default Block HTML |
public numeric |
getDefaultBlockLevel()
Returns the Default Block Level |
public numeric |
getDefaultFilterLevel()
Returns the Default Filter Level |
public numeric |
getDefaultLogLevel()
Returns the Default Log Level |
public boolean |
getFailOpen()
If true an internal exception will not cause the request to be blocked |
public any |
getFilterAt(numeric index)
Returns the filter object at the specified index |
public numeric |
getFilterCount()
Returns the number of filters in the array |
public array |
getFilters()
Returns an array of filters in use by the firewall |
public string |
getInstanceID()
Returns the FuseGuard Instance ID |
public string |
getLicenseKey()
Returns the FuseGuard License Key |
public any |
getLogReader()
I return the log reader component if avaliable |
public string |
getReInitializeKey()
hisValue |
public string |
getRequestIPAddress()
Returns the IP address of the requestor |
public any |
getURLBuilder()
Returns the instance of BaseURLBuilder that is used to create urls within FuseGuard manager. |
public boolean |
getUseXForwardedFor()
Returns true if FuseGuard will attempt to use X-Forwarded-For header for the end user IP address |
public string |
getVersion()
Returns the major.minor version number of the firewall: 2.4 |
public boolean |
getWebManagerEnabled()
Returns true if the log viewer is enabled |
public boolean |
hasAuthenticator()
Returns true if setAuthenticator has been called. |
public boolean |
hasFilterInstanceNamed([string name])
Returns true if there is a filter with the specified instance name |
public boolean |
isConfigured()
Returns true if the firewall has been configured. |
public any |
newAuthenticatorInstance(variablename authenticatorName)
returns a new instance of an authenticator object |
public any |
newFilterInstance(variableName filterName)
returns a new instance of a filter |
public any |
newListenerInstance(variableName listenerName)
returns a new instance of an event listener |
public any |
newLoggerInstance(variableName loggerName)
returns a new instance of a logger object |
public boolean |
processRequest([string ip_address="#cgi.remote_addr#"], [boolean abort="true"], [boolean outputBlockHTML="true"])
Called in the Application.cfc or Application.cfm to invoke the firewall |
public void |
reconfigure([any configurator="DefaultConfigurator"])
Call This method any time you make a configuration change, to reload the configuration |
public void |
registerEventListener(any listener)
Registers a listners.EventListener instance |
public any |
runCloudLicense()
Used to track hourly billing for cloud licenses. |
public void |
setAuthenticator(any authenticator)
Specify the authenticator object |
public void |
setConfigured(boolean configured)
Set by framework when firewall has been configured. |
public void |
setDatasource(variablename datasource)
Sets a datasource for the firewall that filters loggers, or listeners may optionally use. We recommend that you create a seperate database, and use a restricted login for the FuseGuard database. |
public void |
setDefaultBlockLevel(numeric level)
Sets the Default Block Level |
public void |
setDefaultFilterLevel(numeric level)
Sets the Default Filter Level |
public void |
setDefaultLogLevel(numeric level)
Sets the Default Log Level |
public void |
setFailOpen([boolean failOpen="false"])
Set to false if you the request blocked when an internal exception occurrs. |
public void |
setInstanceID([string key])
Sets the FuseGuard Instance ID |
public void |
setLicenseKey([string key])
Sets the FuseGuard License Key |
public void |
setReInitializeKey([string key])
hisValue |
public void |
setURLBuilder(any builder)
Sets an instance of fuseguard.components.configurators.BaseURLBuilder to construct URL's used within FuseGuard manager UI. |
public void |
setUseXForwardedFor([boolean enable="false"])
If set true FuseGuard will attempt to use X-Forwarded-For HTTP header to determine the end users IP address. If set true and the header is not present the cgi.remote_addr default will be used. |
public void |
setVerboseLogging(boolean verbose)
Turns on or off verbose logging for all loggers. Note that you can also set this individually for each logger by calling their setVerbose function. |
public void |
setWebManagerEnabled(boolean enabled)
Turns support for a web interface to view logs on or off. Disabled by default. |
public boolean |
shouldReInitialize()
Returns true if the reinit key is passed in the url properly |
public any |
stopCloudLicenseThread()
Stops execution of cloud license reporting thread, may not stop right away. |
public string |
stringCleaner(string text, [string mode="escape"], [numeric maxLength="0"])
Attempts to remove or escape bad characters from a string. |
Method Detail |
public void addFilter(any filterInstance)
any filterInstance
- should be an instance of firewall.components.filters.BaseFilterpublic void addLogger(any logger)
any logger
- an instance of a a BaseLoggerpublic boolean allowRequest([string ip_address="#cgi.remote_addr#"])
[string ip_address="#cgi.remote_addr#"]
- Pass in an IP address, if cgi.remote_addr is not valid. This may be the case if your web server is behind a proxy or load balancer. Pass in the value x-forwarded-for to use the X-Forwarded-For header value.public void deRegisterEventListener(any listener)
any listener
- listeners.EventListener objectpublic void dumpConfiguration()
public any getAuthenticator()
public string getConfiguratorName()
public variablename getDatasource()
public date getDateConfigured()
public any getDefaultBlockHTML()
public numeric getDefaultBlockLevel()
public numeric getDefaultFilterLevel()
public numeric getDefaultLogLevel()
public boolean getFailOpen()
public any getFilterAt(numeric index)
numeric index
public numeric getFilterCount()
public array getFilters()
public string getInstanceID()
public string getLicenseKey()
public any getLogReader()
public string getReInitializeKey()
public string getRequestIPAddress()
public any getURLBuilder()
public boolean getUseXForwardedFor()
public string getVersion()
public boolean getWebManagerEnabled()
public boolean hasAuthenticator()
public boolean hasFilterInstanceNamed([string name])
[string name]
public firewall init([any configurator="DefaultConfigurator"])
[any configurator="DefaultConfigurator"]
- The name of the configurator component, eg: StrictConfiguratorpublic boolean isConfigured()
public any newAuthenticatorInstance(variablename authenticatorName)
variablename authenticatorName
public any newFilterInstance(variableName filterName)
variableName filterName
public any newListenerInstance(variableName listenerName)
variableName listenerName
public any newLoggerInstance(variableName loggerName)
variableName loggerName
public boolean processRequest([string ip_address="#cgi.remote_addr#"], [boolean abort="true"], [boolean outputBlockHTML="true"])
[string ip_address="#cgi.remote_addr#"]
- Pass in an IP address, if cgi.remote_addr is not valid. This may be the case if your web server is behind a proxy.[boolean abort="true"]
- If true the request will be aborted with cfabort.[boolean outputBlockHTML="true"]
- If true, it outputs the default block HTMLpublic void reconfigure([any configurator="DefaultConfigurator"])
[any configurator="DefaultConfigurator"]
- The name of the configurator component, eg: StrictConfiguratorpublic void registerEventListener(any listener)
any listener
- listeners.EventListener objectpublic any runCloudLicense()
public void setAuthenticator(any authenticator)
any authenticator
public void setConfigured(boolean configured)
boolean configured
public void setDatasource(variablename datasource)
variablename datasource
- The datasource namepublic void setDefaultBlockLevel(numeric level)
numeric level
public void setDefaultFilterLevel(numeric level)
numeric level
public void setDefaultLogLevel(numeric level)
numeric level
public void setFailOpen([boolean failOpen="false"])
[boolean failOpen="false"]
public void setInstanceID([string key])
[string key]
public void setLicenseKey([string key])
[string key]
public void setReInitializeKey([string key])
[string key]
public void setURLBuilder(any builder)
any builder
- An instance of configurators.BaseURLBuilderpublic void setUseXForwardedFor([boolean enable="false"])
[boolean enable="false"]
public void setVerboseLogging(boolean verbose)
boolean verbose
public void setWebManagerEnabled(boolean enabled)
boolean enabled
- Set to true to enable.public boolean shouldReInitialize()
public any stopCloudLicenseThread()
public string stringCleaner(string text, [string mode="escape"], [numeric maxLength="0"])
string text
- The text to clean[string mode="escape"]
- emove will remove characters such as ; () and more.[numeric maxLength="0"]
- Maximum number of characters to output. If Zero length is not limited.