firewall
Method Summary | |
public firewall |
init([any configurator="DefaultConfigurator"], [any configName="Default"])
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 string |
encodeHTML([any str])
Runs encodeForHTML if supported otherwise xmlFormat |
public string |
encodeHTMLAttribute([any str])
Runs encodeForHTMLAttribute if supported otherwise xmlForamt |
public any |
getAuthenticator()
Returns the authenticator object used for user authentication and management. |
public string |
getConfigName()
Returns the name of the configuration for this firewall instance |
public array |
getConfigurables()
Returns an array of configurable properties |
public any |
getConfiguratorInstance()
Returns the configurator object instance |
public string |
getConfiguratorName()
Returns the name of the configurator used to configure this firewall instance |
public string |
getDatasource()
Returns the datasource name specified with setDatasource |
public variablename |
getDatasourceType()
Returns the type of database derby, mysql, sqlserver, postgresql or unknown |
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 boolean |
getIgnoreRequestBodyOnMultipartRequests()
When true FuseGuard will skip the request body when processing multipart requests (such as file uploads). The FileUploadFilter and FileUploadContentFilter ignore this setting, they will still inspect file uploads when enabled. |
public boolean |
getIgnoreRequestBodyOnSOAPRequests()
When true FuseGuard will skip the request body when processing SOAP requests |
public string |
getInstanceID()
Returns the FuseGuard Instance ID |
public any |
getIPListManager()
Returns the IP list manager object |
public any |
getLastException()
Returns last exception thrown |
public string |
getLicenseKey()
Returns the FuseGuard License Key |
public any |
getLogReader()
I return the log reader component if avaliable |
public any |
getManagerController()
Returns the controller for FuseGuard manager requests |
public string |
getMaskLogValues()
Returns the values that are to be masked in log detail. |
public string |
getReInitializeKey()
hisValue. Note that the url variable name fuseguard_reinit can be changed by calling setReInitializeVariable |
public string |
getReInitializeVariable()
the url variable name that FuseGuard looks for to compare with the value of getReInitializeKey() in order to reinitialize FuseGuard. |
public string |
getRequestID()
Returns a request id in the form of a UUID, generates one if necessary. |
public string |
getRequestIPAddress()
Returns the IP address of the requestor |
public date |
getTrialStartDate()
Returns the date that the trial started. If not running in trial mode then it will always return current date. |
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: 3.6.0 |
public boolean |
getWebManagerEnabled()
Returns true if the log viewer is enabled |
public string |
getWebManagerIPWhiteList()
Returns an IP List ID |
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 boolean |
isFuseGuardEnabled()
Returns true if FuseGuard is enabled |
public boolean |
isFuseGuardTrial()
Returns true if running in Free Trial Mode |
public boolean |
isLogOnlyMode()
Returns true if log only mode is enabled. |
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 |
newIPListProviderInstance(variableName providerName)
returns a new instance of an ip list provider |
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"], [any configName="#variables.configName#"])
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 boolean |
removeFilterAt(numeric index)
Removes the filter at a given index. Should only be called from a configurator. |
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(string 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 |
setDatasourceType(variablename datasourceType)
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 |
setFuseGuardEnabled([boolean enabled="true"])
Enable or Disable FuseGuard from processing / logging / blocking requests |
public void |
setIgnoreRequestBodyOnMultipartRequests([boolean ignore="false"])
When true Tells FuseGuard to skip the request body when processing multipart requests (such as file uploads). The FileUploadFilter and FileUploadContentFilter ignore this setting, they will still inspect file uploads when enabled. |
public void |
setIgnoreRequestBodyOnSOAPRequests([boolean ignore="false"])
When true Tells FuseGuard to skip the request body when processing SOAP requests. |
public void |
setInstanceID([string key])
Sets the FuseGuard Instance ID |
public void |
setLicenseKey([string key])
Sets the FuseGuard License Key |
public void |
setLogOnlyMode([boolean enabled="true"])
When set to true, prevents FuseGuard from blocking requests. Filters can still log information about the request. |
public void |
setMaskLogValues([string names])
Sets the values that are to be masked in log detail. |
public void |
setReInitializeKey([string key])
hisValue. Note that the url variable name fuseguard_reinit can be changed by calling setReInitializeVariable |
public void |
setReInitializeVariable([variablename varName="fuseguard_reinit"])
Set the url variable name that FuseGuard looks for to compare with the value of getReInitializeKey() in order to reinitialize FuseGuard. |
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. |
public void |
setWebManagerIPWhiteList(string listID)
Allows you to specify a IP List to act as a Whitelist for accessing FuseGuard Manager |
public boolean |
shouldReInitialize()
Returns true if the reinit key is passed in the url properly |
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 string encodeHTML([any str])
[any str]
public string encodeHTMLAttribute([any str])
[any str]
public any getAuthenticator()
public string getConfigName()
public array getConfigurables()
public any getConfiguratorInstance()
public string getConfiguratorName()
public string getDatasource()
public variablename getDatasourceType()
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 boolean getIgnoreRequestBodyOnMultipartRequests()
public boolean getIgnoreRequestBodyOnSOAPRequests()
public string getInstanceID()
public any getIPListManager()
public any getLastException()
public string getLicenseKey()
public any getLogReader()
public any getManagerController()
public string getMaskLogValues()
public string getReInitializeKey()
public string getReInitializeVariable()
public string getRequestID()
public string getRequestIPAddress()
public date getTrialStartDate()
public any getURLBuilder()
public boolean getUseXForwardedFor()
public string getVersion()
public boolean getWebManagerEnabled()
public string getWebManagerIPWhiteList()
public boolean hasAuthenticator()
public boolean hasFilterInstanceNamed([string name])
[string name]
public firewall init([any configurator="DefaultConfigurator"], [any configName="Default"])
[any configurator="DefaultConfigurator"]
- The name of the configurator component, eg: StrictConfigurator[any configName="Default"]
- The name of the configuration set to use.public boolean isConfigured()
public boolean isFuseGuardEnabled()
public boolean isFuseGuardTrial()
public boolean isLogOnlyMode()
public any newAuthenticatorInstance(variablename authenticatorName)
variablename authenticatorName
public any newFilterInstance(variableName filterName)
variableName filterName
public any newIPListProviderInstance(variableName providerName)
variableName providerName
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 configName="#variables.configName#"])
[any configurator="DefaultConfigurator"]
- The name of the configurator component, eg: StrictConfigurator. Or an instance of a Configurator Component.[any configName="#variables.configName#"]
- The name of the configuration set to use.public void registerEventListener(any listener)
any listener
- listeners.EventListener objectpublic boolean removeFilterAt(numeric index)
numeric index
public void setAuthenticator(any authenticator)
any authenticator
public void setConfigured(boolean configured)
boolean configured
public void setDatasource(string datasource)
string datasource
- The datasource namepublic void setDatasourceType(variablename datasourceType)
variablename datasourceType
- 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 setFuseGuardEnabled([boolean enabled="true"])
[boolean enabled="true"]
- Enable or disablepublic void setIgnoreRequestBodyOnMultipartRequests([boolean ignore="false"])
[boolean ignore="false"]
public void setIgnoreRequestBodyOnSOAPRequests([boolean ignore="false"])
[boolean ignore="false"]
public void setInstanceID([string key])
[string key]
public void setLicenseKey([string key])
[string key]
public void setLogOnlyMode([boolean enabled="true"])
[boolean enabled="true"]
- Enable or disablepublic void setMaskLogValues([string names])
[string names]
public void setReInitializeKey([string key])
[string key]
public void setReInitializeVariable([variablename varName="fuseguard_reinit"])
[variablename varName="fuseguard_reinit"]
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 void setWebManagerIPWhiteList(string listID)
string listID
- Set to a list ID.public boolean shouldReInitialize()
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.