waf_traffic_log

package
v0.14.2 Latest Latest
Warning

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

Go to latest
Published: Jul 28, 2025 License: Apache-2.0 Imports: 18 Imported by: 0

Documentation

Index

Constants

View Source
const WafTrafficLogTableIdentifier = "aws_waf_traffic_log"

Variables

This section is empty.

Functions

This section is empty.

Types

type CaptchaResponse

type CaptchaResponse struct {
	ResponseCode   *int    `json:"responseCode,omitempty"`
	SolveTimestamp *int64  `json:"solveTimestamp,omitempty"`
	FailureReason  *string `json:"failureReason,omitempty"`
}

type CustomValue

type CustomValue struct {
	Key   *string `json:"key"`
	Name  *string `json:"name"`
	Value *string `json:"value"`
}
type Header struct {
	Name  string `json:"name,omitempty"`
	Value string `json:"value,omitempty"`
}

Define a nested struct for httpRequest headers

type HttpRequest

type HttpRequest struct {
	ClientIp    *string   `json:"clientIp,omitempty"`
	Country     *string   `json:"country,omitempty"`
	Headers     *[]Header `json:"headers,omitempty" parquet:"type=JSON"`
	Uri         *string   `json:"uri,omitempty"`
	Args        *string   `json:"args,omitempty"`
	HttpVersion *string   `json:"httpVersion,omitempty"`
	HttpMethod  *string   `json:"httpMethod,omitempty"`
	RequestId   *string   `json:"requestId,omitempty"`
}

Define a nested struct for the httpRequest field

type Labels

type Labels struct {
	Name *string `json:"labels,omitempty"`
}

type NonTerminatingRuleMatch

type NonTerminatingRuleMatch struct {
	RuleID           *string           `json:"ruleId"`
	Action           *string           `json:"action"`
	RuleMatchDetails []RuleMatchDetail `json:"ruleMatchDetails,omitempty"`
	CaptchaResponse  CaptchaResponse   `json:"captchaResponse,omitempty"`
}

type RateBasedRule

type RateBasedRule struct {
	RateBasedRuleID     *interface{}  `json:"rateBasedRuleId"` // Assuming ID could be a string or number
	RateBasedRuleName   *string       `json:"rateBasedRuleName"`
	LimitKey            *string       `json:"limitKey"`
	MaxRateAllowed      *int          `json:"maxRateAllowed"`
	EvaluationWindowSec *int32        `json:"evaluationWindowSec"`
	CustomValues        []CustomValue `json:"customValues" parquet:"type=JSON"`
}

RateBasedRule represents the main JSON structure

type Rule

type Rule struct {
	RuleID           *string           `json:"ruleId"`
	Action           *string           `json:"action"`
	RuleMatchDetails []RuleMatchDetail `json:"ruleMatchDetails,omitempty"`
	CaptchaResponse  CaptchaResponse   `json:"captchaResponse,omitempty"`
}

Rule represents a rule entry

type RuleGroup

type RuleGroup struct {
	RuleGroupID                 string                    `json:"ruleGroupId"`
	TerminatingRule             *Rule                     `json:"terminatingRule,omitempty"` // Can be null
	NonTerminatingMatchingRules []NonTerminatingRuleMatch `json:"nonTerminatingMatchingRules"`
	ExcludedRules               []Rule                    `json:"excludedRules,omitempty"` // Can be null
}

RuleGroup represents the main JSON structure

type RuleMatchDetail

type RuleMatchDetail struct {
	ConditionType    *string  `json:"conditionType"`
	SensitivityLevel *string  `json:"sensitivityLevel"`
	Location         *string  `json:"location"`
	MatchedData      []string `json:"matchedData"`
}

type TerminatingRuleMatch

type TerminatingRuleMatch struct {
	ConditionType    *string  `json:"conditionType"`
	SensitivityLevel *string  `json:"sensitivityLevel"`
	Location         *string  `json:"location"`
	MatchedData      []string `json:"matchedData"`
}

type WafMapper

type WafMapper struct {
}

func (*WafMapper) Identifier

func (c *WafMapper) Identifier() string

func (*WafMapper) Map

type WafTrafficLog

type WafTrafficLog struct {
	schema.CommonFields

	Action                      *string                   `json:"action"`
	CaptchaResponse             *CaptchaResponse          `json:"captchaResponse,omitempty" parquet:"name=captcha_response"`
	FormatVersion               *int32                    `json:"formatVersion" parquet:"name=format_version"`
	HttpRequest                 *HttpRequest              `json:"httpRequest,omitempty" parquet:"name=http_request"`
	HttpSourceId                *string                   `json:"httpSourceId,omitempty" parquet:"name=http_source_id"`
	HttpSourceName              *string                   `json:"httpSourceName,omitempty" parquet:"name=http_source_name"`
	Labels                      []Labels                  `json:"labels,omitempty" parquet:"type=JSON"`
	NonTerminatingMatchingRules []NonTerminatingRuleMatch `json:"nonTerminatingMatchingRules,omitempty" parquet:"name=non_terminating_matching_rules, type=JSON"`
	RateBasedRuleList           []RateBasedRule           `json:"rateBasedRuleList,omitempty" parquet:"name=rate_based_rule_list, type=JSON"`
	RequestHeadersInserted      []Header                  `json:"requestHeadersInserted,omitempty" parquet:"name=request_headers_inserted, type=JSON"`
	RuleGroupList               []RuleGroup               `json:"ruleGroupList,omitempty" parquet:"name=rule_group_list, type=JSON"`
	TerminatingRuleId           *string                   `json:"terminatingRuleId,omitempty" parquet:"name=terminating_rule_id"`
	TerminatingRuleMatchDetails []TerminatingRuleMatch    `json:"terminatingRuleMatchDetails,omitempty" parquet:"name=terminating_rule_match_details, type=JSON"`
	TerminatingRuleType         *string                   `json:"terminatingRuleType,omitempty" parquet:"name=terminating_rule_type"`
	Timestamp                   *time.Time                `json:"timestamp"`
	WebAclId                    *string                   `json:"webAclId" parquet:"name=web_acl_id"`
}

WafTrafficLog struct with fields aligned to the provided JSON

func (*WafTrafficLog) GetColumnDescriptions

func (c *WafTrafficLog) GetColumnDescriptions() map[string]string

type WafTrafficLogTable

type WafTrafficLogTable struct{}

WafTrafficLogTable - table for Waf traffic logs

func (*WafTrafficLogTable) EnrichRow

func (c *WafTrafficLogTable) EnrichRow(row *WafTrafficLog, sourceEnrichmentFields schema.SourceEnrichment) (*WafTrafficLog, error)

EnrichRow implements table.Table

func (*WafTrafficLogTable) GetDescription

func (c *WafTrafficLogTable) GetDescription() string

func (*WafTrafficLogTable) GetSourceMetadata

func (c *WafTrafficLogTable) GetSourceMetadata() ([]*table.SourceMetadata[*WafTrafficLog], error)

func (*WafTrafficLogTable) Identifier

func (c *WafTrafficLogTable) Identifier() string

Jump to

Keyboard shortcuts

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