# Packages
Package variables contains the representation of the variables used in the rules Variables are created as bytes and they have a string representation.
# Functions
ParseAuditEngineStatus parses the audit engine status.
ParseAuditLogParts parses the audit log parts.
ParseRuleEngineStatus parses the rule engine status.
ParseRulePhase parses the phase of the rule from a to 5 or request:2, response:4, logging:5 if the phase is invalid it will return an error.
ParseRuleSeverity parses a string into a RuleSeverity.
# Constants
AuditEngineOff will not audit any event.
AuditEngineOn will audit each auditable event.
AuditEngineRelevantOnly will audit only relevant events.
AuditLogPartAuditLogTrailer is the audit log trailer part.
AuditLogPartIntermediaryResponseBody is the intermediary response body part.
AuditLogPartIntermediaryResponseHeaders is the intermediary response headers part.
AuditLogPartRequestBody is the request body part.
AuditLogPartRequestBodyAlternative is the request body replaced part.
AuditLogPartRequestHeaders is the request headers part.
AuditLogPartResponseBody is the final response body part.
AuditLogPartResponseHeaders is the final response headers part.
AuditLogPartRulesMatched is the matched rules part.
AuditLogPartUploadedFiles is the uploaded files part.
BodyLimitActionProcessPartial will process the body up to the limit and then ignores the remaining body bytes.
BodyLimitActionReject will reject the connection in case the body size exceeds the configured limit.
PhaseLogging will process once the request is sent This phase will always run.
PhaseRequestBody will process once the request body is received.
PhaseRequestHeaders will process once the request headers are received.
PhaseResponseBody will process once the response body is received.
PhaseResponseHeaders will process once the response headers are received.
PhaseUnknown represents a phase unrecognized by Coraza.
RuleEngineDetectionOnly will process each rule but won't generate disruptive actions.
RuleEngineOff will not process any rule.
RuleEngineOn will process each rule and may generate disruptive actions.
RuleSeverityAlert represents the alert severity.
RuleSeverityCritical represents the critical severity.
RuleSeverityDebug represents the debug severity.
RuleSeverityEmergency represents the emergency severity We "shold" exit the process immediately.
RuleSeverityError represents the error severity.
RuleSeverityInfo represents the info severity.
RuleSeverityNotice represents the notice severity.
RuleSeverityWarning represents the warning severity.
# Structs
BodyBufferOptions is used to feed a coraza.BodyBuffer with parameters.
Interruption is used to notify the Coraza implementation that the transaction must be disrupted, for example:
if it := tx.Interruption; it != nil { return show403() }.
# Interfaces
MatchData works like VariableKey but is used for logging, so it contains the collection as a string, and it's value.
MatchedRule contains a list of macro expanded messages, matched variables and a pointer to the rule.
RuleMetadata is used to store rule metadata that can be used across packages.
Transaction is created from a WAF instance to handle web requests and responses, it contains a copy of most WAF configurations that can be safely changed.
# Type aliases
AuditEngineStatus represents the functionality of the audit engine.
No description provided by the author
AuditLogParts represents the parts of the audit log A: Audit log header (mandatory).
BodyLimitAction represents the action to take when the body size exceeds the configured limit.
RuleEngineStatus represents the functionality of the rule engine.
RulePhase is the phase of the rule.
RuleSeverity represents the severity of a triggered rule It can have a numeric value or string value There are 8 levels of severity: 0 - Emergency 1 - Alert 2 - Critical 3 - Error 4 - Warning 5 - Notice 6 - Info 7 - Debug RuleSeverity is used by error callbacks to chose wether to log the error or not.