bundlev1

package
v0.7.0-rc.1 Latest Latest
Warning

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

Go to latest
Published: Nov 29, 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 (
	GRPCFieldKind_name = map[int32]string{
		0: "GRPC_FIELD_KIND_UNSPECIFIED",
		1: "GRPC_FIELD_KIND_STRING",
		2: "GRPC_FIELD_KIND_BYTES",
		3: "GRPC_FIELD_KIND_MESSAGE",
		4: "GRPC_FIELD_KIND_GROUP",
		5: "GRPC_FIELD_KIND_VARINT",
		6: "GRPC_FIELD_KIND_FIXED32",
		7: "GRPC_FIELD_KIND_FIXED64",
	}
	GRPCFieldKind_value = map[string]int32{
		"GRPC_FIELD_KIND_UNSPECIFIED": 0,
		"GRPC_FIELD_KIND_STRING":      1,
		"GRPC_FIELD_KIND_BYTES":       2,
		"GRPC_FIELD_KIND_MESSAGE":     3,
		"GRPC_FIELD_KIND_GROUP":       4,
		"GRPC_FIELD_KIND_VARINT":      5,
		"GRPC_FIELD_KIND_FIXED32":     6,
		"GRPC_FIELD_KIND_FIXED64":     7,
	}
)

Enum value maps for GRPCFieldKind.

View Source
var (
	LLMFormat_name = map[int32]string{
		0: "LLM_FORMAT_UNSPECIFIED",
		1: "LLM_FORMAT_OPENAI_CHAT",
		2: "LLM_FORMAT_OPENAI_RESPONSES",
		3: "LLM_FORMAT_OPENAI_EMBEDDINGS",
		4: "LLM_FORMAT_ANTHROPIC_MESSAGES",
	}
	LLMFormat_value = map[string]int32{
		"LLM_FORMAT_UNSPECIFIED":        0,
		"LLM_FORMAT_OPENAI_CHAT":        1,
		"LLM_FORMAT_OPENAI_RESPONSES":   2,
		"LLM_FORMAT_OPENAI_EMBEDDINGS":  3,
		"LLM_FORMAT_ANTHROPIC_MESSAGES": 4,
	}
)

Enum value maps for LLMFormat.

View Source
var (
	LLMRole_name = map[int32]string{
		0: "LLM_ROLE_UNSPECIFIED",
		1: "LLM_ROLE_SYSTEM",
		2: "LLM_ROLE_DEVELOPER",
		3: "LLM_ROLE_USER",
		4: "LLM_ROLE_ASSISTANT",
		5: "LLM_ROLE_TOOL",
	}
	LLMRole_value = map[string]int32{
		"LLM_ROLE_UNSPECIFIED": 0,
		"LLM_ROLE_SYSTEM":      1,
		"LLM_ROLE_DEVELOPER":   2,
		"LLM_ROLE_USER":        3,
		"LLM_ROLE_ASSISTANT":   4,
		"LLM_ROLE_TOOL":        5,
	}
)

Enum value maps for LLMRole.

View Source
var (
	LLMToolsAllow_name = map[int32]string{
		0: "LLM_TOOLS_ALLOW_UNSPECIFIED",
		1: "LLM_TOOLS_ALLOW_NONE",
		2: "LLM_TOOLS_ALLOW_LISTED",
	}
	LLMToolsAllow_value = map[string]int32{
		"LLM_TOOLS_ALLOW_UNSPECIFIED": 0,
		"LLM_TOOLS_ALLOW_NONE":        1,
		"LLM_TOOLS_ALLOW_LISTED":      2,
	}
)

Enum value maps for LLMToolsAllow.

View Source
var (
	RateLimitCost_name = map[int32]string{
		0: "RATE_LIMIT_COST_UNSPECIFIED",
		1: "RATE_LIMIT_COST_LLM_TOKENS",
	}
	RateLimitCost_value = map[string]int32{
		"RATE_LIMIT_COST_UNSPECIFIED": 0,
		"RATE_LIMIT_COST_LLM_TOKENS":  1,
	}
)

Enum value maps for RateLimitCost.

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

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"`
	// 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"`
	// With grpc_messages, the id of the Bundle.grpc_schemas entry the
	// messages of described methods are read with (design 0013); empty: read
	// without a schema. Engines before 0.7.0 ignore it: the operator doesn't
	// count them as enforcing a policy that sets it.
	GrpcSchemaId string `protobuf:"bytes,20,opt,name=grpc_schema_id,json=grpcSchemaId,proto3" json:"grpc_schema_id,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) GetGrpcSchemaId

func (x *BodyConfig) GetGrpcSchemaId() string

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"`
	// 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"`
	// The country table the policies' geo blocking uses (design 0011 §4.3),
	// set only when some policy uses it. The table travels on its own on the
	// stream (agent.v1 CountryTableMessage) and in the inkwall-geo Secrets;
	// the bundle, signed, pins it by hash. Unset: geo is skipped. Engines
	// before 0.7.0 ignore it.
	GeoTable *GeoTableRef `protobuf:"bytes,11,opt,name=geo_table,json=geoTable,proto3" json:"geo_table,omitempty"`
	// The denial of a policy that sets none
	// (InkwallConfig.spec.engine.denyResponse). Unset: the engine's own.
	// Engines before 0.7.0 ignore it.
	DenyResponse *DenyResponse `protobuf:"bytes,12,opt,name=deny_response,json=denyResponse,proto3" json:"deny_response,omitempty"`
	// The gRPC schemas the policies read messages with
	// (BodyConfig.grpc_schema_id), each once, sorted by id (design 0013 §5.3).
	// Engines before 0.7.0 ignore them and read messages without a schema.
	GrpcSchemas []*GRPCSchema `protobuf:"bytes,20,rep,name=grpc_schemas,json=grpcSchemas,proto3" json:"grpc_schemas,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) GetDenyResponse

func (x *Bundle) GetDenyResponse() *DenyResponse

func (*Bundle) GetEvents added in v0.5.0

func (x *Bundle) GetEvents() *EventsConfig

func (*Bundle) GetGeoTable

func (x *Bundle) GetGeoTable() *GeoTableRef

func (*Bundle) GetGrpcSchemas

func (x *Bundle) GetGrpcSchemas() []*GRPCSchema

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

type ClientIPKey struct {

	// 0: 56.
	Ipv6PrefixLength uint32 `protobuf:"varint,1,opt,name=ipv6_prefix_length,json=ipv6PrefixLength,proto3" json:"ipv6_prefix_length,omitempty"`
	// contains filtered or unexported fields
}

func (*ClientIPKey) Descriptor deprecated

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

Deprecated: Use ClientIPKey.ProtoReflect.Descriptor instead.

func (*ClientIPKey) GetIpv6PrefixLength

func (x *ClientIPKey) GetIpv6PrefixLength() uint32

func (*ClientIPKey) ProtoMessage

func (*ClientIPKey) ProtoMessage()

func (*ClientIPKey) ProtoReflect

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

func (*ClientIPKey) Reset

func (x *ClientIPKey) Reset()

func (*ClientIPKey) String

func (x *ClientIPKey) String() string

type DenyResponse

type DenyResponse struct {

	// text/html, text/plain, application/json or application/problem+json,
	// with charset=utf-8 or no parameter.
	ContentType string `protobuf:"bytes,1,opt,name=content_type,json=contentType,proto3" json:"content_type,omitempty"`
	// At most 8 KiB of UTF-8. Each {{request_id}} in it is replaced with the
	// request's ID, escaped for the content type.
	Body string `protobuf:"bytes,2,opt,name=body,proto3" json:"body,omitempty"`
	// contains filtered or unexported fields
}

DenyResponse is the body of a policy's denials (docs/denial-responses.md): every denial its verdicts give, with the verdict's status and headers. A denied gRPC call keeps its gRPC status and no body.

func (*DenyResponse) Descriptor deprecated

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

Deprecated: Use DenyResponse.ProtoReflect.Descriptor instead.

func (*DenyResponse) GetBody

func (x *DenyResponse) GetBody() string

func (*DenyResponse) GetContentType

func (x *DenyResponse) GetContentType() string

func (*DenyResponse) ProtoMessage

func (*DenyResponse) ProtoMessage()

func (*DenyResponse) ProtoReflect

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

func (*DenyResponse) Reset

func (x *DenyResponse) Reset()

func (*DenyResponse) String

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

Deprecated: Use Exclusion.ProtoReflect.Descriptor instead.

func (*Exclusion) GetArgument

func (x *Exclusion) GetArgument() string

func (*Exclusion) GetArgumentName added in v0.5.0

func (x *Exclusion) GetArgumentName() string

func (*Exclusion) GetCookie added in v0.5.0

func (x *Exclusion) GetCookie() string

func (*Exclusion) GetHeader added in v0.5.0

func (x *Exclusion) GetHeader() 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 GRPCField

type GRPCField struct {
	Number uint32 `protobuf:"varint,1,opt,name=number,proto3" json:"number,omitempty"`
	// The proto name, or "[package.extension]" for an extension.
	Name string        `protobuf:"bytes,2,opt,name=name,proto3" json:"name,omitempty"`
	Kind GRPCFieldKind `protobuf:"varint,3,opt,name=kind,proto3,enum=inkwall.bundle.v1.GRPCFieldKind" json:"kind,omitempty"`
	// For MESSAGE and GROUP only: the field's type, an index into
	// GRPCSchema.messages.
	Message uint32 `protobuf:"varint,4,opt,name=message,proto3" json:"message,omitempty"`
	// The field is repeated: a repeated number may come packed.
	Repeated bool `protobuf:"varint,5,opt,name=repeated,proto3" json:"repeated,omitempty"`
	// contains filtered or unexported fields
}

GRPCField is a field of a message type.

func (*GRPCField) Descriptor deprecated

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

Deprecated: Use GRPCField.ProtoReflect.Descriptor instead.

func (*GRPCField) GetKind

func (x *GRPCField) GetKind() GRPCFieldKind

func (*GRPCField) GetMessage

func (x *GRPCField) GetMessage() uint32

func (*GRPCField) GetName

func (x *GRPCField) GetName() string

func (*GRPCField) GetNumber

func (x *GRPCField) GetNumber() uint32

func (*GRPCField) GetRepeated

func (x *GRPCField) GetRepeated() bool

func (*GRPCField) ProtoMessage

func (*GRPCField) ProtoMessage()

func (*GRPCField) ProtoReflect

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

func (*GRPCField) Reset

func (x *GRPCField) Reset()

func (*GRPCField) String

func (x *GRPCField) String() string

type GRPCFieldKind

type GRPCFieldKind int32

GRPCFieldKind is how a field is read.

const (
	GRPCFieldKind_GRPC_FIELD_KIND_UNSPECIFIED GRPCFieldKind = 0
	GRPCFieldKind_GRPC_FIELD_KIND_STRING      GRPCFieldKind = 1
	GRPCFieldKind_GRPC_FIELD_KIND_BYTES       GRPCFieldKind = 2
	GRPCFieldKind_GRPC_FIELD_KIND_MESSAGE     GRPCFieldKind = 3
	GRPCFieldKind_GRPC_FIELD_KIND_GROUP       GRPCFieldKind = 4
	// int32, int64, uint32, uint64, sint32, sint64, bool, enum.
	GRPCFieldKind_GRPC_FIELD_KIND_VARINT GRPCFieldKind = 5
	// fixed32, sfixed32, float.
	GRPCFieldKind_GRPC_FIELD_KIND_FIXED32 GRPCFieldKind = 6
	// fixed64, sfixed64, double.
	GRPCFieldKind_GRPC_FIELD_KIND_FIXED64 GRPCFieldKind = 7
)

func (GRPCFieldKind) Descriptor

func (GRPCFieldKind) Enum

func (x GRPCFieldKind) Enum() *GRPCFieldKind

func (GRPCFieldKind) EnumDescriptor deprecated

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

Deprecated: Use GRPCFieldKind.Descriptor instead.

func (GRPCFieldKind) Number

func (GRPCFieldKind) String

func (x GRPCFieldKind) String() string

func (GRPCFieldKind) Type

type GRPCMessage

type GRPCMessage struct {

	// The full name ("package.Message"), which an Any's type_url ends with.
	FullName string `protobuf:"bytes,1,opt,name=full_name,json=fullName,proto3" json:"full_name,omitempty"`
	// Sorted by number, each number once.
	Fields []*GRPCField `protobuf:"bytes,2,rep,name=fields,proto3" json:"fields,omitempty"`
	// google.protobuf.Any: field 1 is the type_url, field 2 the value of
	// the type it names.
	Any bool `protobuf:"varint,3,opt,name=any,proto3" json:"any,omitempty"`
	// contains filtered or unexported fields
}

GRPCMessage is a message type.

func (*GRPCMessage) Descriptor deprecated

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

Deprecated: Use GRPCMessage.ProtoReflect.Descriptor instead.

func (*GRPCMessage) GetAny

func (x *GRPCMessage) GetAny() bool

func (*GRPCMessage) GetFields

func (x *GRPCMessage) GetFields() []*GRPCField

func (*GRPCMessage) GetFullName

func (x *GRPCMessage) GetFullName() string

func (*GRPCMessage) ProtoMessage

func (*GRPCMessage) ProtoMessage()

func (*GRPCMessage) ProtoReflect

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

func (*GRPCMessage) Reset

func (x *GRPCMessage) Reset()

func (*GRPCMessage) String

func (x *GRPCMessage) String() string

type GRPCMethod

type GRPCMethod struct {

	// "/package.Service/Method", as a call's :path.
	Path string `protobuf:"bytes,1,opt,name=path,proto3" json:"path,omitempty"`
	// The input type: an index into GRPCSchema.messages.
	Input uint32 `protobuf:"varint,2,opt,name=input,proto3" json:"input,omitempty"`
	// The output type, for responses (later): an index into
	// GRPCSchema.messages.
	Output uint32 `protobuf:"varint,3,opt,name=output,proto3" json:"output,omitempty"`
	// contains filtered or unexported fields
}

GRPCMethod is a method of a service the schema describes.

func (*GRPCMethod) Descriptor deprecated

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

Deprecated: Use GRPCMethod.ProtoReflect.Descriptor instead.

func (*GRPCMethod) GetInput

func (x *GRPCMethod) GetInput() uint32

func (*GRPCMethod) GetOutput

func (x *GRPCMethod) GetOutput() uint32

func (*GRPCMethod) GetPath

func (x *GRPCMethod) GetPath() string

func (*GRPCMethod) ProtoMessage

func (*GRPCMethod) ProtoMessage()

func (*GRPCMethod) ProtoReflect

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

func (*GRPCMethod) Reset

func (x *GRPCMethod) Reset()

func (*GRPCMethod) String

func (x *GRPCMethod) String() string

type GRPCSchema

type GRPCSchema struct {

	// Hex SHA-256 of the SHA-256 of methods and messages as serialized, and
	// the source: names the schema in BodyConfig.grpc_schema_id, and in the
	// engine's cache. Policies share an entry when they name the same
	// ConfigMap key with the same content.
	Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"`
	// Sorted by path, each once.
	Methods []*GRPCMethod `protobuf:"bytes,2,rep,name=methods,proto3" json:"methods,omitempty"`
	// Referenced by index from methods and fields.
	Messages []*GRPCMessage `protobuf:"bytes,3,rep,name=messages,proto3" json:"messages,omitempty"`
	// "namespace/configmap/key": where the descriptor set came from, for
	// inkwallctl explain.
	Source string `protobuf:"bytes,4,opt,name=source,proto3" json:"source,omitempty"`
	// contains filtered or unexported fields
}

GRPCSchema is a policy's descriptor set (a FileDescriptorSet the operator validated), compiled into what reading a gRPC message needs (design 0013 §5.2): the methods' input and output types and each message's fields, by number. Engines check its integers on load and never parse descriptors.

func (*GRPCSchema) Descriptor deprecated

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

Deprecated: Use GRPCSchema.ProtoReflect.Descriptor instead.

func (*GRPCSchema) GetId

func (x *GRPCSchema) GetId() string

func (*GRPCSchema) GetMessages

func (x *GRPCSchema) GetMessages() []*GRPCMessage

func (*GRPCSchema) GetMethods

func (x *GRPCSchema) GetMethods() []*GRPCMethod

func (*GRPCSchema) GetSource

func (x *GRPCSchema) GetSource() string

func (*GRPCSchema) ProtoMessage

func (*GRPCSchema) ProtoMessage()

func (*GRPCSchema) ProtoReflect

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

func (*GRPCSchema) Reset

func (x *GRPCSchema) Reset()

func (*GRPCSchema) String

func (x *GRPCSchema) String() string

type Geo

type Geo struct {

	// Country codes (ISO 3166-1 alpha-2, upper case), one of the two: a
	// client in a deny-listed country is denied; with an allow list, a
	// client in any other country is.
	Deny  []string `protobuf:"bytes,1,rep,name=deny,proto3" json:"deny,omitempty"`
	Allow []string `protobuf:"bytes,2,rep,name=allow,proto3" json:"allow,omitempty"`
	// A public address the table has no country for is denied too.
	UnknownDeny bool `protobuf:"varint,3,opt,name=unknown_deny,json=unknownDeny,proto3" json:"unknown_deny,omitempty"`
	// Geo only logs, on a Block policy too.
	Detect bool `protobuf:"varint,4,opt,name=detect,proto3" json:"detect,omitempty"`
	// contains filtered or unexported fields
}

Geo is a policy's geo blocking.

func (*Geo) Descriptor deprecated

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

Deprecated: Use Geo.ProtoReflect.Descriptor instead.

func (*Geo) GetAllow

func (x *Geo) GetAllow() []string

func (*Geo) GetDeny

func (x *Geo) GetDeny() []string

func (*Geo) GetDetect

func (x *Geo) GetDetect() bool

func (*Geo) GetUnknownDeny

func (x *Geo) GetUnknownDeny() bool

func (*Geo) ProtoMessage

func (*Geo) ProtoMessage()

func (*Geo) ProtoReflect

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

func (*Geo) Reset

func (x *Geo) Reset()

func (*Geo) String

func (x *Geo) String() string

type GeoTableRef

type GeoTableRef struct {

	// The table hash: the SHA-256 of the gzipped CountryTable, as it is sent
	// and stored.
	Sha256 []byte `protobuf:"bytes,1,opt,name=sha256,proto3" json:"sha256,omitempty"`
	// The serialized CountryTable's size: the engine decompresses no more.
	Size uint64 `protobuf:"varint,2,opt,name=size,proto3" json:"size,omitempty"`
	// contains filtered or unexported fields
}

GeoTableRef names a country table.

func (*GeoTableRef) Descriptor deprecated

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

Deprecated: Use GeoTableRef.ProtoReflect.Descriptor instead.

func (*GeoTableRef) GetSha256

func (x *GeoTableRef) GetSha256() []byte

func (*GeoTableRef) GetSize

func (x *GeoTableRef) GetSize() uint64

func (*GeoTableRef) ProtoMessage

func (*GeoTableRef) ProtoMessage()

func (*GeoTableRef) ProtoReflect

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

func (*GeoTableRef) Reset

func (x *GeoTableRef) Reset()

func (*GeoTableRef) String

func (x *GeoTableRef) String() string

type HeaderKey

type HeaderKey struct {

	// Lower case.
	Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"`
	// contains filtered or unexported fields
}

HeaderKey counts by a header's first value, hashed; a request without it counts by its client IP.

func (*HeaderKey) Descriptor deprecated

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

Deprecated: Use HeaderKey.ProtoReflect.Descriptor instead.

func (*HeaderKey) GetName

func (x *HeaderKey) GetName() string

func (*HeaderKey) ProtoMessage

func (*HeaderKey) ProtoMessage()

func (*HeaderKey) ProtoReflect

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

func (*HeaderKey) Reset

func (x *HeaderKey) Reset()

func (*HeaderKey) String

func (x *HeaderKey) String() string

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

Deprecated: Use IPLists.ProtoReflect.Descriptor instead.

func (*IPLists) GetAllow added in v0.5.0

func (x *IPLists) GetAllow() []string

func (*IPLists) GetDeny added in v0.5.0

func (x *IPLists) GetDeny() []string

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

func (*IPLists) Reset added in v0.5.0

func (x *IPLists) Reset()

func (*IPLists) String added in v0.5.0

func (x *IPLists) String() string

type LLM

type LLM struct {

	// At most 8, their paths unique across them.
	Endpoints []*LLMEndpoint `protobuf:"bytes,1,rep,name=endpoints,proto3" json:"endpoints,omitempty"`
	// The body read on an endpoint, instead of body.max_bytes. 0: 1 MiB.
	MaxBodyBytes int64 `protobuf:"varint,2,opt,name=max_body_bytes,json=maxBodyBytes,proto3" json:"max_body_bytes,omitempty"`
	// The rule sets also inspect the endpoints' request and response
	// bodies; false: their method, URI, headers and cookies only.
	RuleSetBody bool `protobuf:"varint,3,opt,name=rule_set_body,json=ruleSetBody,proto3" json:"rule_set_body,omitempty"`
	// Unset: only that bodies are well-formed.
	Request *LLMRequestChecks `protobuf:"bytes,4,opt,name=request,proto3" json:"request,omitempty"`
	// contains filtered or unexported fields
}

LLM is a policy's LLM API endpoints: their bodies are read up to max_body_bytes, parsed and checked, and the rule sets skip them unless rule_set_body.

func (*LLM) Descriptor deprecated

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

Deprecated: Use LLM.ProtoReflect.Descriptor instead.

func (*LLM) GetEndpoints

func (x *LLM) GetEndpoints() []*LLMEndpoint

func (*LLM) GetMaxBodyBytes

func (x *LLM) GetMaxBodyBytes() int64

func (*LLM) GetRequest

func (x *LLM) GetRequest() *LLMRequestChecks

func (*LLM) GetRuleSetBody

func (x *LLM) GetRuleSetBody() bool

func (*LLM) ProtoMessage

func (*LLM) ProtoMessage()

func (*LLM) ProtoReflect

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

func (*LLM) Reset

func (x *LLM) Reset()

func (*LLM) String

func (x *LLM) String() string

type LLMEndpoint

type LLMEndpoint struct {

	// Exact paths or prefixes ending in "*", compared as RateLimit.paths.
	Paths  []string  `protobuf:"bytes,1,rep,name=paths,proto3" json:"paths,omitempty"`
	Format LLMFormat `protobuf:"varint,2,opt,name=format,proto3,enum=inkwall.bundle.v1.LLMFormat" json:"format,omitempty"`
	// contains filtered or unexported fields
}

LLMEndpoint is paths of the policy's routes that serve one LLM API.

func (*LLMEndpoint) Descriptor deprecated

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

Deprecated: Use LLMEndpoint.ProtoReflect.Descriptor instead.

func (*LLMEndpoint) GetFormat

func (x *LLMEndpoint) GetFormat() LLMFormat

func (*LLMEndpoint) GetPaths

func (x *LLMEndpoint) GetPaths() []string

func (*LLMEndpoint) ProtoMessage

func (*LLMEndpoint) ProtoMessage()

func (*LLMEndpoint) ProtoReflect

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

func (*LLMEndpoint) Reset

func (x *LLMEndpoint) Reset()

func (*LLMEndpoint) String

func (x *LLMEndpoint) String() string

type LLMFormat

type LLMFormat int32

LLMFormat is the shape of an endpoint's requests. An engine checks an endpoint of a format it doesn't know as every format it knows.

const (
	LLMFormat_LLM_FORMAT_UNSPECIFIED LLMFormat = 0
	// OpenAI's Chat Completions, as OpenAI-compatible servers serve it.
	LLMFormat_LLM_FORMAT_OPENAI_CHAT LLMFormat = 1
	// OpenAI's Responses.
	LLMFormat_LLM_FORMAT_OPENAI_RESPONSES LLMFormat = 2
	// OpenAI's Embeddings.
	LLMFormat_LLM_FORMAT_OPENAI_EMBEDDINGS LLMFormat = 3
	// Anthropic's Messages.
	LLMFormat_LLM_FORMAT_ANTHROPIC_MESSAGES LLMFormat = 4
)

func (LLMFormat) Descriptor

func (LLMFormat) Descriptor() protoreflect.EnumDescriptor

func (LLMFormat) Enum

func (x LLMFormat) Enum() *LLMFormat

func (LLMFormat) EnumDescriptor deprecated

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

Deprecated: Use LLMFormat.Descriptor instead.

func (LLMFormat) Number

func (x LLMFormat) Number() protoreflect.EnumNumber

func (LLMFormat) String

func (x LLMFormat) String() string

func (LLMFormat) Type

type LLMRequestChecks

type LLMRequestChecks struct {

	// Exact, or a prefix ending in "*", compared in ASCII lower case.
	// Empty: any model.
	Models []string `protobuf:"bytes,1,rep,name=models,proto3" json:"models,omitempty"`
	// UTF-8 bytes of the prompt's text, every message together.
	MaxPromptBytes int64 `protobuf:"varint,2,opt,name=max_prompt_bytes,json=maxPromptBytes,proto3" json:"max_prompt_bytes,omitempty"`
	// Messages, input items or embedding inputs.
	MaxMessages int64 `protobuf:"varint,3,opt,name=max_messages,json=maxMessages,proto3" json:"max_messages,omitempty"`
	// The output limit the request sets (max_tokens and its kin).
	MaxOutputTokens int64 `protobuf:"varint,4,opt,name=max_output_tokens,json=maxOutputTokens,proto3" json:"max_output_tokens,omitempty"`
	// Refuse a request that sets no output limit.
	RequireOutputTokens bool `protobuf:"varint,5,opt,name=require_output_tokens,json=requireOutputTokens,proto3" json:"require_output_tokens,omitempty"`
	// n.
	MaxChoices int64 `protobuf:"varint,6,opt,name=max_choices,json=maxChoices,proto3" json:"max_choices,omitempty"`
	// The roles a client may send. Empty: every role.
	ClientRoles []LLMRole     `` /* 133-byte string literal not displayed */
	Tools       LLMToolsAllow `protobuf:"varint,8,opt,name=tools,proto3,enum=inkwall.bundle.v1.LLMToolsAllow" json:"tools,omitempty"`
	// With LLM_TOOLS_ALLOW_LISTED.
	ToolNames []string `protobuf:"bytes,9,rep,name=tool_names,json=toolNames,proto3" json:"tool_names,omitempty"`
	// Log the requests that fail a check instead of denying them.
	Detect bool `protobuf:"varint,10,opt,name=detect,proto3" json:"detect,omitempty"`
	// contains filtered or unexported fields
}

LLMRequestChecks are the caps an endpoint's requests must meet. A 0 cap is none.

func (*LLMRequestChecks) Descriptor deprecated

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

Deprecated: Use LLMRequestChecks.ProtoReflect.Descriptor instead.

func (*LLMRequestChecks) GetClientRoles

func (x *LLMRequestChecks) GetClientRoles() []LLMRole

func (*LLMRequestChecks) GetDetect

func (x *LLMRequestChecks) GetDetect() bool

func (*LLMRequestChecks) GetMaxChoices

func (x *LLMRequestChecks) GetMaxChoices() int64

func (*LLMRequestChecks) GetMaxMessages

func (x *LLMRequestChecks) GetMaxMessages() int64

func (*LLMRequestChecks) GetMaxOutputTokens

func (x *LLMRequestChecks) GetMaxOutputTokens() int64

func (*LLMRequestChecks) GetMaxPromptBytes

func (x *LLMRequestChecks) GetMaxPromptBytes() int64

func (*LLMRequestChecks) GetModels

func (x *LLMRequestChecks) GetModels() []string

func (*LLMRequestChecks) GetRequireOutputTokens

func (x *LLMRequestChecks) GetRequireOutputTokens() bool

func (*LLMRequestChecks) GetToolNames

func (x *LLMRequestChecks) GetToolNames() []string

func (*LLMRequestChecks) GetTools

func (x *LLMRequestChecks) GetTools() LLMToolsAllow

func (*LLMRequestChecks) ProtoMessage

func (*LLMRequestChecks) ProtoMessage()

func (*LLMRequestChecks) ProtoReflect

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

func (*LLMRequestChecks) Reset

func (x *LLMRequestChecks) Reset()

func (*LLMRequestChecks) String

func (x *LLMRequestChecks) String() string

type LLMRole

type LLMRole int32

LLMRole is who wrote a message.

const (
	LLMRole_LLM_ROLE_UNSPECIFIED LLMRole = 0
	LLMRole_LLM_ROLE_SYSTEM      LLMRole = 1
	LLMRole_LLM_ROLE_DEVELOPER   LLMRole = 2
	LLMRole_LLM_ROLE_USER        LLMRole = 3
	LLMRole_LLM_ROLE_ASSISTANT   LLMRole = 4
	LLMRole_LLM_ROLE_TOOL        LLMRole = 5
)

func (LLMRole) Descriptor

func (LLMRole) Descriptor() protoreflect.EnumDescriptor

func (LLMRole) Enum

func (x LLMRole) Enum() *LLMRole

func (LLMRole) EnumDescriptor deprecated

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

Deprecated: Use LLMRole.Descriptor instead.

func (LLMRole) Number

func (x LLMRole) Number() protoreflect.EnumNumber

func (LLMRole) String

func (x LLMRole) String() string

func (LLMRole) Type

func (LLMRole) Type() protoreflect.EnumType

type LLMToolsAllow

type LLMToolsAllow int32

LLMToolsAllow is which tools a client may define.

const (
	// Any.
	LLMToolsAllow_LLM_TOOLS_ALLOW_UNSPECIFIED LLMToolsAllow = 0
	// None.
	LLMToolsAllow_LLM_TOOLS_ALLOW_NONE LLMToolsAllow = 1
	// Those of tool_names.
	LLMToolsAllow_LLM_TOOLS_ALLOW_LISTED LLMToolsAllow = 2
)

func (LLMToolsAllow) Descriptor

func (LLMToolsAllow) Enum

func (x LLMToolsAllow) Enum() *LLMToolsAllow

func (LLMToolsAllow) EnumDescriptor deprecated

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

Deprecated: Use LLMToolsAllow.Descriptor instead.

func (LLMToolsAllow) Number

func (LLMToolsAllow) String

func (x LLMToolsAllow) String() string

func (LLMToolsAllow) 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"`
	// 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"`
	// Rate limits, checked after the IP lists and the skipped paths, before
	// the rules. Engines before 0.7.0 ignore them: the operator doesn't count
	// them as enforcing a policy that sets them.
	RateLimits []*RateLimit `protobuf:"bytes,15,rep,name=rate_limits,json=rateLimits,proto3" json:"rate_limits,omitempty"`
	// The body of the policy's denials. Unset: Bundle.deny_response. Engines
	// before 0.7.0 ignore it: the operator doesn't count them as enforcing a
	// policy that sets it.
	DenyResponse *DenyResponse `protobuf:"bytes,16,opt,name=deny_response,json=denyResponse,proto3" json:"deny_response,omitempty"`
	// Geo blocking (WAFPolicy spec.geo, design 0011 §2): checked after the
	// IP lists, before the skipped paths, with the country table the bundle
	// names (geo_table). Unset: none. Engines before 0.7.0 ignore it: the
	// operator doesn't count them as enforcing a policy that sets it.
	Geo *Geo `protobuf:"bytes,17,opt,name=geo,proto3" json:"geo,omitempty"`
	// The policy's LLM API endpoints and their request checks (design
	// 0012). Unset: none. Engines before 0.7.0 ignore it: the operator
	// doesn't count them as enforcing a policy that sets it. (Numbered from
	// 40, apart from the fields other features add meanwhile.)
	Llm *LLM `protobuf:"bytes,40,opt,name=llm,proto3" json:"llm,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) GetDenyResponse

func (x *Policy) GetDenyResponse() *DenyResponse

func (*Policy) GetExclusions

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

func (*Policy) GetFailureMode

func (x *Policy) GetFailureMode() FailureMode

func (*Policy) GetGeo

func (x *Policy) GetGeo() *Geo

func (*Policy) GetId

func (x *Policy) GetId() string

func (*Policy) GetIpLists added in v0.5.0

func (x *Policy) GetIpLists() *IPLists

func (*Policy) GetLlm

func (x *Policy) GetLlm() *LLM

func (*Policy) GetMode

func (x *Policy) GetMode() Mode

func (*Policy) GetRateLimits

func (x *Policy) GetRateLimits() []*RateLimit

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) GetTargetExclusions added in v0.5.0

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

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 RateLimit

type RateLimit struct {

	// Unique in the policy. With the policy and the key, it names the
	// limit's buckets across bundles: a new name starts them full, a new
	// rate or burst keeps them.
	Name     string               `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"`
	Requests uint32               `protobuf:"varint,2,opt,name=requests,proto3" json:"requests,omitempty"`
	Period   *durationpb.Duration `protobuf:"bytes,3,opt,name=period,proto3" json:"period,omitempty"`
	// 0: requests.
	Burst uint32        `protobuf:"varint,4,opt,name=burst,proto3" json:"burst,omitempty"`
	Key   *RateLimitKey `protobuf:"bytes,5,opt,name=key,proto3" json:"key,omitempty"`
	// Paths counted, in the engine router's syntax, compared in ASCII lower
	// case with one trailing slash ignored. Empty: every path.
	Paths []string `protobuf:"bytes,6,rep,name=paths,proto3" json:"paths,omitempty"`
	// Methods counted, upper case. Empty: every method.
	Methods []string `protobuf:"bytes,7,rep,name=methods,proto3" json:"methods,omitempty"`
	// Log the requests over the limit instead of denying them.
	Detect bool `protobuf:"varint,8,opt,name=detect,proto3" json:"detect,omitempty"`
	// What a request costs. Engines before 0.7.0 count each request as 1:
	// the operator doesn't count them as enforcing a policy that sets it.
	// (Numbered from 40, apart from the fields other features add
	// meanwhile.)
	Cost RateLimitCost `protobuf:"varint,40,opt,name=cost,proto3,enum=inkwall.bundle.v1.RateLimitCost" json:"cost,omitempty"`
	// contains filtered or unexported fields
}

RateLimit is a token bucket per key: it holds at most burst requests and gains requests per period, evenly. Each engine counts on its own.

func (*RateLimit) Descriptor deprecated

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

Deprecated: Use RateLimit.ProtoReflect.Descriptor instead.

func (*RateLimit) GetBurst

func (x *RateLimit) GetBurst() uint32

func (*RateLimit) GetCost

func (x *RateLimit) GetCost() RateLimitCost

func (*RateLimit) GetDetect

func (x *RateLimit) GetDetect() bool

func (*RateLimit) GetKey

func (x *RateLimit) GetKey() *RateLimitKey

func (*RateLimit) GetMethods

func (x *RateLimit) GetMethods() []string

func (*RateLimit) GetName

func (x *RateLimit) GetName() string

func (*RateLimit) GetPaths

func (x *RateLimit) GetPaths() []string

func (*RateLimit) GetPeriod

func (x *RateLimit) GetPeriod() *durationpb.Duration

func (*RateLimit) GetRequests

func (x *RateLimit) GetRequests() uint32

func (*RateLimit) ProtoMessage

func (*RateLimit) ProtoMessage()

func (*RateLimit) ProtoReflect

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

func (*RateLimit) Reset

func (x *RateLimit) Reset()

func (*RateLimit) String

func (x *RateLimit) String() string

type RateLimitCost

type RateLimitCost int32

RateLimitCost is what a rate limit counts.

const (
	// Requests: each takes 1.
	RateLimitCost_RATE_LIMIT_COST_UNSPECIFIED RateLimitCost = 0
	// LLM tokens (design 0012 §6): requests and burst are tokens, a request
	// on one of the policy's LLM endpoints takes its estimate after the LLM
	// checks, settled from its response's usage; other requests aren't
	// counted.
	RateLimitCost_RATE_LIMIT_COST_LLM_TOKENS RateLimitCost = 1
)

func (RateLimitCost) Descriptor

func (RateLimitCost) Enum

func (x RateLimitCost) Enum() *RateLimitCost

func (RateLimitCost) EnumDescriptor deprecated

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

Deprecated: Use RateLimitCost.Descriptor instead.

func (RateLimitCost) Number

func (RateLimitCost) String

func (x RateLimitCost) String() string

func (RateLimitCost) Type

type RateLimitKey

type RateLimitKey struct {

	// Types that are valid to be assigned to Key:
	//
	//	*RateLimitKey_ClientIp
	//	*RateLimitKey_Header
	Key isRateLimitKey_Key `protobuf_oneof:"key"`
	// contains filtered or unexported fields
}

RateLimitKey is what a limit counts by. Unset: the client IP, IPv6 by its /56.

func (*RateLimitKey) Descriptor deprecated

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

Deprecated: Use RateLimitKey.ProtoReflect.Descriptor instead.

func (*RateLimitKey) GetClientIp

func (x *RateLimitKey) GetClientIp() *ClientIPKey

func (*RateLimitKey) GetHeader

func (x *RateLimitKey) GetHeader() *HeaderKey

func (*RateLimitKey) GetKey

func (x *RateLimitKey) GetKey() isRateLimitKey_Key

func (*RateLimitKey) ProtoMessage

func (*RateLimitKey) ProtoMessage()

func (*RateLimitKey) ProtoReflect

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

func (*RateLimitKey) Reset

func (x *RateLimitKey) Reset()

func (*RateLimitKey) String

func (x *RateLimitKey) String() string

type RateLimitKey_ClientIp

type RateLimitKey_ClientIp struct {
	ClientIp *ClientIPKey `protobuf:"bytes,1,opt,name=client_ip,json=clientIp,proto3,oneof"`
}

type RateLimitKey_Header

type RateLimitKey_Header struct {
	Header *HeaderKey `protobuf:"bytes,2,opt,name=header,proto3,oneof"`
}

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) 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 */
	// 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) Enum added in v0.6.0

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 (RuleSetPlacement) String added in v0.6.0

func (x RuleSetPlacement) String() string

func (RuleSetPlacement) Type added in v0.6.0

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