actions

package
v1.2.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Sep 10, 2021 License: Apache-2.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

View Source
const (
	CTL_REMOVE_TARGET_BY_ID    = 0
	CTL_REMOVE_TARGET_BY_TAG   = 1
	CTL_REMOVE_TARGET_BY_MSG   = 2
	CTL_AUDIT_ENGINE           = 3
	CTL_AUDIT_LOG_PARTS        = 4
	CTL_FORCE_REQUEST_BODY_VAR = 5
	CTL_REQUEST_BODY_ACCESS    = 6
	CTL_REQUEST_BODY_LIMIT     = 7
	CTL_RULE_ENGINE            = 8
	CTL_RULE_REMOVE_BY_ID      = 9
	CTL_RULE_REMOVE_BY_MSG     = 10
	CTL_RULE_REMOVE_BY_TAG     = 11
	CTL_HASH_ENGINE            = 12
	CTL_HASH_ENFORCEMENT       = 13
	CTL_REQUEST_BODY_PROCESSOR = 14
	CTL_RESPONSE_BODY_ACCESS   = 15
	CTL_RESPONSE_BODY_LIMIT    = 16
	CTL_DEBUG_LOG_LEVEL        = 17
)

Variables

View Source
var HTTP_STATUSES = []int{100, 101, 102, 103, 200,
	201, 202, 203, 200, 204, 205, 206, 207, 208,
	226, 300, 301, 302, 303, 304, 305, 306, 307,
	302, 308, 301, 400, 401, 402, 403, 404, 405,
	406, 407, 408, 409, 410, 411, 412, 413, 414,
	415, 416, 417, 418, 421, 422, 423, 424, 426,
	428, 429, 431, 451, 500, 501, 502, 503, 504,
	505, 506, 507, 508, 510, 511, 511}

Functions

func ActionsMap

func ActionsMap() map[string]engine.RuleAction

Types

type Allow

type Allow struct {
	// contains filtered or unexported fields
}

0 nothing, 1 phase, 2 request

func (*Allow) Evaluate

func (a *Allow) Evaluate(r *engine.Rule, tx *engine.Transaction)

func (*Allow) Init

func (a *Allow) Init(r *engine.Rule, b1 string) error

func (*Allow) Type

func (a *Allow) Type() int

type Append

type Append struct {
	// contains filtered or unexported fields
}

func (*Append) Evaluate

func (a *Append) Evaluate(r *engine.Rule, tx *engine.Transaction)

func (*Append) Init

func (a *Append) Init(r *engine.Rule, data string) error

func (*Append) Type

func (a *Append) Type() int

type Auditlog

type Auditlog struct{}

func (*Auditlog) Evaluate

func (a *Auditlog) Evaluate(r *engine.Rule, tx *engine.Transaction)

func (*Auditlog) Init

func (a *Auditlog) Init(r *engine.Rule, data string) error

func (*Auditlog) Type

func (a *Auditlog) Type() int

type Block

type Block struct{}

func (*Block) Evaluate

func (a *Block) Evaluate(r *engine.Rule, tx *engine.Transaction)

func (*Block) Init

func (a *Block) Init(r *engine.Rule, b1 string) error

func (*Block) Type

func (a *Block) Type() int

type Capture

type Capture struct{}

func (*Capture) Evaluate

func (a *Capture) Evaluate(r *engine.Rule, tx *engine.Transaction)

func (*Capture) Init

func (a *Capture) Init(r *engine.Rule, b1 string) error

func (*Capture) Type

func (a *Capture) Type() int

type Chain

type Chain struct{}

func (*Chain) Evaluate

func (a *Chain) Evaluate(r *engine.Rule, tx *engine.Transaction)

func (*Chain) Init

func (a *Chain) Init(r *engine.Rule, b1 string) error

func (*Chain) Type

func (a *Chain) Type() int

type Ctl

type Ctl struct {
	Action     int
	Value      string
	Collection byte
	ColKey     string
}

func (*Ctl) Evaluate

func (a *Ctl) Evaluate(r *engine.Rule, tx *engine.Transaction)

func (*Ctl) Init

func (a *Ctl) Init(r *engine.Rule, data string) error

func (*Ctl) Type

func (a *Ctl) Type() int

type Deny

type Deny struct{}

func (*Deny) Evaluate

func (a *Deny) Evaluate(r *engine.Rule, tx *engine.Transaction)

func (*Deny) Init

func (a *Deny) Init(r *engine.Rule, data string) error

func (*Deny) Type

func (a *Deny) Type() int

type Drop

type Drop struct{}

func (*Drop) Evaluate

func (a *Drop) Evaluate(r *engine.Rule, tx *engine.Transaction)

func (*Drop) Init

func (a *Drop) Init(r *engine.Rule, data string) error

func (*Drop) Type

func (a *Drop) Type() int

type Exec

type Exec struct {
	// contains filtered or unexported fields
}

func (*Exec) Evaluate

func (a *Exec) Evaluate(r *engine.Rule, tx *engine.Transaction)

func (*Exec) Init

func (a *Exec) Init(r *engine.Rule, data string) error

func (*Exec) Type

func (a *Exec) Type() int

type Expirevar

type Expirevar struct {
	// contains filtered or unexported fields
}

func (*Expirevar) Evaluate

func (a *Expirevar) Evaluate(r *engine.Rule, tx *engine.Transaction)

func (*Expirevar) Init

func (a *Expirevar) Init(r *engine.Rule, data string) error

func (*Expirevar) Type

func (a *Expirevar) Type() int

type Id

type Id struct {
}

func (*Id) Evaluate

func (a *Id) Evaluate(r *engine.Rule, tx *engine.Transaction)

func (*Id) Init

func (a *Id) Init(r *engine.Rule, data string) error

func (*Id) Type

func (a *Id) Type() int

type InitCol

type InitCol struct {
	// contains filtered or unexported fields
}

Initializes a persistent collection and add the data to the standard collections engine.

func (*InitCol) Evaluate

func (a *InitCol) Evaluate(r *engine.Rule, tx *engine.Transaction)

func (*InitCol) Init

func (a *InitCol) Init(r *engine.Rule, data string) error

func (*InitCol) Type

func (a *InitCol) Type() int

type Log

type Log struct {
}

func (*Log) Evaluate

func (a *Log) Evaluate(r *engine.Rule, tx *engine.Transaction)

func (*Log) Init

func (a *Log) Init(r *engine.Rule, data string) error

func (*Log) Type

func (a *Log) Type() int

type Logdata

type Logdata struct {
}

func (*Logdata) Evaluate

func (a *Logdata) Evaluate(r *engine.Rule, tx *engine.Transaction)

func (*Logdata) Init

func (a *Logdata) Init(r *engine.Rule, data string) error

func (*Logdata) Type

func (a *Logdata) Type() int

type Maturity

type Maturity struct {
}

func (*Maturity) Evaluate

func (a *Maturity) Evaluate(r *engine.Rule, tx *engine.Transaction)

func (*Maturity) Init

func (a *Maturity) Init(r *engine.Rule, data string) error

func (*Maturity) Type

func (a *Maturity) Type() int

type Msg

type Msg struct {
}

func (*Msg) Evaluate

func (a *Msg) Evaluate(r *engine.Rule, tx *engine.Transaction)

func (*Msg) Init

func (a *Msg) Init(r *engine.Rule, data string) error

func (*Msg) Type

func (a *Msg) Type() int

type MultiMatch

type MultiMatch struct {
}

func (*MultiMatch) Evaluate

func (a *MultiMatch) Evaluate(r *engine.Rule, tx *engine.Transaction)

func (*MultiMatch) Init

func (a *MultiMatch) Init(r *engine.Rule, data string) error

func (*MultiMatch) Type

func (a *MultiMatch) Type() int

type NoAuditlog

type NoAuditlog struct {
}

func (*NoAuditlog) Evaluate

func (a *NoAuditlog) Evaluate(r *engine.Rule, tx *engine.Transaction)

func (*NoAuditlog) Init

func (a *NoAuditlog) Init(r *engine.Rule, data string) error

func (*NoAuditlog) Type

func (a *NoAuditlog) Type() int

type Nolog

type Nolog struct {
}

func (*Nolog) Evaluate

func (a *Nolog) Evaluate(r *engine.Rule, tx *engine.Transaction)

func (*Nolog) Init

func (a *Nolog) Init(r *engine.Rule, data string) error

func (*Nolog) Type

func (a *Nolog) Type() int

type Pass

type Pass struct {
}

func (*Pass) Evaluate

func (a *Pass) Evaluate(r *engine.Rule, tx *engine.Transaction)

func (*Pass) Init

func (a *Pass) Init(r *engine.Rule, data string) error

func (*Pass) Type

func (a *Pass) Type() int

type Phase

type Phase struct{}

func (*Phase) Evaluate

func (a *Phase) Evaluate(r *coraza.Rule, tx *coraza.Transaction)

func (*Phase) Init

func (a *Phase) Init(r *coraza.Rule, data string) error

func (*Phase) Type

func (a *Phase) Type() int

type Prepend added in v1.2.0

type Prepend struct {
	// contains filtered or unexported fields
}

func (*Prepend) Evaluate added in v1.2.0

func (a *Prepend) Evaluate(r *engine.Rule, tx *engine.Transaction)

func (*Prepend) Init added in v1.2.0

func (a *Prepend) Init(r *engine.Rule, data string) error

func (*Prepend) Type added in v1.2.0

func (a *Prepend) Type() int

type Rev

type Rev struct {
}

func (*Rev) Evaluate

func (a *Rev) Evaluate(r *engine.Rule, tx *engine.Transaction)

func (*Rev) Init

func (a *Rev) Init(r *engine.Rule, data string) error

func (*Rev) Type

func (a *Rev) Type() int

type Setvar

type Setvar struct {
	Key        string
	Value      string
	Collection byte
	IsRemove   bool
}

func (*Setvar) Evaluate

func (a *Setvar) Evaluate(r *engine.Rule, tx *engine.Transaction)

func (*Setvar) Init

func (a *Setvar) Init(r *engine.Rule, data string) error

this action win run even if rule is not triggered.!

func (*Setvar) Type

func (a *Setvar) Type() int

type Severity

type Severity struct {
}

func (*Severity) Evaluate

func (a *Severity) Evaluate(r *engine.Rule, tx *engine.Transaction)

func (*Severity) Init

func (a *Severity) Init(r *engine.Rule, data string) error

func (*Severity) Type

func (a *Severity) Type() int

type Skip

type Skip struct {
	// contains filtered or unexported fields
}

NOT IMPLEMENTED

func (*Skip) Evaluate

func (a *Skip) Evaluate(r *engine.Rule, tx *engine.Transaction)

func (*Skip) Init

func (a *Skip) Init(r *engine.Rule, data string) error

func (*Skip) Type

func (a *Skip) Type() int

type SkipAfter

type SkipAfter struct {
	// contains filtered or unexported fields
}

func (*SkipAfter) Evaluate

func (a *SkipAfter) Evaluate(r *engine.Rule, tx *engine.Transaction)

func (*SkipAfter) Init

func (a *SkipAfter) Init(r *engine.Rule, data string) error

NOT IMPLEMENTED

func (*SkipAfter) Type

func (a *SkipAfter) Type() int

type Status

type Status struct {
	// contains filtered or unexported fields
}

func (*Status) Evaluate

func (a *Status) Evaluate(r *engine.Rule, tx *engine.Transaction)

func (*Status) Init

func (a *Status) Init(r *engine.Rule, b1 string) error

func (*Status) Type

func (a *Status) Type() int

type T

type T struct{}

func (*T) Evaluate

func (a *T) Evaluate(r *engine.Rule, tx *engine.Transaction)

func (*T) Init

func (a *T) Init(r *engine.Rule, input string) error

func (*T) Type

func (a *T) Type() int

type Tag

type Tag struct {
}

func (*Tag) Evaluate

func (a *Tag) Evaluate(r *engine.Rule, tx *engine.Transaction)

func (*Tag) Init

func (a *Tag) Init(r *engine.Rule, data string) error

func (*Tag) Type

func (a *Tag) Type() int

type Ver

type Ver struct {
}

func (*Ver) Evaluate

func (a *Ver) Evaluate(r *engine.Rule, tx *engine.Transaction)

func (*Ver) Init

func (a *Ver) Init(r *engine.Rule, data string) error

func (*Ver) Type

func (a *Ver) Type() int

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL