Documentation
¶
Overview ¶
Example (SignedBundle) ¶
The signature covers the exact bytes of the bundle: the operator signs what it serialized, and the engine verifies before decoding.
package main
import (
"crypto/ed25519"
"crypto/rand"
"fmt"
"google.golang.org/protobuf/proto"
bundlev1 "github.com/inkwall-dev/inkwall/api/bundle/v1"
)
func main() {
pub, priv, _ := ed25519.GenerateKey(rand.Reader)
// Operator side.
b := &bundlev1.Bundle{
Version: 42,
Policies: []*bundlev1.Policy{{
Id: "shop/shop",
Mode: bundlev1.Mode_MODE_BLOCK,
Routes: []*bundlev1.RouteMatch{{
Host: "shop.example.com",
Path: &bundlev1.PathMatch{Type: bundlev1.PathMatchType_PATH_MATCH_TYPE_PREFIX, Value: "/"},
}},
}},
}
raw, _ := proto.Marshal(b)
signed := &bundlev1.SignedBundle{Bundle: raw, Signature: ed25519.Sign(priv, raw), KeyId: "2026-10"}
// Engine side.
if !ed25519.Verify(pub, signed.GetBundle(), signed.GetSignature()) {
fmt.Println("bad signature: keep the current bundle")
return
}
var got bundlev1.Bundle
if err := proto.Unmarshal(signed.GetBundle(), &got); err != nil {
fmt.Println(err)
return
}
fmt.Println(got.GetVersion(), got.GetPolicies()[0].GetId(), got.GetPolicies()[0].GetMode())
// A tampered bundle fails verification.
signed.Bundle[len(signed.Bundle)-1] ^= 1
fmt.Println(ed25519.Verify(pub, signed.GetBundle(), signed.GetSignature()))
}
Output: 42 shop/shop MODE_BLOCK false
Index ¶
- Variables
- type BodyConfig
- func (*BodyConfig) Descriptor() ([]byte, []int)deprecated
- func (x *BodyConfig) GetDenyGrpc() bool
- func (x *BodyConfig) GetGrpcMessages() bool
- func (x *BodyConfig) GetGrpcPerMessage() bool
- func (x *BodyConfig) GetInspect() bool
- func (x *BodyConfig) GetMaxBytes() int64
- func (x *BodyConfig) GetOnOversize() OversizeAction
- func (*BodyConfig) ProtoMessage()
- func (x *BodyConfig) ProtoReflect() protoreflect.Message
- func (x *BodyConfig) Reset()
- func (x *BodyConfig) String() string
- type BuiltinRuleSet
- func (BuiltinRuleSet) Descriptor() protoreflect.EnumDescriptor
- func (x BuiltinRuleSet) Enum() *BuiltinRuleSet
- func (BuiltinRuleSet) EnumDescriptor() ([]byte, []int)deprecated
- func (x BuiltinRuleSet) Number() protoreflect.EnumNumber
- func (x BuiltinRuleSet) String() string
- func (BuiltinRuleSet) Type() protoreflect.EnumType
- type Bundle
- func (*Bundle) Descriptor() ([]byte, []int)deprecated
- func (x *Bundle) GetClusterId() string
- func (x *Bundle) GetContentHash() []byte
- func (x *Bundle) GetCreatedAt() *timestamppb.Timestamp
- func (x *Bundle) GetEvents() *EventsConfig
- func (x *Bundle) GetPolicies() []*Policy
- func (x *Bundle) GetPolicyVersions() []uint64
- func (x *Bundle) GetProbeKey() []byte
- func (x *Bundle) GetRuleSets() []*RuleSet
- func (x *Bundle) GetSuspended() bool
- func (x *Bundle) GetVersion() uint64
- func (*Bundle) ProtoMessage()
- func (x *Bundle) ProtoReflect() protoreflect.Message
- func (x *Bundle) Reset()
- func (x *Bundle) String() string
- type CRSSettings
- func (*CRSSettings) Descriptor() ([]byte, []int)deprecated
- func (x *CRSSettings) GetAllowedMethods() []string
- func (x *CRSSettings) GetAllowedRequestContentTypes() []string
- func (x *CRSSettings) GetDetectionParanoiaLevel() int32
- func (x *CRSSettings) GetOutboundAnomalyThreshold() int32
- func (*CRSSettings) ProtoMessage()
- func (x *CRSSettings) ProtoReflect() protoreflect.Message
- func (x *CRSSettings) Reset()
- func (x *CRSSettings) String() string
- type EventsConfig
- func (*EventsConfig) Descriptor() ([]byte, []int)deprecated
- func (x *EventsConfig) GetNoSnippets() bool
- func (x *EventsConfig) GetRedactArguments() []string
- func (x *EventsConfig) GetRedactHeaders() []string
- func (*EventsConfig) ProtoMessage()
- func (x *EventsConfig) ProtoReflect() protoreflect.Message
- func (x *EventsConfig) Reset()
- func (x *EventsConfig) String() string
- type Exclusion
- func (*Exclusion) Descriptor() ([]byte, []int)deprecated
- func (x *Exclusion) GetArgument() string
- func (x *Exclusion) GetArgumentName() string
- func (x *Exclusion) GetCookie() string
- func (x *Exclusion) GetHeader() string
- func (x *Exclusion) GetPath() string
- func (x *Exclusion) GetRuleIds() []uint32
- func (*Exclusion) ProtoMessage()
- func (x *Exclusion) ProtoReflect() protoreflect.Message
- func (x *Exclusion) Reset()
- func (x *Exclusion) String() string
- type FailureMode
- func (FailureMode) Descriptor() protoreflect.EnumDescriptor
- func (x FailureMode) Enum() *FailureMode
- func (FailureMode) EnumDescriptor() ([]byte, []int)deprecated
- func (x FailureMode) Number() protoreflect.EnumNumber
- func (x FailureMode) String() string
- func (FailureMode) Type() protoreflect.EnumType
- type IPLists
- type Mode
- type OversizeAction
- func (OversizeAction) Descriptor() protoreflect.EnumDescriptor
- func (x OversizeAction) Enum() *OversizeAction
- func (OversizeAction) EnumDescriptor() ([]byte, []int)deprecated
- func (x OversizeAction) Number() protoreflect.EnumNumber
- func (x OversizeAction) String() string
- func (OversizeAction) Type() protoreflect.EnumType
- type PathMatch
- type PathMatchType
- func (PathMatchType) Descriptor() protoreflect.EnumDescriptor
- func (x PathMatchType) Enum() *PathMatchType
- func (PathMatchType) EnumDescriptor() ([]byte, []int)deprecated
- func (x PathMatchType) Number() protoreflect.EnumNumber
- func (x PathMatchType) String() string
- func (PathMatchType) Type() protoreflect.EnumType
- type Policy
- func (*Policy) Descriptor() ([]byte, []int)deprecated
- func (x *Policy) GetBody() *BodyConfig
- func (x *Policy) GetExclusions() []*Exclusion
- func (x *Policy) GetFailureMode() FailureMode
- func (x *Policy) GetId() string
- func (x *Policy) GetIpLists() *IPLists
- func (x *Policy) GetMode() Mode
- func (x *Policy) GetResponses() *ResponseConfig
- func (x *Policy) GetRoutes() []*RouteMatch
- func (x *Policy) GetRuleSets() []*RuleSetBinding
- func (x *Policy) GetSkipBodyPaths() []string
- func (x *Policy) GetSkipPaths() []string
- func (x *Policy) GetTargetExclusions() []*Exclusion
- func (x *Policy) GetTimeout() *durationpb.Duration
- func (x *Policy) GetWebsocket() *WebSocketConfig
- func (*Policy) ProtoMessage()
- func (x *Policy) ProtoReflect() protoreflect.Message
- func (x *Policy) Reset()
- func (x *Policy) String() string
- type ResponseConfig
- func (*ResponseConfig) Descriptor() ([]byte, []int)deprecated
- func (x *ResponseConfig) GetInspect() bool
- func (x *ResponseConfig) GetMaxBytes() int64
- func (x *ResponseConfig) GetOnOversize() OversizeAction
- func (x *ResponseConfig) GetStreams() bool
- func (*ResponseConfig) ProtoMessage()
- func (x *ResponseConfig) ProtoReflect() protoreflect.Message
- func (x *ResponseConfig) Reset()
- func (x *ResponseConfig) String() string
- type RouteMatch
- func (*RouteMatch) Descriptor() ([]byte, []int)deprecated
- func (x *RouteMatch) GetHost() string
- func (x *RouteMatch) GetMethods() []string
- func (x *RouteMatch) GetPath() *PathMatch
- func (x *RouteMatch) GetWildcardAnyDepth() bool
- func (*RouteMatch) ProtoMessage()
- func (x *RouteMatch) ProtoReflect() protoreflect.Message
- func (x *RouteMatch) Reset()
- func (x *RouteMatch) String() string
- type RuleSet
- func (*RuleSet) Descriptor() ([]byte, []int)deprecated
- func (x *RuleSet) GetBuiltin() BuiltinRuleSet
- func (x *RuleSet) GetId() string
- func (x *RuleSet) GetSeclang() string
- func (x *RuleSet) GetSource() isRuleSet_Source
- func (*RuleSet) ProtoMessage()
- func (x *RuleSet) ProtoReflect() protoreflect.Message
- func (x *RuleSet) Reset()
- func (x *RuleSet) String() string
- type RuleSetBinding
- func (*RuleSetBinding) Descriptor() ([]byte, []int)deprecated
- func (x *RuleSetBinding) GetCrs() *CRSSettings
- func (x *RuleSetBinding) GetInboundAnomalyThreshold() int32
- func (x *RuleSetBinding) GetParanoiaLevel() int32
- func (x *RuleSetBinding) GetPlacement() RuleSetPlacement
- func (x *RuleSetBinding) GetRuleSetId() string
- func (*RuleSetBinding) ProtoMessage()
- func (x *RuleSetBinding) ProtoReflect() protoreflect.Message
- func (x *RuleSetBinding) Reset()
- func (x *RuleSetBinding) String() string
- type RuleSetPlacement
- func (RuleSetPlacement) Descriptor() protoreflect.EnumDescriptor
- func (x RuleSetPlacement) Enum() *RuleSetPlacement
- func (RuleSetPlacement) EnumDescriptor() ([]byte, []int)deprecated
- func (x RuleSetPlacement) Number() protoreflect.EnumNumber
- func (x RuleSetPlacement) String() string
- func (RuleSetPlacement) Type() protoreflect.EnumType
- type RuleSet_Builtin
- type RuleSet_Seclang
- type SignedBundle
- func (*SignedBundle) Descriptor() ([]byte, []int)deprecated
- func (x *SignedBundle) GetBundle() []byte
- func (x *SignedBundle) GetKeyId() string
- func (x *SignedBundle) GetSignature() []byte
- func (*SignedBundle) ProtoMessage()
- func (x *SignedBundle) ProtoReflect() protoreflect.Message
- func (x *SignedBundle) Reset()
- func (x *SignedBundle) String() string
- type WebSocketConfig
- func (*WebSocketConfig) Descriptor() ([]byte, []int)deprecated
- func (x *WebSocketConfig) GetAllowMissingOrigin() bool
- func (x *WebSocketConfig) GetAllowedOrigins() []string
- func (x *WebSocketConfig) GetRequiredHeaders() []string
- func (*WebSocketConfig) ProtoMessage()
- func (x *WebSocketConfig) ProtoReflect() protoreflect.Message
- func (x *WebSocketConfig) Reset()
- func (x *WebSocketConfig) String() string
Examples ¶
Constants ¶
This section is empty.
Variables ¶
var ( PathMatchType_name = map[int32]string{ 0: "PATH_MATCH_TYPE_UNSPECIFIED", 1: "PATH_MATCH_TYPE_EXACT", 2: "PATH_MATCH_TYPE_PREFIX", } PathMatchType_value = map[string]int32{ "PATH_MATCH_TYPE_UNSPECIFIED": 0, "PATH_MATCH_TYPE_EXACT": 1, "PATH_MATCH_TYPE_PREFIX": 2, } )
Enum value maps for PathMatchType.
var ( Mode_name = map[int32]string{ 0: "MODE_UNSPECIFIED", 1: "MODE_DETECT", 2: "MODE_BLOCK", } Mode_value = map[string]int32{ "MODE_UNSPECIFIED": 0, "MODE_DETECT": 1, "MODE_BLOCK": 2, } )
Enum value maps for Mode.
var ( FailureMode_name = map[int32]string{ 0: "FAILURE_MODE_UNSPECIFIED", 1: "FAILURE_MODE_OPEN", 2: "FAILURE_MODE_CLOSED", } FailureMode_value = map[string]int32{ "FAILURE_MODE_UNSPECIFIED": 0, "FAILURE_MODE_OPEN": 1, "FAILURE_MODE_CLOSED": 2, } )
Enum value maps for FailureMode.
var ( RuleSetPlacement_name = map[int32]string{ 0: "RULE_SET_PLACEMENT_UNSPECIFIED", 1: "RULE_SET_PLACEMENT_AFTER_CRS", 2: "RULE_SET_PLACEMENT_BEFORE_CRS", } RuleSetPlacement_value = map[string]int32{ "RULE_SET_PLACEMENT_UNSPECIFIED": 0, "RULE_SET_PLACEMENT_AFTER_CRS": 1, "RULE_SET_PLACEMENT_BEFORE_CRS": 2, } )
Enum value maps for RuleSetPlacement.
var ( BuiltinRuleSet_name = map[int32]string{ 0: "BUILTIN_RULE_SET_UNSPECIFIED", 1: "BUILTIN_RULE_SET_CRS_V4", } BuiltinRuleSet_value = map[string]int32{ "BUILTIN_RULE_SET_UNSPECIFIED": 0, "BUILTIN_RULE_SET_CRS_V4": 1, } )
Enum value maps for BuiltinRuleSet.
var ( OversizeAction_name = map[int32]string{ 0: "OVERSIZE_ACTION_UNSPECIFIED", 1: "OVERSIZE_ACTION_ALLOW", 2: "OVERSIZE_ACTION_DENY", } OversizeAction_value = map[string]int32{ "OVERSIZE_ACTION_UNSPECIFIED": 0, "OVERSIZE_ACTION_ALLOW": 1, "OVERSIZE_ACTION_DENY": 2, } )
Enum value maps for OversizeAction.
var File_bundle_v1_bundle_proto protoreflect.FileDescriptor
Functions ¶
This section is empty.
Types ¶
type BodyConfig ¶
type BodyConfig struct {
// Inspect request bodies.
Inspect bool `protobuf:"varint,1,opt,name=inspect,proto3" json:"inspect,omitempty"`
// Bytes of a body that are inspected; 0: the engine's default.
MaxBytes int64 `protobuf:"varint,2,opt,name=max_bytes,json=maxBytes,proto3" json:"max_bytes,omitempty"`
OnOversize OversizeAction `` /* 130-byte string literal not displayed */
// Inspect the text in gRPC calls' messages (docs/grpc.md).
GrpcMessages bool `protobuf:"varint,4,opt,name=grpc_messages,json=grpcMessages,proto3" json:"grpc_messages,omitempty"`
// Deny a request with a gRPC or gRPC-Web content type, on routes that
// serve no gRPC (#367). Engines before 0.5.0 ignore it: the operator
// doesn't count them as enforcing a policy that sets it.
DenyGrpc bool `protobuf:"varint,5,opt,name=deny_grpc,json=denyGrpc,proto3" json:"deny_grpc,omitempty"`
// With grpc_messages, inspect a gRPC call's messages one by one as they
// come (ext_proc streams the body), not the buffered body: long client
// streams and bidirectional calls then work (#315). Engines before 0.6.0
// ignore it and buffer: the operator doesn't count them as enforcing a
// policy that sets it.
GrpcPerMessage bool `protobuf:"varint,6,opt,name=grpc_per_message,json=grpcPerMessage,proto3" json:"grpc_per_message,omitempty"`
// contains filtered or unexported fields
}
BodyConfig configures request body inspection.
func (*BodyConfig) Descriptor
deprecated
func (*BodyConfig) Descriptor() ([]byte, []int)
Deprecated: Use BodyConfig.ProtoReflect.Descriptor instead.
func (*BodyConfig) GetDenyGrpc ¶ added in v0.5.0
func (x *BodyConfig) GetDenyGrpc() bool
func (*BodyConfig) GetGrpcMessages ¶ added in v0.4.0
func (x *BodyConfig) GetGrpcMessages() bool
func (*BodyConfig) GetGrpcPerMessage ¶ added in v0.6.0
func (x *BodyConfig) GetGrpcPerMessage() bool
func (*BodyConfig) GetInspect ¶
func (x *BodyConfig) GetInspect() bool
func (*BodyConfig) GetMaxBytes ¶
func (x *BodyConfig) GetMaxBytes() int64
func (*BodyConfig) GetOnOversize ¶
func (x *BodyConfig) GetOnOversize() OversizeAction
func (*BodyConfig) ProtoMessage ¶
func (*BodyConfig) ProtoMessage()
func (*BodyConfig) ProtoReflect ¶
func (x *BodyConfig) ProtoReflect() protoreflect.Message
func (*BodyConfig) Reset ¶
func (x *BodyConfig) Reset()
func (*BodyConfig) String ¶
func (x *BodyConfig) String() string
type BuiltinRuleSet ¶
type BuiltinRuleSet int32
BuiltinRuleSet names a rule set shipped in the engine image, pinned to the engine's version.
const ( BuiltinRuleSet_BUILTIN_RULE_SET_UNSPECIFIED BuiltinRuleSet = 0 // OWASP Core Rule Set v4. BuiltinRuleSet_BUILTIN_RULE_SET_CRS_V4 BuiltinRuleSet = 1 )
func (BuiltinRuleSet) Descriptor ¶
func (BuiltinRuleSet) Descriptor() protoreflect.EnumDescriptor
func (BuiltinRuleSet) Enum ¶
func (x BuiltinRuleSet) Enum() *BuiltinRuleSet
func (BuiltinRuleSet) EnumDescriptor
deprecated
func (BuiltinRuleSet) EnumDescriptor() ([]byte, []int)
Deprecated: Use BuiltinRuleSet.Descriptor instead.
func (BuiltinRuleSet) Number ¶
func (x BuiltinRuleSet) Number() protoreflect.EnumNumber
func (BuiltinRuleSet) String ¶
func (x BuiltinRuleSet) String() string
func (BuiltinRuleSet) Type ¶
func (BuiltinRuleSet) Type() protoreflect.EnumType
type Bundle ¶
type Bundle struct {
// Increases with every new bundle of the cluster; an engine never applies
// a version older than the one it runs.
Version uint64 `protobuf:"varint,1,opt,name=version,proto3" json:"version,omitempty"`
// The cluster the bundle was built for.
ClusterId string `protobuf:"bytes,2,opt,name=cluster_id,json=clusterId,proto3" json:"cluster_id,omitempty"`
CreatedAt *timestamppb.Timestamp `protobuf:"bytes,3,opt,name=created_at,json=createdAt,proto3" json:"created_at,omitempty"`
// SHA-256 of the bundle's content, without version, created_at and
// content_hash itself: equal hashes mean equal policy.
ContentHash []byte `protobuf:"bytes,4,opt,name=content_hash,json=contentHash,proto3" json:"content_hash,omitempty"`
Policies []*Policy `protobuf:"bytes,5,rep,name=policies,proto3" json:"policies,omitempty"`
// The rule sets the policies use, each once.
RuleSets []*RuleSet `protobuf:"bytes,6,rep,name=rule_sets,json=ruleSets,proto3" json:"rule_sets,omitempty"`
// The emergency switch (InkwallConfig.spec.suspend): every request is
// allowed uninspected.
Suspended bool `protobuf:"varint,7,opt,name=suspended,proto3" json:"suspended,omitempty"`
// The operator's bookkeeping, not part of content_hash; engines ignore it.
// policy_versions[i] is the first bundle that enforces policies[i] as it
// is in this one (its status.bundleVersion), so a new leader continues it.
// Empty in bundles of operators before v0.3.0.
PolicyVersions []uint64 `protobuf:"varint,8,rep,packed,name=policy_versions,json=policyVersions,proto3" json:"policy_versions,omitempty"`
// The key of the operator's HAProxy probe (0002 §6.4): the SPOE adapter
// answers a request to /.well-known/inkwall-probe/ whose X-Inkwall-Probe
// header is a MAC under this key, so the operator can tell that HAProxy
// runs the filter on a route. 32 random bytes, or empty: no probes.
ProbeKey []byte `protobuf:"bytes,9,opt,name=probe_key,json=probeKey,proto3" json:"probe_key,omitempty"`
// What the engines' security events may carry
// (InkwallConfig.spec.events). Unset: the defaults.
Events *EventsConfig `protobuf:"bytes,10,opt,name=events,proto3" json:"events,omitempty"`
// contains filtered or unexported fields
}
Bundle is the complete policy of one cluster.
func (*Bundle) Descriptor
deprecated
func (*Bundle) GetClusterId ¶
func (*Bundle) GetContentHash ¶
func (*Bundle) GetCreatedAt ¶
func (x *Bundle) GetCreatedAt() *timestamppb.Timestamp
func (*Bundle) GetEvents ¶ added in v0.5.0
func (x *Bundle) GetEvents() *EventsConfig
func (*Bundle) GetPolicies ¶
func (*Bundle) GetPolicyVersions ¶ added in v0.3.0
func (*Bundle) GetProbeKey ¶ added in v0.4.0
func (*Bundle) GetRuleSets ¶
func (*Bundle) GetSuspended ¶
func (*Bundle) GetVersion ¶
func (*Bundle) ProtoMessage ¶
func (*Bundle) ProtoMessage()
func (*Bundle) ProtoReflect ¶
func (x *Bundle) ProtoReflect() protoreflect.Message
type CRSSettings ¶ added in v0.5.0
type CRSSettings struct {
// tx.allowed_methods: the request methods allowed (rule 911100).
AllowedMethods []string `protobuf:"bytes,1,rep,name=allowed_methods,json=allowedMethods,proto3" json:"allowed_methods,omitempty"`
// tx.allowed_request_content_type: the request media types allowed, as
// type/subtype without parameters (rule 920420).
AllowedRequestContentTypes []string `` /* 143-byte string literal not displayed */
// tx.detection_paranoia_level, from the binding's paranoia level to 4;
// 0: the paranoia level. Rules above the paranoia level and up to this one
// log and never block.
DetectionParanoiaLevel int32 `` /* 130-byte string literal not displayed */
// tx.outbound_anomaly_score_threshold: the response anomaly score at
// which a response is blocked; 0: the CRS's default (4).
OutboundAnomalyThreshold int32 `` /* 136-byte string literal not displayed */
// contains filtered or unexported fields
}
CRSSettings are OWASP CRS variables the engine sets on each transaction, before the CRS's own defaults. Unset fields keep the CRS's defaults.
func (*CRSSettings) Descriptor
deprecated
added in
v0.5.0
func (*CRSSettings) Descriptor() ([]byte, []int)
Deprecated: Use CRSSettings.ProtoReflect.Descriptor instead.
func (*CRSSettings) GetAllowedMethods ¶ added in v0.5.0
func (x *CRSSettings) GetAllowedMethods() []string
func (*CRSSettings) GetAllowedRequestContentTypes ¶ added in v0.5.0
func (x *CRSSettings) GetAllowedRequestContentTypes() []string
func (*CRSSettings) GetDetectionParanoiaLevel ¶ added in v0.5.0
func (x *CRSSettings) GetDetectionParanoiaLevel() int32
func (*CRSSettings) GetOutboundAnomalyThreshold ¶ added in v0.5.0
func (x *CRSSettings) GetOutboundAnomalyThreshold() int32
func (*CRSSettings) ProtoMessage ¶ added in v0.5.0
func (*CRSSettings) ProtoMessage()
func (*CRSSettings) ProtoReflect ¶ added in v0.5.0
func (x *CRSSettings) ProtoReflect() protoreflect.Message
func (*CRSSettings) Reset ¶ added in v0.5.0
func (x *CRSSettings) Reset()
func (*CRSSettings) String ¶ added in v0.5.0
func (x *CRSSettings) String() string
type EventsConfig ¶ added in v0.5.0
type EventsConfig struct {
// More header names whose values leave no snippet, matched without
// regard to case.
RedactHeaders []string `protobuf:"bytes,1,rep,name=redact_headers,json=redactHeaders,proto3" json:"redact_headers,omitempty"`
// More argument-name patterns: a match on an argument whose name
// contains one, without regard to case, leaves no snippet.
RedactArguments []string `protobuf:"bytes,2,rep,name=redact_arguments,json=redactArguments,proto3" json:"redact_arguments,omitempty"`
// Send no snippets at all.
NoSnippets bool `protobuf:"varint,3,opt,name=no_snippets,json=noSnippets,proto3" json:"no_snippets,omitempty"`
// contains filtered or unexported fields
}
EventsConfig redacts the security events engines send to the operator (0002 §8.3). The engine always redacts cookies, response bodies, the Authorization, Cookie, Set-Cookie and Proxy-Authorization headers, and arguments and headers whose names look like credentials; these add to that.
func (*EventsConfig) Descriptor
deprecated
added in
v0.5.0
func (*EventsConfig) Descriptor() ([]byte, []int)
Deprecated: Use EventsConfig.ProtoReflect.Descriptor instead.
func (*EventsConfig) GetNoSnippets ¶ added in v0.5.0
func (x *EventsConfig) GetNoSnippets() bool
func (*EventsConfig) GetRedactArguments ¶ added in v0.5.0
func (x *EventsConfig) GetRedactArguments() []string
func (*EventsConfig) GetRedactHeaders ¶ added in v0.5.0
func (x *EventsConfig) GetRedactHeaders() []string
func (*EventsConfig) ProtoMessage ¶ added in v0.5.0
func (*EventsConfig) ProtoMessage()
func (*EventsConfig) ProtoReflect ¶ added in v0.5.0
func (x *EventsConfig) ProtoReflect() protoreflect.Message
func (*EventsConfig) Reset ¶ added in v0.5.0
func (x *EventsConfig) Reset()
func (*EventsConfig) String ¶ added in v0.5.0
func (x *EventsConfig) String() string
type Exclusion ¶
type Exclusion struct {
// The rules to turn off; an ID no rule has is ignored.
RuleIds []uint32 `protobuf:"varint,1,rep,packed,name=rule_ids,json=ruleIds,proto3" json:"rule_ids,omitempty"`
// Exact or prefix path in the router's syntax. Empty: every path.
Path string `protobuf:"bytes,2,opt,name=path,proto3" json:"path,omitempty"`
// A query or body argument the rules (and the rules chained to them) stop
// looking at. Empty, as the three below: the rules are off entirely (on
// path, when set). At most one of the four is set.
Argument string `protobuf:"bytes,3,opt,name=argument,proto3" json:"argument,omitempty"`
// An argument name (ARGS_NAMES) the rules stop looking at. Only in
// Policy.target_exclusions.
ArgumentName string `protobuf:"bytes,4,opt,name=argument_name,json=argumentName,proto3" json:"argument_name,omitempty"`
// A request cookie (REQUEST_COOKIES) the rules stop looking at. Only in
// Policy.target_exclusions.
Cookie string `protobuf:"bytes,5,opt,name=cookie,proto3" json:"cookie,omitempty"`
// A request header (REQUEST_HEADERS) the rules stop looking at. Only in
// Policy.target_exclusions.
Header string `protobuf:"bytes,6,opt,name=header,proto3" json:"header,omitempty"`
// contains filtered or unexported fields
}
Exclusion turns rules off, everywhere or for a path, an argument or both.
func (*Exclusion) Descriptor
deprecated
func (*Exclusion) GetArgument ¶
func (*Exclusion) GetArgumentName ¶ added in v0.5.0
func (*Exclusion) GetRuleIds ¶
func (*Exclusion) ProtoMessage ¶
func (*Exclusion) ProtoMessage()
func (*Exclusion) ProtoReflect ¶
func (x *Exclusion) ProtoReflect() protoreflect.Message
type FailureMode ¶
type FailureMode int32
FailureMode is what happens to a request that can't be inspected in time.
const ( // Closed in block mode, open in detect mode. FailureMode_FAILURE_MODE_UNSPECIFIED FailureMode = 0 // Let the request through uninspected. FailureMode_FAILURE_MODE_OPEN FailureMode = 1 // Reject the request with 503. FailureMode_FAILURE_MODE_CLOSED FailureMode = 2 )
func (FailureMode) Descriptor ¶
func (FailureMode) Descriptor() protoreflect.EnumDescriptor
func (FailureMode) Enum ¶
func (x FailureMode) Enum() *FailureMode
func (FailureMode) EnumDescriptor
deprecated
func (FailureMode) EnumDescriptor() ([]byte, []int)
Deprecated: Use FailureMode.Descriptor instead.
func (FailureMode) Number ¶
func (x FailureMode) Number() protoreflect.EnumNumber
func (FailureMode) String ¶
func (x FailureMode) String() string
func (FailureMode) Type ¶
func (FailureMode) Type() protoreflect.EnumType
type IPLists ¶ added in v0.5.0
type IPLists struct {
Allow []string `protobuf:"bytes,1,rep,name=allow,proto3" json:"allow,omitempty"`
Deny []string `protobuf:"bytes,2,rep,name=deny,proto3" json:"deny,omitempty"`
// contains filtered or unexported fields
}
IPLists are a policy's IP lists, as CIDR prefixes (10.0.0.0/8, 2001:db8::/32) or addresses. A client in deny is denied; one in allow and not in deny is not inspected.
func (*IPLists) Descriptor
deprecated
added in
v0.5.0
func (*IPLists) ProtoMessage ¶ added in v0.5.0
func (*IPLists) ProtoMessage()
func (*IPLists) ProtoReflect ¶ added in v0.5.0
func (x *IPLists) ProtoReflect() protoreflect.Message
type Mode ¶
type Mode int32
Mode is what the engine does with a request the rules flag.
func (Mode) Descriptor ¶
func (Mode) Descriptor() protoreflect.EnumDescriptor
func (Mode) EnumDescriptor
deprecated
func (Mode) Number ¶
func (x Mode) Number() protoreflect.EnumNumber
func (Mode) Type ¶
func (Mode) Type() protoreflect.EnumType
type OversizeAction ¶
type OversizeAction int32
OversizeAction is what happens to a body larger than max_bytes.
const ( // Deny in block mode, allow in detect mode. OversizeAction_OVERSIZE_ACTION_UNSPECIFIED OversizeAction = 0 // Forward with the body uninspected, and log. OversizeAction_OVERSIZE_ACTION_ALLOW OversizeAction = 1 // Reject with 413 in block mode. OversizeAction_OVERSIZE_ACTION_DENY OversizeAction = 2 )
func (OversizeAction) Descriptor ¶
func (OversizeAction) Descriptor() protoreflect.EnumDescriptor
func (OversizeAction) Enum ¶
func (x OversizeAction) Enum() *OversizeAction
func (OversizeAction) EnumDescriptor
deprecated
func (OversizeAction) EnumDescriptor() ([]byte, []int)
Deprecated: Use OversizeAction.Descriptor instead.
func (OversizeAction) Number ¶
func (x OversizeAction) Number() protoreflect.EnumNumber
func (OversizeAction) String ¶
func (x OversizeAction) String() string
func (OversizeAction) Type ¶
func (OversizeAction) Type() protoreflect.EnumType
type PathMatch ¶
type PathMatch struct {
Type PathMatchType `protobuf:"varint,1,opt,name=type,proto3,enum=inkwall.bundle.v1.PathMatchType" json:"type,omitempty"`
// An absolute, clean path.
Value string `protobuf:"bytes,2,opt,name=value,proto3" json:"value,omitempty"`
// contains filtered or unexported fields
}
PathMatch matches the request path.
func (*PathMatch) Descriptor
deprecated
func (*PathMatch) GetType ¶
func (x *PathMatch) GetType() PathMatchType
func (*PathMatch) ProtoMessage ¶
func (*PathMatch) ProtoMessage()
func (*PathMatch) ProtoReflect ¶
func (x *PathMatch) ProtoReflect() protoreflect.Message
type PathMatchType ¶
type PathMatchType int32
PathMatchType is how PathMatch.value is compared.
const ( PathMatchType_PATH_MATCH_TYPE_UNSPECIFIED PathMatchType = 0 // The whole path equals value. PathMatchType_PATH_MATCH_TYPE_EXACT PathMatchType = 1 // The path starts with value element by element, as Kubernetes Ingress // and Gateway API prefix matches do: "/foo" matches "/foo" and // "/foo/bar", not "/foobar". PathMatchType_PATH_MATCH_TYPE_PREFIX PathMatchType = 2 )
func (PathMatchType) Descriptor ¶
func (PathMatchType) Descriptor() protoreflect.EnumDescriptor
func (PathMatchType) Enum ¶
func (x PathMatchType) Enum() *PathMatchType
func (PathMatchType) EnumDescriptor
deprecated
func (PathMatchType) EnumDescriptor() ([]byte, []int)
Deprecated: Use PathMatchType.Descriptor instead.
func (PathMatchType) Number ¶
func (x PathMatchType) Number() protoreflect.EnumNumber
func (PathMatchType) String ¶
func (x PathMatchType) String() string
func (PathMatchType) Type ¶
func (PathMatchType) Type() protoreflect.EnumType
type Policy ¶
type Policy struct {
// The WAFPolicy, as "namespace/name".
Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"`
// The requests the policy applies to. When routes of several policies
// match a request, the most specific match wins (longest host, then
// exact path over prefix, then longest path); the operator rejects
// policies that would tie.
Routes []*RouteMatch `protobuf:"bytes,2,rep,name=routes,proto3" json:"routes,omitempty"`
Mode Mode `protobuf:"varint,3,opt,name=mode,proto3,enum=inkwall.bundle.v1.Mode" json:"mode,omitempty"`
FailureMode FailureMode `` /* 130-byte string literal not displayed */
// Inspection deadline per request. Unset: the engine's default.
Timeout *durationpb.Duration `protobuf:"bytes,5,opt,name=timeout,proto3" json:"timeout,omitempty"`
// Paths never inspected, and paths whose body is not inspected, in the
// engine router's syntax: exact ("/healthz") or prefix ("/static/*").
SkipPaths []string `protobuf:"bytes,6,rep,name=skip_paths,json=skipPaths,proto3" json:"skip_paths,omitempty"`
SkipBodyPaths []string `protobuf:"bytes,7,rep,name=skip_body_paths,json=skipBodyPaths,proto3" json:"skip_body_paths,omitempty"`
// The rule sets to run, in order. Empty: the built-in OWASP CRS with its
// defaults.
RuleSets []*RuleSetBinding `protobuf:"bytes,8,rep,name=rule_sets,json=ruleSets,proto3" json:"rule_sets,omitempty"`
Exclusions []*Exclusion `protobuf:"bytes,9,rep,name=exclusions,proto3" json:"exclusions,omitempty"`
// Unset: the engine's body defaults.
Body *BodyConfig `protobuf:"bytes,10,opt,name=body,proto3" json:"body,omitempty"`
// What a WebSocket handshake must meet. Unset: nothing more than any
// request. Engines before 0.4.0 ignore it: the operator doesn't count
// them as enforcing a policy that sets it.
Websocket *WebSocketConfig `protobuf:"bytes,11,opt,name=websocket,proto3" json:"websocket,omitempty"`
// Unset: responses are not inspected. Engines before 0.4.0 ignore it
// and inspect requests only; the operator reports routes whose engine
// doesn't inspect responses.
Responses *ResponseConfig `protobuf:"bytes,12,opt,name=responses,proto3" json:"responses,omitempty"`
// Exclusions narrowed to an argument name, a cookie or a header. Apart
// from exclusions so that engines before 0.5.0, which don't know those
// fields, ignore them (more rules apply) instead of reading them as
// turning the rules off entirely.
TargetExclusions []*Exclusion `protobuf:"bytes,13,rep,name=target_exclusions,json=targetExclusions,proto3" json:"target_exclusions,omitempty"`
// The client addresses the policy denies or lets through uninspected,
// resolved from its IP lists. Unset: none. Engines before 0.5.0 ignore
// it: the operator doesn't count them as enforcing a policy that sets it.
IpLists *IPLists `protobuf:"bytes,14,opt,name=ip_lists,json=ipLists,proto3" json:"ip_lists,omitempty"`
// contains filtered or unexported fields
}
Policy is one WAFPolicy, applied to the requests its routes match. A request matching no route of any policy is not inspected.
func (*Policy) Descriptor
deprecated
func (*Policy) GetBody ¶
func (x *Policy) GetBody() *BodyConfig
func (*Policy) GetExclusions ¶
func (*Policy) GetFailureMode ¶
func (x *Policy) GetFailureMode() FailureMode
func (*Policy) GetIpLists ¶ added in v0.5.0
func (*Policy) GetResponses ¶ added in v0.4.0
func (x *Policy) GetResponses() *ResponseConfig
func (*Policy) GetRoutes ¶
func (x *Policy) GetRoutes() []*RouteMatch
func (*Policy) GetRuleSets ¶
func (x *Policy) GetRuleSets() []*RuleSetBinding
func (*Policy) GetSkipBodyPaths ¶
func (*Policy) GetSkipPaths ¶
func (*Policy) GetTargetExclusions ¶ added in v0.5.0
func (*Policy) GetTimeout ¶
func (x *Policy) GetTimeout() *durationpb.Duration
func (*Policy) GetWebsocket ¶ added in v0.4.0
func (x *Policy) GetWebsocket() *WebSocketConfig
func (*Policy) ProtoMessage ¶
func (*Policy) ProtoMessage()
func (*Policy) ProtoReflect ¶
func (x *Policy) ProtoReflect() protoreflect.Message
type ResponseConfig ¶ added in v0.4.0
type ResponseConfig struct {
// Inspect responses: their status and headers, and their body when its
// media type is one the rules read and max_bytes is set.
Inspect bool `protobuf:"varint,1,opt,name=inspect,proto3" json:"inspect,omitempty"`
// Bytes of a response body that are inspected; 0: the engine's default.
// A longer body has this prefix inspected, and gets on_oversize.
MaxBytes int64 `protobuf:"varint,2,opt,name=max_bytes,json=maxBytes,proto3" json:"max_bytes,omitempty"`
// What happens to a response whose body is longer than max_bytes, or
// can't be inspected (an encoding the engine can't decode): DENY
// replaces it with 502 in block mode.
OnOversize OversizeAction `` /* 130-byte string literal not displayed */
// Inspect streamed responses (Server-Sent Events, gRPC server streams)
// event by event, each up to max_bytes; false: their bodies pass
// uninspected. Engines before 0.6.0 ignore it.
Streams bool `protobuf:"varint,4,opt,name=streams,proto3" json:"streams,omitempty"`
// contains filtered or unexported fields
}
ResponseConfig configures response inspection (CRS RESPONSE-95x data leakage rules, and the user's phase 3 and 4 rules). Only adapters that see responses (ext_proc, the SPOE agent, the reverse proxy) inspect them.
func (*ResponseConfig) Descriptor
deprecated
added in
v0.4.0
func (*ResponseConfig) Descriptor() ([]byte, []int)
Deprecated: Use ResponseConfig.ProtoReflect.Descriptor instead.
func (*ResponseConfig) GetInspect ¶ added in v0.4.0
func (x *ResponseConfig) GetInspect() bool
func (*ResponseConfig) GetMaxBytes ¶ added in v0.4.0
func (x *ResponseConfig) GetMaxBytes() int64
func (*ResponseConfig) GetOnOversize ¶ added in v0.4.0
func (x *ResponseConfig) GetOnOversize() OversizeAction
func (*ResponseConfig) GetStreams ¶ added in v0.6.0
func (x *ResponseConfig) GetStreams() bool
func (*ResponseConfig) ProtoMessage ¶ added in v0.4.0
func (*ResponseConfig) ProtoMessage()
func (*ResponseConfig) ProtoReflect ¶ added in v0.4.0
func (x *ResponseConfig) ProtoReflect() protoreflect.Message
func (*ResponseConfig) Reset ¶ added in v0.4.0
func (x *ResponseConfig) Reset()
func (*ResponseConfig) String ¶ added in v0.4.0
func (x *ResponseConfig) String() string
type RouteMatch ¶
type RouteMatch struct {
// Exact host ("shop.example.com") or a wildcard ("*.example.com"), without
// a port, lower case. Empty: any host. A wildcard matches one leading label,
// as in an Ingress, unless wildcard_any_depth is set.
Host string `protobuf:"bytes,1,opt,name=host,proto3" json:"host,omitempty"`
Path *PathMatch `protobuf:"bytes,2,opt,name=path,proto3" json:"path,omitempty"`
// Methods to match, upper case. Empty: any method.
Methods []string `protobuf:"bytes,3,rep,name=methods,proto3" json:"methods,omitempty"`
// A wildcard host matches subdomains at any depth: "*.example.com" matches
// "a.b.example.com", as in a Gateway API HTTPRoute. Engines before 0.3.0
// ignore it and match one label.
WildcardAnyDepth bool `protobuf:"varint,4,opt,name=wildcard_any_depth,json=wildcardAnyDepth,proto3" json:"wildcard_any_depth,omitempty"`
// contains filtered or unexported fields
}
RouteMatch matches requests by host, path and method.
func (*RouteMatch) Descriptor
deprecated
func (*RouteMatch) Descriptor() ([]byte, []int)
Deprecated: Use RouteMatch.ProtoReflect.Descriptor instead.
func (*RouteMatch) GetHost ¶
func (x *RouteMatch) GetHost() string
func (*RouteMatch) GetMethods ¶
func (x *RouteMatch) GetMethods() []string
func (*RouteMatch) GetPath ¶
func (x *RouteMatch) GetPath() *PathMatch
func (*RouteMatch) GetWildcardAnyDepth ¶ added in v0.3.0
func (x *RouteMatch) GetWildcardAnyDepth() bool
func (*RouteMatch) ProtoMessage ¶
func (*RouteMatch) ProtoMessage()
func (*RouteMatch) ProtoReflect ¶
func (x *RouteMatch) ProtoReflect() protoreflect.Message
func (*RouteMatch) Reset ¶
func (x *RouteMatch) Reset()
func (*RouteMatch) String ¶
func (x *RouteMatch) String() string
type RuleSet ¶
type RuleSet struct {
// "WAFRuleSet/namespace/name" or "ClusterWAFRuleSet/name".
Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"`
// Types that are valid to be assigned to Source:
//
// *RuleSet_Builtin
// *RuleSet_Seclang
Source isRuleSet_Source `protobuf_oneof:"source"`
// contains filtered or unexported fields
}
RuleSet is a WAFRuleSet or ClusterWAFRuleSet, with its rules resolved.
func (*RuleSet) Descriptor
deprecated
func (*RuleSet) GetBuiltin ¶
func (x *RuleSet) GetBuiltin() BuiltinRuleSet
func (*RuleSet) GetSeclang ¶
func (*RuleSet) ProtoMessage ¶
func (*RuleSet) ProtoMessage()
func (*RuleSet) ProtoReflect ¶
func (x *RuleSet) ProtoReflect() protoreflect.Message
type RuleSetBinding ¶
type RuleSetBinding struct {
// RuleSet.id.
RuleSetId string `protobuf:"bytes,1,opt,name=rule_set_id,json=ruleSetId,proto3" json:"rule_set_id,omitempty"`
// OWASP CRS paranoia level, 1-4; 0: the default. Built-in CRS only.
ParanoiaLevel int32 `protobuf:"varint,2,opt,name=paranoia_level,json=paranoiaLevel,proto3" json:"paranoia_level,omitempty"`
// OWASP CRS inbound anomaly threshold; 0: the default. Built-in CRS only.
InboundAnomalyThreshold int32 `` /* 133-byte string literal not displayed */
// The CRS's other settings. Built-in CRS only. Engines before 0.5.0
// ignore it.
Crs *CRSSettings `protobuf:"bytes,4,opt,name=crs,proto3" json:"crs,omitempty"`
// Where a SecLang rule set loads: unset, after the built-in CRS. Ignored
// for the built-in CRS. Engines before 0.6.0 ignore it and load the rule
// set after the CRS: the operator doesn't count them as enforcing a
// policy that places one before it.
Placement RuleSetPlacement `protobuf:"varint,5,opt,name=placement,proto3,enum=inkwall.bundle.v1.RuleSetPlacement" json:"placement,omitempty"`
// contains filtered or unexported fields
}
RuleSetBinding uses a rule set in a policy.
func (*RuleSetBinding) Descriptor
deprecated
func (*RuleSetBinding) Descriptor() ([]byte, []int)
Deprecated: Use RuleSetBinding.ProtoReflect.Descriptor instead.
func (*RuleSetBinding) GetCrs ¶ added in v0.5.0
func (x *RuleSetBinding) GetCrs() *CRSSettings
func (*RuleSetBinding) GetInboundAnomalyThreshold ¶
func (x *RuleSetBinding) GetInboundAnomalyThreshold() int32
func (*RuleSetBinding) GetParanoiaLevel ¶
func (x *RuleSetBinding) GetParanoiaLevel() int32
func (*RuleSetBinding) GetPlacement ¶ added in v0.6.0
func (x *RuleSetBinding) GetPlacement() RuleSetPlacement
func (*RuleSetBinding) GetRuleSetId ¶
func (x *RuleSetBinding) GetRuleSetId() string
func (*RuleSetBinding) ProtoMessage ¶
func (*RuleSetBinding) ProtoMessage()
func (*RuleSetBinding) ProtoReflect ¶
func (x *RuleSetBinding) ProtoReflect() protoreflect.Message
func (*RuleSetBinding) Reset ¶
func (x *RuleSetBinding) Reset()
func (*RuleSetBinding) String ¶
func (x *RuleSetBinding) String() string
type RuleSetPlacement ¶ added in v0.6.0
type RuleSetPlacement int32
RuleSetPlacement is where a SecLang rule set loads, relative to the built-in CRS. Rule sets of the same placement load in the policy's order.
const ( // After the CRS, as RULE_SET_PLACEMENT_AFTER_CRS. RuleSetPlacement_RULE_SET_PLACEMENT_UNSPECIFIED RuleSetPlacement = 0 // After the CRS: custom rules and configure-time exclusions // (SecRuleRemoveById, SecRuleUpdateTargetById). RuleSetPlacement_RULE_SET_PLACEMENT_AFTER_CRS RuleSetPlacement = 1 // Before the CRS (and its initialization, REQUEST-901), as the standalone // engine's --rules-before-crs: rules that set the CRS's TX variables or // turn CRS rules off at runtime (ctl:ruleRemoveById). RuleSetPlacement_RULE_SET_PLACEMENT_BEFORE_CRS RuleSetPlacement = 2 )
func (RuleSetPlacement) Descriptor ¶ added in v0.6.0
func (RuleSetPlacement) Descriptor() protoreflect.EnumDescriptor
func (RuleSetPlacement) Enum ¶ added in v0.6.0
func (x RuleSetPlacement) Enum() *RuleSetPlacement
func (RuleSetPlacement) EnumDescriptor
deprecated
added in
v0.6.0
func (RuleSetPlacement) EnumDescriptor() ([]byte, []int)
Deprecated: Use RuleSetPlacement.Descriptor instead.
func (RuleSetPlacement) Number ¶ added in v0.6.0
func (x RuleSetPlacement) Number() protoreflect.EnumNumber
func (RuleSetPlacement) String ¶ added in v0.6.0
func (x RuleSetPlacement) String() string
func (RuleSetPlacement) Type ¶ added in v0.6.0
func (RuleSetPlacement) Type() protoreflect.EnumType
type RuleSet_Builtin ¶
type RuleSet_Builtin struct {
// A rule set shipped in the engine image.
Builtin BuiltinRuleSet `protobuf:"varint,2,opt,name=builtin,proto3,enum=inkwall.bundle.v1.BuiltinRuleSet,oneof"`
}
type RuleSet_Seclang ¶
type RuleSet_Seclang struct {
// SecLang rules, loaded after the Core Rule Set. Rules read from a
// ConfigMap are inlined here by the operator.
Seclang string `protobuf:"bytes,3,opt,name=seclang,proto3,oneof"`
}
type SignedBundle ¶
type SignedBundle struct {
// A serialized Bundle.
Bundle []byte `protobuf:"bytes,1,opt,name=bundle,proto3" json:"bundle,omitempty"`
// Ed25519 signature of bundle.
Signature []byte `protobuf:"bytes,2,opt,name=signature,proto3" json:"signature,omitempty"`
// The signing key, so engines can hold the old and the new public key
// while the key rotates.
KeyId string `protobuf:"bytes,3,opt,name=key_id,json=keyId,proto3" json:"key_id,omitempty"`
// contains filtered or unexported fields
}
SignedBundle carries a Bundle with its signature. The signature covers the exact bytes of bundle, so the engine verifies before decoding, and re-encoding never invalidates it (protobuf encoding is not canonical).
func (*SignedBundle) Descriptor
deprecated
func (*SignedBundle) Descriptor() ([]byte, []int)
Deprecated: Use SignedBundle.ProtoReflect.Descriptor instead.
func (*SignedBundle) GetBundle ¶
func (x *SignedBundle) GetBundle() []byte
func (*SignedBundle) GetKeyId ¶
func (x *SignedBundle) GetKeyId() string
func (*SignedBundle) GetSignature ¶
func (x *SignedBundle) GetSignature() []byte
func (*SignedBundle) ProtoMessage ¶
func (*SignedBundle) ProtoMessage()
func (*SignedBundle) ProtoReflect ¶
func (x *SignedBundle) ProtoReflect() protoreflect.Message
func (*SignedBundle) Reset ¶
func (x *SignedBundle) Reset()
func (*SignedBundle) String ¶
func (x *SignedBundle) String() string
type WebSocketConfig ¶ added in v0.4.0
type WebSocketConfig struct {
// The origins a handshake may come from: "scheme://host" or
// "scheme://host:port", lower case, http or https; the host may start
// with "*." to match any subdomain. Empty: any origin.
AllowedOrigins []string `protobuf:"bytes,1,rep,name=allowed_origins,json=allowedOrigins,proto3" json:"allowed_origins,omitempty"`
// Let a handshake without an Origin header pass the origin check.
AllowMissingOrigin bool `protobuf:"varint,2,opt,name=allow_missing_origin,json=allowMissingOrigin,proto3" json:"allow_missing_origin,omitempty"`
// Headers a handshake must have, not empty.
RequiredHeaders []string `protobuf:"bytes,3,rep,name=required_headers,json=requiredHeaders,proto3" json:"required_headers,omitempty"`
// contains filtered or unexported fields
}
WebSocketConfig is what a WebSocket handshake (a request with an Upgrade: websocket, Sec-WebSocket-Key or Sec-WebSocket-Version header) must meet. One that doesn't is denied with 403 in block mode, logged in detect mode. Other requests aren't affected.
func (*WebSocketConfig) Descriptor
deprecated
added in
v0.4.0
func (*WebSocketConfig) Descriptor() ([]byte, []int)
Deprecated: Use WebSocketConfig.ProtoReflect.Descriptor instead.
func (*WebSocketConfig) GetAllowMissingOrigin ¶ added in v0.4.0
func (x *WebSocketConfig) GetAllowMissingOrigin() bool
func (*WebSocketConfig) GetAllowedOrigins ¶ added in v0.4.0
func (x *WebSocketConfig) GetAllowedOrigins() []string
func (*WebSocketConfig) GetRequiredHeaders ¶ added in v0.4.0
func (x *WebSocketConfig) GetRequiredHeaders() []string
func (*WebSocketConfig) ProtoMessage ¶ added in v0.4.0
func (*WebSocketConfig) ProtoMessage()
func (*WebSocketConfig) ProtoReflect ¶ added in v0.4.0
func (x *WebSocketConfig) ProtoReflect() protoreflect.Message
func (*WebSocketConfig) Reset ¶ added in v0.4.0
func (x *WebSocketConfig) Reset()
func (*WebSocketConfig) String ¶ added in v0.4.0
func (x *WebSocketConfig) String() string