Documentation
¶
Index ¶
- Variables
- type EventBatch
- func (*EventBatch) Descriptor() ([]byte, []int)deprecated
- func (x *EventBatch) GetDropped() uint64
- func (x *EventBatch) GetEvents() []*SecurityEvent
- func (*EventBatch) ProtoMessage()
- func (x *EventBatch) ProtoReflect() protoreflect.Message
- func (x *EventBatch) Reset()
- func (x *EventBatch) String() string
- type Match
- type PolicyStats
- func (*PolicyStats) Descriptor() ([]byte, []int)deprecated
- func (x *PolicyStats) GetAllowed() uint64
- func (x *PolicyStats) GetDenied() uint64
- func (x *PolicyStats) GetDetected() uint64
- func (x *PolicyStats) GetLatencyCounts() []uint64
- func (x *PolicyStats) GetLatencySum() float64
- func (x *PolicyStats) GetPolicy() string
- func (*PolicyStats) ProtoMessage()
- func (x *PolicyStats) ProtoReflect() protoreflect.Message
- func (x *PolicyStats) Reset()
- func (x *PolicyStats) String() string
- type RequestStats
- func (*RequestStats) Descriptor() ([]byte, []int)deprecated
- func (x *RequestStats) GetLatencyBounds() []float64
- func (x *RequestStats) GetPolicies() []*PolicyStats
- func (*RequestStats) ProtoMessage()
- func (x *RequestStats) ProtoReflect() protoreflect.Message
- func (x *RequestStats) Reset()
- func (x *RequestStats) String() string
- type SecurityEvent
- func (*SecurityEvent) Descriptor() ([]byte, []int)deprecated
- func (x *SecurityEvent) GetAction() v1.Action
- func (x *SecurityEvent) GetAnomalyScore() int32
- func (x *SecurityEvent) GetBundleVersion() uint64
- func (x *SecurityEvent) GetClientIp() string
- func (x *SecurityEvent) GetEngineId() string
- func (x *SecurityEvent) GetEventId() string
- func (x *SecurityEvent) GetHost() string
- func (x *SecurityEvent) GetInterruptingRuleId() int32
- func (x *SecurityEvent) GetLatency() *durationpb.Duration
- func (x *SecurityEvent) GetMatches() []*Match
- func (x *SecurityEvent) GetMethod() string
- func (x *SecurityEvent) GetPath() string
- func (x *SecurityEvent) GetPodName() string
- func (x *SecurityEvent) GetPodNamespace() string
- func (x *SecurityEvent) GetPolicy() string
- func (x *SecurityEvent) GetReason() v1.Reason
- func (x *SecurityEvent) GetRequestId() string
- func (x *SecurityEvent) GetStatus() int32
- func (x *SecurityEvent) GetTime() *timestamppb.Timestamp
- func (x *SecurityEvent) GetUserAgent() string
- func (*SecurityEvent) ProtoMessage()
- func (x *SecurityEvent) ProtoReflect() protoreflect.Message
- func (x *SecurityEvent) Reset()
- func (x *SecurityEvent) String() string
Constants ¶
This section is empty.
Variables ¶
var File_events_v1_events_proto protoreflect.FileDescriptor
var File_events_v1_stats_proto protoreflect.FileDescriptor
Functions ¶
This section is empty.
Types ¶
type EventBatch ¶
type EventBatch struct {
Events []*SecurityEvent `protobuf:"bytes,1,rep,name=events,proto3" json:"events,omitempty"`
// Events dropped since the previous batch (a full buffer drops the
// oldest), so a gap is visible.
Dropped uint64 `protobuf:"varint,2,opt,name=dropped,proto3" json:"dropped,omitempty"`
// contains filtered or unexported fields
}
EventBatch carries events in order of time.
func (*EventBatch) Descriptor
deprecated
func (*EventBatch) Descriptor() ([]byte, []int)
Deprecated: Use EventBatch.ProtoReflect.Descriptor instead.
func (*EventBatch) GetDropped ¶
func (x *EventBatch) GetDropped() uint64
func (*EventBatch) GetEvents ¶
func (x *EventBatch) GetEvents() []*SecurityEvent
func (*EventBatch) ProtoMessage ¶
func (*EventBatch) ProtoMessage()
func (*EventBatch) ProtoReflect ¶
func (x *EventBatch) ProtoReflect() protoreflect.Message
func (*EventBatch) Reset ¶
func (x *EventBatch) Reset()
func (*EventBatch) String ¶
func (x *EventBatch) String() string
type Match ¶
type Match struct {
RuleId int32 `protobuf:"varint,1,opt,name=rule_id,json=ruleId,proto3" json:"rule_id,omitempty"`
// Where it matched, e.g. ARGS:id or REQUEST_HEADERS:User-Agent; at most
// 128.
Variable string `protobuf:"bytes,2,opt,name=variable,proto3" json:"variable,omitempty"`
// At most 64 bytes of the matched value, redacted.
Snippet string `protobuf:"bytes,3,opt,name=snippet,proto3" json:"snippet,omitempty"`
// contains filtered or unexported fields
}
Match is one rule that matched.
func (*Match) Descriptor
deprecated
func (*Match) GetSnippet ¶
func (*Match) GetVariable ¶
func (*Match) ProtoMessage ¶
func (*Match) ProtoMessage()
func (*Match) ProtoReflect ¶
func (x *Match) ProtoReflect() protoreflect.Message
type PolicyStats ¶ added in v0.3.0
type PolicyStats struct {
// "namespace/name".
Policy string `protobuf:"bytes,1,opt,name=policy,proto3" json:"policy,omitempty"`
// Forwarded: clean, on a skipped path, or not inspected under a fail-open
// policy.
Allowed uint64 `protobuf:"varint,2,opt,name=allowed,proto3" json:"allowed,omitempty"`
// Rejected (block mode).
Denied uint64 `protobuf:"varint,3,opt,name=denied,proto3" json:"denied,omitempty"`
// Forwarded, but would have been rejected (detect mode).
Detected uint64 `protobuf:"varint,4,opt,name=detected,proto3" json:"detected,omitempty"`
// Requests per latency bucket (time spent inspecting), one count per
// bound of RequestStats.latency_bounds and a last one for slower
// requests. Not cumulative across buckets.
LatencyCounts []uint64 `protobuf:"varint,5,rep,packed,name=latency_counts,json=latencyCounts,proto3" json:"latency_counts,omitempty"`
// The sum of their latencies, in seconds.
LatencySum float64 `protobuf:"fixed64,6,opt,name=latency_sum,json=latencySum,proto3" json:"latency_sum,omitempty"`
// contains filtered or unexported fields
}
PolicyStats counts the requests one policy decided. Their total is allowed + denied + detected. Requests no policy covers aren't counted.
func (*PolicyStats) Descriptor
deprecated
added in
v0.3.0
func (*PolicyStats) Descriptor() ([]byte, []int)
Deprecated: Use PolicyStats.ProtoReflect.Descriptor instead.
func (*PolicyStats) GetAllowed ¶ added in v0.3.0
func (x *PolicyStats) GetAllowed() uint64
func (*PolicyStats) GetDenied ¶ added in v0.3.0
func (x *PolicyStats) GetDenied() uint64
func (*PolicyStats) GetDetected ¶ added in v0.3.0
func (x *PolicyStats) GetDetected() uint64
func (*PolicyStats) GetLatencyCounts ¶ added in v0.3.0
func (x *PolicyStats) GetLatencyCounts() []uint64
func (*PolicyStats) GetLatencySum ¶ added in v0.3.0
func (x *PolicyStats) GetLatencySum() float64
func (*PolicyStats) GetPolicy ¶ added in v0.3.0
func (x *PolicyStats) GetPolicy() string
func (*PolicyStats) ProtoMessage ¶ added in v0.3.0
func (*PolicyStats) ProtoMessage()
func (*PolicyStats) ProtoReflect ¶ added in v0.3.0
func (x *PolicyStats) ProtoReflect() protoreflect.Message
func (*PolicyStats) Reset ¶ added in v0.3.0
func (x *PolicyStats) Reset()
func (*PolicyStats) String ¶ added in v0.3.0
func (x *PolicyStats) String() string
type RequestStats ¶ added in v0.3.0
type RequestStats struct {
// The upper bounds of the latency buckets, in seconds, increasing.
LatencyBounds []float64 `protobuf:"fixed64,1,rep,packed,name=latency_bounds,json=latencyBounds,proto3" json:"latency_bounds,omitempty"`
// The policies that counted requests; a policy is in at most one message
// of a report.
Policies []*PolicyStats `protobuf:"bytes,2,rep,name=policies,proto3" json:"policies,omitempty"`
// contains filtered or unexported fields
}
RequestStats counts requests per policy. The counts are cumulative; where they start is up to the message carrying them. A policy's count lower than in the previous report is a reset: count the new value from zero.
func (*RequestStats) Descriptor
deprecated
added in
v0.3.0
func (*RequestStats) Descriptor() ([]byte, []int)
Deprecated: Use RequestStats.ProtoReflect.Descriptor instead.
func (*RequestStats) GetLatencyBounds ¶ added in v0.3.0
func (x *RequestStats) GetLatencyBounds() []float64
func (*RequestStats) GetPolicies ¶ added in v0.3.0
func (x *RequestStats) GetPolicies() []*PolicyStats
func (*RequestStats) ProtoMessage ¶ added in v0.3.0
func (*RequestStats) ProtoMessage()
func (*RequestStats) ProtoReflect ¶ added in v0.3.0
func (x *RequestStats) ProtoReflect() protoreflect.Message
func (*RequestStats) Reset ¶ added in v0.3.0
func (x *RequestStats) Reset()
func (*RequestStats) String ¶ added in v0.3.0
func (x *RequestStats) String() string
type SecurityEvent ¶
type SecurityEvent struct {
// Unique per event (a ULID): repeated sends of the same event are
// deduplicated by it.
EventId string `protobuf:"bytes,1,opt,name=event_id,json=eventId,proto3" json:"event_id,omitempty"`
Time *timestamppb.Timestamp `protobuf:"bytes,2,opt,name=time,proto3" json:"time,omitempty"`
// The engine that inspected the request, and its pod.
EngineId string `protobuf:"bytes,3,opt,name=engine_id,json=engineId,proto3" json:"engine_id,omitempty"`
PodNamespace string `protobuf:"bytes,4,opt,name=pod_namespace,json=podNamespace,proto3" json:"pod_namespace,omitempty"`
PodName string `protobuf:"bytes,5,opt,name=pod_name,json=podName,proto3" json:"pod_name,omitempty"`
// The policy that decided, "namespace/name", and the bundle it came from.
Policy string `protobuf:"bytes,6,opt,name=policy,proto3" json:"policy,omitempty"`
BundleVersion uint64 `protobuf:"varint,7,opt,name=bundle_version,json=bundleVersion,proto3" json:"bundle_version,omitempty"`
Action v1.Action `protobuf:"varint,8,opt,name=action,proto3,enum=inkwall.engine.v1.Action" json:"action,omitempty"`
Reason v1.Reason `protobuf:"varint,9,opt,name=reason,proto3,enum=inkwall.engine.v1.Reason" json:"reason,omitempty"`
// The rule that interrupted the request, if any.
InterruptingRuleId int32 `protobuf:"varint,10,opt,name=interrupting_rule_id,json=interruptingRuleId,proto3" json:"interrupting_rule_id,omitempty"`
// Every rule that matched, including score-only matches.
Matches []*Match `protobuf:"bytes,11,rep,name=matches,proto3" json:"matches,omitempty"`
// The CRS inbound anomaly score.
AnomalyScore int32 `protobuf:"varint,12,opt,name=anomaly_score,json=anomalyScore,proto3" json:"anomaly_score,omitempty"`
// The request, without its query string or body.
Method string `protobuf:"bytes,13,opt,name=method,proto3" json:"method,omitempty"`
// At most 255.
Host string `protobuf:"bytes,14,opt,name=host,proto3" json:"host,omitempty"`
// As received (percent-encoded), without the query string; at most 1,024.
Path string `protobuf:"bytes,15,opt,name=path,proto3" json:"path,omitempty"`
// The client's address after the trusted proxies (0002 §8.2).
ClientIp string `protobuf:"bytes,16,opt,name=client_ip,json=clientIp,proto3" json:"client_ip,omitempty"`
// At most 256.
UserAgent string `protobuf:"bytes,17,opt,name=user_agent,json=userAgent,proto3" json:"user_agent,omitempty"`
// The proxy's request ID, to find the request in its logs; at most 128
// (often from a header the client can set).
RequestId string `protobuf:"bytes,18,opt,name=request_id,json=requestId,proto3" json:"request_id,omitempty"`
// The status the client got (0 when the request was forwarded and the
// response isn't known).
Status int32 `protobuf:"varint,19,opt,name=status,proto3" json:"status,omitempty"`
// Time spent inspecting.
Latency *durationpb.Duration `protobuf:"bytes,20,opt,name=latency,proto3" json:"latency,omitempty"`
// contains filtered or unexported fields
}
SecurityEvent is one blocked or detected request. The request's fields are attacker-controlled: they are truncated to their limits (in bytes) in the engine, and must be escaped wherever they are shown.
func (*SecurityEvent) Descriptor
deprecated
func (*SecurityEvent) Descriptor() ([]byte, []int)
Deprecated: Use SecurityEvent.ProtoReflect.Descriptor instead.
func (*SecurityEvent) GetAction ¶
func (x *SecurityEvent) GetAction() v1.Action
func (*SecurityEvent) GetAnomalyScore ¶
func (x *SecurityEvent) GetAnomalyScore() int32
func (*SecurityEvent) GetBundleVersion ¶
func (x *SecurityEvent) GetBundleVersion() uint64
func (*SecurityEvent) GetClientIp ¶
func (x *SecurityEvent) GetClientIp() string
func (*SecurityEvent) GetEngineId ¶
func (x *SecurityEvent) GetEngineId() string
func (*SecurityEvent) GetEventId ¶
func (x *SecurityEvent) GetEventId() string
func (*SecurityEvent) GetHost ¶
func (x *SecurityEvent) GetHost() string
func (*SecurityEvent) GetInterruptingRuleId ¶
func (x *SecurityEvent) GetInterruptingRuleId() int32
func (*SecurityEvent) GetLatency ¶
func (x *SecurityEvent) GetLatency() *durationpb.Duration
func (*SecurityEvent) GetMatches ¶
func (x *SecurityEvent) GetMatches() []*Match
func (*SecurityEvent) GetMethod ¶
func (x *SecurityEvent) GetMethod() string
func (*SecurityEvent) GetPath ¶
func (x *SecurityEvent) GetPath() string
func (*SecurityEvent) GetPodName ¶
func (x *SecurityEvent) GetPodName() string
func (*SecurityEvent) GetPodNamespace ¶
func (x *SecurityEvent) GetPodNamespace() string
func (*SecurityEvent) GetPolicy ¶
func (x *SecurityEvent) GetPolicy() string
func (*SecurityEvent) GetReason ¶
func (x *SecurityEvent) GetReason() v1.Reason
func (*SecurityEvent) GetRequestId ¶
func (x *SecurityEvent) GetRequestId() string
func (*SecurityEvent) GetStatus ¶
func (x *SecurityEvent) GetStatus() int32
func (*SecurityEvent) GetTime ¶
func (x *SecurityEvent) GetTime() *timestamppb.Timestamp
func (*SecurityEvent) GetUserAgent ¶
func (x *SecurityEvent) GetUserAgent() string
func (*SecurityEvent) ProtoMessage ¶
func (*SecurityEvent) ProtoMessage()
func (*SecurityEvent) ProtoReflect ¶
func (x *SecurityEvent) ProtoReflect() protoreflect.Message
func (*SecurityEvent) Reset ¶
func (x *SecurityEvent) Reset()
func (*SecurityEvent) String ¶
func (x *SecurityEvent) String() string