modsecure

package
v0.0.0-...-59d1934 Latest Latest
Warning

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

Go to latest
Published: Jun 3, 2019 License: Apache-2.0, MIT Imports: 11 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func JumpToNextValidStart

func JumpToNextValidStart(reader *readBuffer, historyBuffer *strings.Builder) (err error)

Types

type EStructure

type EStructure int
const (
	NIL         EStructure = -1
	AuditHeader EStructure = iota
	RequestHeader
	RequestBody
	IntendedResponseHeader
	IntendedResponseBody
	ResponseHeader
	ResponseBody
	AuditLogTrailer
	ReducedMultipartRequestBody
	MultipartFilesInformation
	MatchedRulesInformation
	AuditLogFooter
)

type Record

type Record struct {
	Id                          string                               `json:"id"`
	AuditHeader                 *SectionAAuditHeader                 `json:"auditHeader"`
	RequestHeader               *SectionBRequestHeader               `json:"requestHeader"`
	RequestBody                 []string                             `json:"requestBody"`
	IntendedResponseHeader      *SectionDIntendedResponseHeader      `json:"intendedResponseHeader"`
	IntendedResponseBody        *SectionEIntendedResponseBody        `json:"intendedResponseBody"`
	ResponseHeader              *SectionFResponseHeaders             `json:"responseHeader"`
	ResponseBody                []string                             `json:"ResponseBody"`
	AuditLogTrailer             *SectionHAuditLogTrailer             `json:"auditLogTrailer"`
	ReducedMultipartRequestBody *SectionIReducedMultipartRequestBody `json:"reducedMultipartRequestBody"`
	MultipartFilesInformation   *SectionJMultipartFileInformation    `json:"multipartFilesInformation"`
	MatchedRulesInformation     *SectionKMatchedRuleInformation      `json:"matchedRulesInformation"`
	AuditLogFooter              *SectionZAuditLogFooter              `json:"auditLogFooter"`
	RecordLine                  int                                  `json:"recordLine"`
}

+k8s:openapi-gen=true

func ReadSingleRecord

func ReadSingleRecord(reader *readBuffer, historyBuffer *strings.Builder) (record *Record, err error)

func (*Record) ReadSection

func (r *Record) ReadSection(reader *readBuffer, historyBuffer *strings.Builder) (err error)

type RecordAndRaw

type RecordAndRaw struct {
	Record *Record
	Raw    string
}

type RecordReader

type RecordReader struct {
	Err error
	// contains filtered or unexported fields
}

func CreateRecordReader

func CreateRecordReader(filename string, debugSkipper bool) (reader *RecordReader, err error)

func (*RecordReader) HasNext

func (r *RecordReader) HasNext() bool

func (*RecordReader) Iter

func (r *RecordReader) Iter() <-chan *Record

func (*RecordReader) IterLossy

func (r *RecordReader) IterLossy() <-chan *RecordAndRaw

func (*RecordReader) Next

func (r *RecordReader) Next(historyBuffer *strings.Builder) (record *Record, err error)

func (*RecordReader) PeekToNextValidStart

func (r *RecordReader) PeekToNextValidStart(historyBuffer *strings.Builder) (err error)

type SectionAAuditHeader

type SectionAAuditHeader struct {
	Timestamp       time.Time `json:"timestamp"`
	TransactionID   string    `json:"transactionId"`
	SourceIP        net.IP    `json:"sourceIp"`
	SourcePort      uint16    `json:"sourcePort"`
	DestinationIP   net.IP    `json:"destinationIp"`
	DestinationPort uint16    `json:"destinationPort"`
}

+k8s:openapi-gen=true

type SectionBRequestHeader

type SectionBRequestHeader struct {
	Protocol string             `json:"protocol"`
	Method   string             `json:"method"`
	Path     string             `json:"path"`
	Header   *map[string]string `json:"header"`
}

+k8s:openapi-gen=true

type SectionCRequestBody

type SectionCRequestBody struct {
}

+k8s:openapi-gen=true

type SectionDIntendedResponseHeader

type SectionDIntendedResponseHeader struct {
}

+k8s:openapi-gen=true

type SectionEIntendedResponseBody

type SectionEIntendedResponseBody struct {
}

+k8s:openapi-gen=true

type SectionFResponseHeaders

type SectionFResponseHeaders struct {
	Protocol string             `json:"protocol"`
	Status   uint16             `json:"status"`
	Header   *map[string]string `json:"header"`
}

+k8s:openapi-gen=true

type SectionGResponseBody

type SectionGResponseBody struct {
}

+k8s:openapi-gen=true

type SectionHAuditLogTrailer

type SectionHAuditLogTrailer struct {
}

+k8s:openapi-gen=true

type SectionIReducedMultipartRequestBody

type SectionIReducedMultipartRequestBody struct {
}

+k8s:openapi-gen=true

type SectionJMultipartFileInformation

type SectionJMultipartFileInformation struct {
}

+k8s:openapi-gen=true

type SectionKMatchedRuleInformation

type SectionKMatchedRuleInformation struct {
}

+k8s:openapi-gen=true

type SectionZAuditLogFooter

type SectionZAuditLogFooter struct {
}

+k8s:openapi-gen=true

Jump to

Keyboard shortcuts

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