bundlev1

package
v0.4.3 Latest Latest
Warning

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

Go to latest
Published: Nov 17, 2026 License: Apache-2.0 Imports: 7 Imported by: 1 module, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

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

Examples

Constants

This section is empty.

Variables

View Source
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.

View Source
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.

View Source
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.

View Source
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.

View Source
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.

View Source
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"`
	// 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) GetGrpcMessages added in v0.4.0

func (x *BodyConfig) GetGrpcMessages() 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) Enum

func (x BuiltinRuleSet) Enum() *BuiltinRuleSet

func (BuiltinRuleSet) EnumDescriptor deprecated

func (BuiltinRuleSet) EnumDescriptor() ([]byte, []int)

Deprecated: Use BuiltinRuleSet.Descriptor instead.

func (BuiltinRuleSet) Number

func (BuiltinRuleSet) String

func (x BuiltinRuleSet) String() string

func (BuiltinRuleSet) Type

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"`
	// contains filtered or unexported fields
}

Bundle is the complete policy of one cluster.

func (*Bundle) Descriptor deprecated

func (*Bundle) Descriptor() ([]byte, []int)

Deprecated: Use Bundle.ProtoReflect.Descriptor instead.

func (*Bundle) GetClusterId

func (x *Bundle) GetClusterId() string

func (*Bundle) GetContentHash

func (x *Bundle) GetContentHash() []byte

func (*Bundle) GetCreatedAt

func (x *Bundle) GetCreatedAt() *timestamppb.Timestamp

func (*Bundle) GetPolicies

func (x *Bundle) GetPolicies() []*Policy

func (*Bundle) GetPolicyVersions added in v0.3.0

func (x *Bundle) GetPolicyVersions() []uint64

func (*Bundle) GetProbeKey added in v0.4.0

func (x *Bundle) GetProbeKey() []byte

func (*Bundle) GetRuleSets

func (x *Bundle) GetRuleSets() []*RuleSet

func (*Bundle) GetSuspended

func (x *Bundle) GetSuspended() bool

func (*Bundle) GetVersion

func (x *Bundle) GetVersion() uint64

func (*Bundle) ProtoMessage

func (*Bundle) ProtoMessage()

func (*Bundle) ProtoReflect

func (x *Bundle) ProtoReflect() protoreflect.Message

func (*Bundle) Reset

func (x *Bundle) Reset()

func (*Bundle) String

func (x *Bundle) 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: the rules are off entirely (on path, when set).
	Argument string `protobuf:"bytes,3,opt,name=argument,proto3" json:"argument,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) Descriptor() ([]byte, []int)

Deprecated: Use Exclusion.ProtoReflect.Descriptor instead.

func (*Exclusion) GetArgument

func (x *Exclusion) GetArgument() string

func (*Exclusion) GetPath

func (x *Exclusion) GetPath() string

func (*Exclusion) GetRuleIds

func (x *Exclusion) GetRuleIds() []uint32

func (*Exclusion) ProtoMessage

func (*Exclusion) ProtoMessage()

func (*Exclusion) ProtoReflect

func (x *Exclusion) ProtoReflect() protoreflect.Message

func (*Exclusion) Reset

func (x *Exclusion) Reset()

func (*Exclusion) String

func (x *Exclusion) String() string

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) 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

type Mode

type Mode int32

Mode is what the engine does with a request the rules flag.

const (
	Mode_MODE_UNSPECIFIED Mode = 0
	// Log the verdict, let the request through.
	Mode_MODE_DETECT Mode = 1
	// Reject the request.
	Mode_MODE_BLOCK Mode = 2
)

func (Mode) Descriptor

func (Mode) Descriptor() protoreflect.EnumDescriptor

func (Mode) Enum

func (x Mode) Enum() *Mode

func (Mode) EnumDescriptor deprecated

func (Mode) EnumDescriptor() ([]byte, []int)

Deprecated: Use Mode.Descriptor instead.

func (Mode) Number

func (x Mode) Number() protoreflect.EnumNumber

func (Mode) String

func (x Mode) String() string

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) Enum

func (x OversizeAction) Enum() *OversizeAction

func (OversizeAction) EnumDescriptor deprecated

func (OversizeAction) EnumDescriptor() ([]byte, []int)

Deprecated: Use OversizeAction.Descriptor instead.

func (OversizeAction) Number

func (OversizeAction) String

func (x OversizeAction) String() string

func (OversizeAction) Type

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) Descriptor() ([]byte, []int)

Deprecated: Use PathMatch.ProtoReflect.Descriptor instead.

func (*PathMatch) GetType

func (x *PathMatch) GetType() PathMatchType

func (*PathMatch) GetValue

func (x *PathMatch) GetValue() string

func (*PathMatch) ProtoMessage

func (*PathMatch) ProtoMessage()

func (*PathMatch) ProtoReflect

func (x *PathMatch) ProtoReflect() protoreflect.Message

func (*PathMatch) Reset

func (x *PathMatch) Reset()

func (*PathMatch) String

func (x *PathMatch) String() string

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) Enum

func (x PathMatchType) Enum() *PathMatchType

func (PathMatchType) EnumDescriptor deprecated

func (PathMatchType) EnumDescriptor() ([]byte, []int)

Deprecated: Use PathMatchType.Descriptor instead.

func (PathMatchType) Number

func (PathMatchType) String

func (x PathMatchType) String() string

func (PathMatchType) Type

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"`
	// 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) Descriptor() ([]byte, []int)

Deprecated: Use Policy.ProtoReflect.Descriptor instead.

func (*Policy) GetBody

func (x *Policy) GetBody() *BodyConfig

func (*Policy) GetExclusions

func (x *Policy) GetExclusions() []*Exclusion

func (*Policy) GetFailureMode

func (x *Policy) GetFailureMode() FailureMode

func (*Policy) GetId

func (x *Policy) GetId() string

func (*Policy) GetMode

func (x *Policy) GetMode() Mode

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 (x *Policy) GetSkipBodyPaths() []string

func (*Policy) GetSkipPaths

func (x *Policy) GetSkipPaths() []string

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

func (*Policy) Reset

func (x *Policy) Reset()

func (*Policy) String

func (x *Policy) String() string

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 */
	// 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) 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) 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) Descriptor() ([]byte, []int)

Deprecated: Use RuleSet.ProtoReflect.Descriptor instead.

func (*RuleSet) GetBuiltin

func (x *RuleSet) GetBuiltin() BuiltinRuleSet

func (*RuleSet) GetId

func (x *RuleSet) GetId() string

func (*RuleSet) GetSeclang

func (x *RuleSet) GetSeclang() string

func (*RuleSet) GetSource

func (x *RuleSet) GetSource() isRuleSet_Source

func (*RuleSet) ProtoMessage

func (*RuleSet) ProtoMessage()

func (*RuleSet) ProtoReflect

func (x *RuleSet) ProtoReflect() protoreflect.Message

func (*RuleSet) Reset

func (x *RuleSet) Reset()

func (*RuleSet) String

func (x *RuleSet) String() string

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 */
	// 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) GetInboundAnomalyThreshold

func (x *RuleSetBinding) GetInboundAnomalyThreshold() int32

func (*RuleSetBinding) GetParanoiaLevel

func (x *RuleSetBinding) GetParanoiaLevel() int32

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 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

Jump to

Keyboard shortcuts

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