Documentation
¶
Overview ¶
Package v1alpha1 holds the Inkwall Kubernetes API (group waf.inkwall.dev): the cluster configuration, the policies app teams attach to their routes, and the rule sets those policies use. Design: docs/design/0002 §4.2 and docs/design/0004 §3.
+kubebuilder:object:generate=true +groupName=waf.inkwall.dev
Index ¶
- Constants
- Variables
- type AdapterKind
- type BodySpec
- type BootstrapMode
- type BuiltinRuleSet
- type ClusterMode
- type ClusterRuleSetSource
- type ClusterWAFRuleSet
- type ClusterWAFRuleSetList
- type ClusterWAFRuleSetSpec
- type ConfigMapKeyRef
- type ControlPlane
- type EngineSpec
- type Exclusion
- type ExclusionMatch
- type FailureMode
- type GRPCMessagesAction
- type HeaderName
- type InkwallConfig
- type InkwallConfigList
- type InkwallConfigSpec
- type InkwallConfigStatus
- type IntegrationSpec
- type NamespacedConfigMapKeyRef
- type OversizeAction
- type PathPattern
- type PolicyMode
- type ProxyStatus
- type ResponsesSpec
- type RuleSetBinding
- type RuleSetRef
- type RuleSetSource
- type RuleSetStatus
- type SecretReference
- type SigningKeySpec
- type SkipSpec
- type Support
- type TargetRef
- type WAFPolicy
- type WAFPolicyList
- type WAFPolicySpec
- type WAFPolicyStatus
- type WAFRuleSet
- type WAFRuleSetList
- type WAFRuleSetSpec
- type WebSocketOrigin
- type WebSocketSpec
Constants ¶
const ( // ConditionAccepted is True when the spec is valid and its references // resolve. ConditionAccepted = "Accepted" // ConditionProgrammed is True when every targeted route's proxy sends // traffic to Inkwall. ConditionProgrammed = "Programmed" // ConditionEnforced is True when every engine serving the targets has // applied a bundle containing the current generation. ConditionEnforced = "Enforced" // ConditionReady is True when Accepted, Programmed and Enforced are. ConditionReady = "Ready" // ConditionControlPlaneConnected, on the InkwallConfig, says whether the // cluster is enrolled and connected to the optional control plane // (GitOps and Managed mode only). ConditionControlPlaneConnected = "ControlPlaneConnected" // ConditionSuspended, on the InkwallConfig, is True while the published // bundle suspends inspection (spec.suspend): every engine allows every // request. ConditionSuspended = "Suspended" )
Condition types. Every WAFPolicy reports all four (0004 §3.2); the other kinds report Accepted.
const ( SourceLabel = "inkwall.dev/source" SourceSaaS = "saas" )
SourceLabel says where a WAFPolicy, WAFRuleSet or ClusterWAFRuleSet comes from. In Managed mode the operator writes the control plane's policies labelled SourceSaaS (0004 §4.9), and the validating webhook lets no one else create, change or delete them, or add or remove the label.
const RotateSigningKeyAnnotation = "waf.inkwall.dev/rotate-signing-key"
RotateSigningKeyAnnotation on the InkwallConfig requests a rotation of the bundle signing key: each new value starts one (a timestamp, say). The operator publishes a new key to the engines, switches to it once every connected engine trusts it, and retires the old key once every engine runs a bundle signed with the new one. A request made during a rotation starts another one after it.
Variables ¶
var ( // GroupVersion is the API group and version of these types. GroupVersion = schema.GroupVersion{Group: "waf.inkwall.dev", Version: "v1alpha1"} // SchemeBuilder registers the types with a runtime.Scheme. SchemeBuilder = runtime.NewSchemeBuilder(addKnownTypes) // AddToScheme adds the types to a runtime.Scheme. AddToScheme = SchemeBuilder.AddToScheme )
Functions ¶
This section is empty.
Types ¶
type AdapterKind ¶
type AdapterKind string
AdapterKind is how a proxy hands requests to the engine (0006). +kubebuilder:validation:Enum=ExtProc;ExtAuthz;LuaPlugin;AuthURL;ForwardAuth;SPOE;Module
const ( AdapterExtProc AdapterKind = "ExtProc" AdapterExtAuthz AdapterKind = "ExtAuthz" AdapterLuaPlugin AdapterKind = "LuaPlugin" AdapterAuthURL AdapterKind = "AuthURL" AdapterForwardAuth AdapterKind = "ForwardAuth" AdapterSPOE AdapterKind = "SPOE" AdapterModule AdapterKind = "Module" )
The adapter kinds.
type BodySpec ¶
type BodySpec struct {
// Inspect turns body inspection on or off.
// +kubebuilder:default=true
// +optional
Inspect *bool `json:"inspect,omitempty"`
// MaxBytes is how much of a body is inspected, at most 10 MiB. Unset:
// the engine's default (64 KiB).
// +kubebuilder:validation:Minimum=1
// +kubebuilder:validation:Maximum=10485760
// +optional
MaxBytes *int64 `json:"maxBytes,omitempty"`
// OnOversize is what happens to a body over maxBytes: Deny (413 in
// Block mode) or Allow (forwarded uninspected, and logged). Unset: Deny
// in Block mode, Allow in Detect mode.
// +optional
OnOversize OversizeAction `json:"onOversize,omitempty"`
// GRPCMessages decides whether the text in gRPC calls' messages is
// inspected: Inspect reads each protobuf message without its schema
// and gives its text fields to the rules as form arguments; a message
// that can't be read (cut at maxBytes, compressed other than with
// gzip, not protobuf) is handled by onOversize. Unset: Skip, only the
// call's path and metadata are inspected. See docs/grpc.md.
// +optional
GRPCMessages GRPCMessagesAction `json:"grpcMessages,omitempty"`
}
BodySpec configures request body inspection.
func (*BodySpec) DeepCopy ¶
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new BodySpec.
func (*BodySpec) DeepCopyInto ¶
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type BootstrapMode ¶
type BootstrapMode string
BootstrapMode is what an engine does with requests before it has a policy bundle (0004 §4.6). +kubebuilder:validation:Enum=AllowAll;DenyAll
const ( // BootstrapAllowAll lets requests through uninspected: availability // first. BootstrapAllowAll BootstrapMode = "AllowAll" // BootstrapDenyAll rejects them with 503. BootstrapDenyAll BootstrapMode = "DenyAll" )
The bootstrap modes.
type BuiltinRuleSet ¶
type BuiltinRuleSet string
BuiltinRuleSet names a rule set shipped inside the engine image, pinned to the engine's version. +kubebuilder:validation:Enum=crs-v4
const BuiltinCRSv4 BuiltinRuleSet = "crs-v4"
BuiltinCRSv4 is the OWASP Core Rule Set v4.
type ClusterMode ¶
type ClusterMode string
ClusterMode is where a cluster's policy comes from (0002 §4.1). +kubebuilder:validation:Enum=Standalone;GitOps;Managed
const ( // ModeStandalone takes policy from the CRDs, with no control plane. ModeStandalone ClusterMode = "Standalone" // ModeGitOps takes policy from the CRDs and mirrors it, read-only, to // the control plane. ModeGitOps ClusterMode = "GitOps" // ModeManaged takes policy from the control plane, which the operator // writes as CRDs; edits by anyone else are rejected. ModeManaged ClusterMode = "Managed" )
type ClusterRuleSetSource ¶
type ClusterRuleSetSource struct {
// Builtin is a rule set shipped in the engine image.
// +optional
Builtin BuiltinRuleSet `json:"builtin,omitempty"`
// SecLang holds the rules inline, at most 256 KiB.
// +kubebuilder:validation:MinLength=1
// +kubebuilder:validation:MaxLength=262144
// +optional
SecLang string `json:"seclang,omitempty"`
// ConfigMapRef reads the rules from a ConfigMap.
// +optional
ConfigMapRef *NamespacedConfigMapKeyRef `json:"configMapRef,omitempty"`
}
ClusterRuleSetSource is where a ClusterWAFRuleSet's rules come from: exactly one of builtin, seclang or configMapRef. +kubebuilder:validation:XValidation:rule="[has(self.builtin), has(self.seclang), has(self.configMapRef)].filter(x, x).size() == 1",message="set exactly one of builtin, seclang or configMapRef"
func (*ClusterRuleSetSource) DeepCopy ¶
func (in *ClusterRuleSetSource) DeepCopy() *ClusterRuleSetSource
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ClusterRuleSetSource.
func (*ClusterRuleSetSource) DeepCopyInto ¶
func (in *ClusterRuleSetSource) DeepCopyInto(out *ClusterRuleSetSource)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type ClusterWAFRuleSet ¶
type ClusterWAFRuleSet struct {
metav1.TypeMeta `json:",inline"`
metav1.ObjectMeta `json:"metadata,omitempty"`
Spec ClusterWAFRuleSetSpec `json:"spec"`
// +optional
Status RuleSetStatus `json:"status,omitempty"`
}
ClusterWAFRuleSet is a set of rules that policies in any namespace can use.
+kubebuilder:object:root=true +kubebuilder:subresource:status +kubebuilder:resource:scope=Cluster,categories=inkwall,shortName=cwafrs +kubebuilder:printcolumn:name="Builtin",type=string,JSONPath=`.spec.source.builtin` +kubebuilder:printcolumn:name="Age",type=date,JSONPath=`.metadata.creationTimestamp`
func (*ClusterWAFRuleSet) DeepCopy ¶
func (in *ClusterWAFRuleSet) DeepCopy() *ClusterWAFRuleSet
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ClusterWAFRuleSet.
func (*ClusterWAFRuleSet) DeepCopyInto ¶
func (in *ClusterWAFRuleSet) DeepCopyInto(out *ClusterWAFRuleSet)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*ClusterWAFRuleSet) DeepCopyObject ¶
func (in *ClusterWAFRuleSet) DeepCopyObject() runtime.Object
DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
type ClusterWAFRuleSetList ¶
type ClusterWAFRuleSetList struct {
metav1.TypeMeta `json:",inline"`
metav1.ListMeta `json:"metadata,omitempty"`
Items []ClusterWAFRuleSet `json:"items"`
}
ClusterWAFRuleSetList is a list of ClusterWAFRuleSet.
+kubebuilder:object:root=true
func (*ClusterWAFRuleSetList) DeepCopy ¶
func (in *ClusterWAFRuleSetList) DeepCopy() *ClusterWAFRuleSetList
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ClusterWAFRuleSetList.
func (*ClusterWAFRuleSetList) DeepCopyInto ¶
func (in *ClusterWAFRuleSetList) DeepCopyInto(out *ClusterWAFRuleSetList)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*ClusterWAFRuleSetList) DeepCopyObject ¶
func (in *ClusterWAFRuleSetList) DeepCopyObject() runtime.Object
DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
type ClusterWAFRuleSetSpec ¶
type ClusterWAFRuleSetSpec struct {
// Source of the rules.
Source ClusterRuleSetSource `json:"source"`
}
ClusterWAFRuleSetSpec defines a cluster-wide rule set.
func (*ClusterWAFRuleSetSpec) DeepCopy ¶
func (in *ClusterWAFRuleSetSpec) DeepCopy() *ClusterWAFRuleSetSpec
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ClusterWAFRuleSetSpec.
func (*ClusterWAFRuleSetSpec) DeepCopyInto ¶
func (in *ClusterWAFRuleSetSpec) DeepCopyInto(out *ClusterWAFRuleSetSpec)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type ConfigMapKeyRef ¶
type ConfigMapKeyRef struct {
// Name of the ConfigMap.
// +kubebuilder:validation:MinLength=1
// +kubebuilder:validation:MaxLength=253
Name string `json:"name"`
// Key holding the SecLang rules.
// +kubebuilder:validation:MinLength=1
// +kubebuilder:validation:MaxLength=253
Key string `json:"key"`
}
ConfigMapKeyRef names a key of a ConfigMap in the rule set's namespace.
func (*ConfigMapKeyRef) DeepCopy ¶
func (in *ConfigMapKeyRef) DeepCopy() *ConfigMapKeyRef
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ConfigMapKeyRef.
func (*ConfigMapKeyRef) DeepCopyInto ¶
func (in *ConfigMapKeyRef) DeepCopyInto(out *ConfigMapKeyRef)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type ControlPlane ¶
type ControlPlane struct {
// Endpoint is the control plane's gRPC address, as grpcs://host:port.
// +kubebuilder:validation:Pattern=`^grpcs://[^/\s]+$`
// +kubebuilder:validation:MaxLength=512
Endpoint string `json:"endpoint"`
// EnrollmentSecretRef is the Secret holding the enrollment token.
EnrollmentSecretRef SecretReference `json:"enrollmentSecretRef"`
}
ControlPlane is the connection to the optional control plane.
func (*ControlPlane) DeepCopy ¶
func (in *ControlPlane) DeepCopy() *ControlPlane
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ControlPlane.
func (*ControlPlane) DeepCopyInto ¶
func (in *ControlPlane) DeepCopyInto(out *ControlPlane)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type EngineSpec ¶
type EngineSpec struct {
// Image is the engine image. Empty means the image released with this
// operator version.
// +kubebuilder:validation:MaxLength=512
// +optional
Image string `json:"image,omitempty"`
// Resources of the engine container. Setting no CPU limit is
// recommended: CPU throttling shows up as tail latency on every request.
// +optional
Resources *corev1.ResourceRequirements `json:"resources,omitempty"`
// SocketDir is ignored: each integration places the engine's socket
// itself (Envoy Gateway's in /var/run/inkwall-socket; Traefik reaches
// the engine over loopback TCP). It stays so that InkwallConfigs that
// set it remain valid; setting it draws a warning.
//
// Deprecated: remove it from the InkwallConfig.
//
// +kubebuilder:validation:MaxLength=64
// +optional
SocketDir string `json:"socketDir,omitempty"`
// BootstrapMode is what a new engine does with requests when it has no
// bundle yet: no cached bundle, the bundle Secret unreadable and the
// operator unreachable. It waits up to 10 seconds for one before its
// proxy takes traffic, then allows (AllowAll) or rejects (DenyAll) the
// requests until a bundle arrives. Applies to pods injected from then
// on.
// +kubebuilder:default=AllowAll
// +optional
BootstrapMode BootstrapMode `json:"bootstrapMode,omitempty"`
}
EngineSpec configures the engine sidecars.
func (*EngineSpec) DeepCopy ¶
func (in *EngineSpec) DeepCopy() *EngineSpec
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new EngineSpec.
func (*EngineSpec) DeepCopyInto ¶
func (in *EngineSpec) DeepCopyInto(out *EngineSpec)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type Exclusion ¶
type Exclusion struct {
// RuleIDs are the rules to turn off. An ID no rule has is ignored.
// +kubebuilder:validation:MinItems=1
// +kubebuilder:validation:MaxItems=64
// +kubebuilder:validation:items:Minimum=1
RuleIDs []int32 `json:"ruleIDs"`
// When narrows the exclusion. Unset: the rules are off for every request
// this policy covers.
// +optional
When *ExclusionMatch `json:"when,omitempty"`
}
Exclusion turns rules off, everywhere or only for one path or argument.
func (*Exclusion) DeepCopy ¶
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Exclusion.
func (*Exclusion) DeepCopyInto ¶
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type ExclusionMatch ¶
type ExclusionMatch struct {
// Path the exclusion applies to.
// +optional
Path PathPattern `json:"path,omitempty"`
// Argument is a query or body argument the rules, and the rules chained
// to them, stop looking at. With a rule set whose own SecLang negates
// ARGS targets (!ARGS:name), the policy gets its own compiled rules, and
// the exclusion covers the rule only, not its chained rules.
// +kubebuilder:validation:MinLength=1
// +kubebuilder:validation:MaxLength=256
// +kubebuilder:validation:Pattern=`^[A-Za-z0-9_.\-\[\]]+$`
// +optional
Argument string `json:"argument,omitempty"`
}
ExclusionMatch narrows an exclusion to a path, an argument, or both. +kubebuilder:validation:XValidation:rule="has(self.path) || has(self.argument)",message="when needs a path, an argument, or both"
func (*ExclusionMatch) DeepCopy ¶
func (in *ExclusionMatch) DeepCopy() *ExclusionMatch
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ExclusionMatch.
func (*ExclusionMatch) DeepCopyInto ¶
func (in *ExclusionMatch) DeepCopyInto(out *ExclusionMatch)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type FailureMode ¶
type FailureMode string
FailureMode is what happens to a request that can't be inspected in time (timeout, error, overload). +kubebuilder:validation:Enum=Open;Closed
const ( // FailOpen lets the request through uninspected. FailOpen FailureMode = "Open" // FailClosed rejects the request with 503. FailClosed FailureMode = "Closed" )
type GRPCMessagesAction ¶ added in v0.4.0
type GRPCMessagesAction string
GRPCMessagesAction is whether gRPC messages are inspected. +kubebuilder:validation:Enum=Inspect;Skip
const ( // GRPCMessagesInspect inspects the text in gRPC calls' messages. GRPCMessagesInspect GRPCMessagesAction = "Inspect" // GRPCMessagesSkip inspects a gRPC call's path and metadata only. GRPCMessagesSkip GRPCMessagesAction = "Skip" )
type HeaderName ¶ added in v0.4.0
type HeaderName string
HeaderName is an HTTP header name. +kubebuilder:validation:MinLength=1 +kubebuilder:validation:MaxLength=256 +kubebuilder:validation:Pattern=`^[A-Za-z0-9!#$%&'*+.^_|~-]+$`
type InkwallConfig ¶
type InkwallConfig struct {
metav1.TypeMeta `json:",inline"`
metav1.ObjectMeta `json:"metadata,omitempty"`
// +optional
Spec InkwallConfigSpec `json:"spec,omitempty"`
// +optional
Status InkwallConfigStatus `json:"status,omitempty"`
}
InkwallConfig is the cluster-wide Inkwall configuration. There is one, named default.
+kubebuilder:object:root=true +kubebuilder:subresource:status +kubebuilder:resource:scope=Cluster,categories=inkwall +kubebuilder:validation:XValidation:rule="self.metadata.name == 'default'",message="the InkwallConfig must be named default" +kubebuilder:printcolumn:name="Mode",type=string,JSONPath=`.spec.mode` +kubebuilder:printcolumn:name="Suspended",type=boolean,JSONPath=`.spec.suspend` +kubebuilder:printcolumn:name="Age",type=date,JSONPath=`.metadata.creationTimestamp`
func (*InkwallConfig) DeepCopy ¶
func (in *InkwallConfig) DeepCopy() *InkwallConfig
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new InkwallConfig.
func (*InkwallConfig) DeepCopyInto ¶
func (in *InkwallConfig) DeepCopyInto(out *InkwallConfig)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*InkwallConfig) DeepCopyObject ¶
func (in *InkwallConfig) DeepCopyObject() runtime.Object
DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
type InkwallConfigList ¶
type InkwallConfigList struct {
metav1.TypeMeta `json:",inline"`
metav1.ListMeta `json:"metadata,omitempty"`
Items []InkwallConfig `json:"items"`
}
InkwallConfigList is a list of InkwallConfig.
+kubebuilder:object:root=true
func (*InkwallConfigList) DeepCopy ¶
func (in *InkwallConfigList) DeepCopy() *InkwallConfigList
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new InkwallConfigList.
func (*InkwallConfigList) DeepCopyInto ¶
func (in *InkwallConfigList) DeepCopyInto(out *InkwallConfigList)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*InkwallConfigList) DeepCopyObject ¶
func (in *InkwallConfigList) DeepCopyObject() runtime.Object
DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
type InkwallConfigSpec ¶
type InkwallConfigSpec struct {
// Mode is where policy comes from: Standalone (the CRDs), GitOps (the
// CRDs, mirrored to the control plane) or Managed (the control plane).
// +kubebuilder:default=Standalone
// +optional
Mode ClusterMode `json:"mode,omitempty"`
// ControlPlane is the control plane to connect to. Required in GitOps
// and Managed mode, ignored in Standalone.
// +optional
ControlPlane *ControlPlane `json:"controlPlane,omitempty"`
// Engine configures the engine sidecars the operator injects.
// +optional
Engine EngineSpec `json:"engine,omitempty"`
// Integrations pins how a proxy controller is wired. Controllers are
// discovered without an entry here; an entry overrides the workload
// selector or the adapter for one controller.
// +listType=map
// +listMapKey=controller
// +kubebuilder:validation:MaxItems=32
// +optional
Integrations []IntegrationSpec `json:"integrations,omitempty"`
// Suspend switches every engine to allow-all within seconds, without
// removing anything: the emergency switch (0004 §5).
// +optional
Suspend bool `json:"suspend,omitempty"`
// SigningKey configures the key the operator signs policy bundles with.
// +optional
SigningKey SigningKeySpec `json:"signingKey,omitempty"`
}
InkwallConfigSpec is the cluster-wide configuration. +kubebuilder:validation:XValidation:rule="!has(self.mode) || self.mode == 'Standalone' || has(self.controlPlane)",message="controlPlane is required in GitOps and Managed mode"
func (*InkwallConfigSpec) DeepCopy ¶
func (in *InkwallConfigSpec) DeepCopy() *InkwallConfigSpec
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new InkwallConfigSpec.
func (*InkwallConfigSpec) DeepCopyInto ¶
func (in *InkwallConfigSpec) DeepCopyInto(out *InkwallConfigSpec)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type InkwallConfigStatus ¶
type InkwallConfigStatus struct {
// ObservedGeneration is the generation the status describes.
// +optional
ObservedGeneration int64 `json:"observedGeneration,omitempty"`
// Conditions describe the configuration's state.
// +listType=map
// +listMapKey=type
// +optional
Conditions []metav1.Condition `json:"conditions,omitempty"`
// Proxies are the proxy controllers the cluster's IngressClasses and
// GatewayClasses name, and how far Inkwall wires each.
// +listType=map
// +listMapKey=controllerName
// +optional
Proxies []ProxyStatus `json:"proxies,omitempty"`
}
InkwallConfigStatus is the cluster view.
func (*InkwallConfigStatus) DeepCopy ¶
func (in *InkwallConfigStatus) DeepCopy() *InkwallConfigStatus
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new InkwallConfigStatus.
func (*InkwallConfigStatus) DeepCopyInto ¶
func (in *InkwallConfigStatus) DeepCopyInto(out *InkwallConfigStatus)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type IntegrationSpec ¶
type IntegrationSpec struct {
// Controller is the integration name, such as traefik or ingress-nginx.
// +kubebuilder:validation:MinLength=1
// +kubebuilder:validation:MaxLength=63
Controller string `json:"controller"`
// Selector matches the controller's proxy pods, when they don't carry
// the controller's default labels. It must select by something (an
// empty selector would match every pod). The operator restarts to
// apply a change; pods already running are injected when they restart.
// +kubebuilder:validation:XValidation:rule="(has(self.matchLabels) && size(self.matchLabels) > 0) || (has(self.matchExpressions) && size(self.matchExpressions) > 0)",message="selector must not be empty: it would select every pod"
// +optional
Selector *metav1.LabelSelector `json:"selector,omitempty"`
// Adapter is how the proxy hands requests to the engine, when the
// controller supports several.
// +optional
Adapter AdapterKind `json:"adapter,omitempty"`
}
IntegrationSpec overrides discovery for one proxy controller.
func (*IntegrationSpec) DeepCopy ¶
func (in *IntegrationSpec) DeepCopy() *IntegrationSpec
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new IntegrationSpec.
func (*IntegrationSpec) DeepCopyInto ¶
func (in *IntegrationSpec) DeepCopyInto(out *IntegrationSpec)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type NamespacedConfigMapKeyRef ¶
type NamespacedConfigMapKeyRef struct {
ConfigMapKeyRef `json:",inline"`
// Namespace of the ConfigMap.
// +kubebuilder:validation:MinLength=1
// +kubebuilder:validation:MaxLength=63
Namespace string `json:"namespace"`
}
NamespacedConfigMapKeyRef names a key of a ConfigMap in any namespace.
func (*NamespacedConfigMapKeyRef) DeepCopy ¶
func (in *NamespacedConfigMapKeyRef) DeepCopy() *NamespacedConfigMapKeyRef
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new NamespacedConfigMapKeyRef.
func (*NamespacedConfigMapKeyRef) DeepCopyInto ¶
func (in *NamespacedConfigMapKeyRef) DeepCopyInto(out *NamespacedConfigMapKeyRef)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type OversizeAction ¶
type OversizeAction string
OversizeAction is what happens to a body larger than body.maxBytes. +kubebuilder:validation:Enum=Allow;Deny
const ( // OversizeAllow forwards the request with the body uninspected, and logs // it. OversizeAllow OversizeAction = "Allow" // OversizeDeny rejects the request with 413 in Block mode. OversizeDeny OversizeAction = "Deny" )
type PathPattern ¶
type PathPattern string
PathPattern is an exact path ("/healthz") or a prefix ending in "*" ("/static/*"), using only plain ASCII path characters, as the engine matches paths (pkg/router). +kubebuilder:validation:MaxLength=1024 +kubebuilder:validation:Pattern=`^/[A-Za-z0-9._~/:@!$&'()+,=-]*\*?$`
type PolicyMode ¶
type PolicyMode string
PolicyMode is what the engine does with a request the rules flag. +kubebuilder:validation:Enum=Detect;Block
const ( // PolicyDetect logs the verdict and lets the request through. PolicyDetect PolicyMode = "Detect" // PolicyBlock rejects the request. PolicyBlock PolicyMode = "Block" )
type ProxyStatus ¶ added in v0.3.0
type ProxyStatus struct {
// ControllerName is the controller its classes name: an IngressClass's
// spec.controller, a GatewayClass's spec.controllerName.
// +kubebuilder:validation:MaxLength=253
ControllerName string `json:"controllerName"`
// Integration is Inkwall's integration for the controller, such as
// traefik; empty when Inkwall has none.
// +kubebuilder:validation:MaxLength=63
// +optional
Integration string `json:"integration,omitempty"`
// IngressClasses are the IngressClasses of the controller.
// +optional
IngressClasses []string `json:"ingressClasses,omitempty"`
// GatewayClasses are the GatewayClasses of the controller.
// +optional
GatewayClasses []string `json:"gatewayClasses,omitempty"`
// Support is Full, Partial or Unsupported.
Support Support `json:"support"`
// Message says what isn't wired.
// +kubebuilder:validation:MaxLength=1024
// +optional
Message string `json:"message,omitempty"`
}
ProxyStatus is a proxy controller found in the cluster.
func (*ProxyStatus) DeepCopy ¶ added in v0.3.0
func (in *ProxyStatus) DeepCopy() *ProxyStatus
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ProxyStatus.
func (*ProxyStatus) DeepCopyInto ¶ added in v0.3.0
func (in *ProxyStatus) DeepCopyInto(out *ProxyStatus)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type ResponsesSpec ¶ added in v0.4.0
type ResponsesSpec struct {
// Inspect turns response inspection on: the status and headers, and
// the body when its media type is text (plain, HTML, XML, CSV),
// JavaScript, JSON or XML (a +json or +xml type too), malformed, or
// missing. A request's Range is removed, so the body comes whole.
// In Block mode a response the rules flag is replaced with the
// rule's status (403) and a plain-text error.
// +optional
Inspect bool `json:"inspect,omitempty"`
// MaxBytes is how much of a response body is inspected, at most 10
// MiB. Unset: 64 KiB (each KiB costs about 0.3 ms of inspection: raise
// timeout with it). A longer body has this much inspected, and then
// gets onOversize.
// +kubebuilder:validation:Minimum=1
// +kubebuilder:validation:Maximum=10485760
// +optional
MaxBytes *int64 `json:"maxBytes,omitempty"`
// OnOversize is what happens to a response whose body is over maxBytes
// or can't be inspected (an encoding other than gzip or deflate): Deny
// (replaced with 502 in Block mode) or Allow (forwarded, and logged).
// Unset: Deny in Block mode, Allow in Detect mode.
// +optional
OnOversize OversizeAction `json:"onOversize,omitempty"`
}
ResponsesSpec configures response inspection. +kubebuilder:validation:XValidation:rule="(has(self.inspect) && self.inspect) || (!has(self.maxBytes) && !has(self.onOversize))",message="maxBytes and onOversize need inspect: true"
func (*ResponsesSpec) DeepCopy ¶ added in v0.4.0
func (in *ResponsesSpec) DeepCopy() *ResponsesSpec
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ResponsesSpec.
func (*ResponsesSpec) DeepCopyInto ¶ added in v0.4.0
func (in *ResponsesSpec) DeepCopyInto(out *ResponsesSpec)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type RuleSetBinding ¶
type RuleSetBinding struct {
// Ref is the rule set.
Ref RuleSetRef `json:"ref"`
// ParanoiaLevel is the OWASP CRS paranoia level, 1 to 4. Only used by
// the built-in CRS.
// +kubebuilder:validation:Minimum=1
// +kubebuilder:validation:Maximum=4
// +optional
ParanoiaLevel *int32 `json:"paranoiaLevel,omitempty"`
// InboundAnomalyThreshold is the OWASP CRS anomaly score at which a
// request is flagged. Only used by the built-in CRS.
// +kubebuilder:validation:Minimum=1
// +kubebuilder:validation:Maximum=10000
// +optional
InboundAnomalyThreshold *int32 `json:"inboundAnomalyThreshold,omitempty"`
}
RuleSetBinding uses a rule set in a policy.
func (*RuleSetBinding) DeepCopy ¶
func (in *RuleSetBinding) DeepCopy() *RuleSetBinding
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new RuleSetBinding.
func (*RuleSetBinding) DeepCopyInto ¶
func (in *RuleSetBinding) DeepCopyInto(out *RuleSetBinding)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type RuleSetRef ¶
type RuleSetRef struct {
// Kind is WAFRuleSet or ClusterWAFRuleSet.
// +kubebuilder:validation:Enum=WAFRuleSet;ClusterWAFRuleSet
Kind string `json:"kind"`
// Name of the rule set.
// +kubebuilder:validation:MinLength=1
// +kubebuilder:validation:MaxLength=253
Name string `json:"name"`
// Namespace of a WAFRuleSet. Unset: the policy's namespace.
// +kubebuilder:validation:MinLength=1
// +kubebuilder:validation:MaxLength=63
// +optional
Namespace string `json:"namespace,omitempty"`
}
RuleSetRef names a WAFRuleSet or a ClusterWAFRuleSet. +kubebuilder:validation:XValidation:rule="self.kind == 'WAFRuleSet' || !has(self.__namespace__)",message="namespace is only allowed for a WAFRuleSet"
func (*RuleSetRef) DeepCopy ¶
func (in *RuleSetRef) DeepCopy() *RuleSetRef
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new RuleSetRef.
func (*RuleSetRef) DeepCopyInto ¶
func (in *RuleSetRef) DeepCopyInto(out *RuleSetRef)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type RuleSetSource ¶
type RuleSetSource struct {
// Builtin is a rule set shipped in the engine image.
// +optional
Builtin BuiltinRuleSet `json:"builtin,omitempty"`
// SecLang holds the rules inline, at most 256 KiB.
// +kubebuilder:validation:MinLength=1
// +kubebuilder:validation:MaxLength=262144
// +optional
SecLang string `json:"seclang,omitempty"`
// ConfigMapRef reads the rules from a ConfigMap in the rule set's
// namespace.
// +optional
ConfigMapRef *ConfigMapKeyRef `json:"configMapRef,omitempty"`
}
RuleSetSource is where a WAFRuleSet's rules come from: exactly one of builtin, seclang or configMapRef. +kubebuilder:validation:XValidation:rule="[has(self.builtin), has(self.seclang), has(self.configMapRef)].filter(x, x).size() == 1",message="set exactly one of builtin, seclang or configMapRef"
func (*RuleSetSource) DeepCopy ¶
func (in *RuleSetSource) DeepCopy() *RuleSetSource
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new RuleSetSource.
func (*RuleSetSource) DeepCopyInto ¶
func (in *RuleSetSource) DeepCopyInto(out *RuleSetSource)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type RuleSetStatus ¶
type RuleSetStatus struct {
// ObservedGeneration is the generation the status describes.
// +optional
ObservedGeneration int64 `json:"observedGeneration,omitempty"`
// Conditions describe the rule set's state.
// +listType=map
// +listMapKey=type
// +optional
Conditions []metav1.Condition `json:"conditions,omitempty"`
}
RuleSetStatus reports whether a rule set is usable.
func (*RuleSetStatus) DeepCopy ¶
func (in *RuleSetStatus) DeepCopy() *RuleSetStatus
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new RuleSetStatus.
func (*RuleSetStatus) DeepCopyInto ¶
func (in *RuleSetStatus) DeepCopyInto(out *RuleSetStatus)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type SecretReference ¶
type SecretReference struct {
// Name of the Secret.
// +kubebuilder:validation:MinLength=1
// +kubebuilder:validation:MaxLength=253
Name string `json:"name"`
// Namespace of the Secret.
// +kubebuilder:validation:MinLength=1
// +kubebuilder:validation:MaxLength=63
Namespace string `json:"namespace"`
}
SecretReference names a Secret in a given namespace.
func (*SecretReference) DeepCopy ¶
func (in *SecretReference) DeepCopy() *SecretReference
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new SecretReference.
func (*SecretReference) DeepCopyInto ¶
func (in *SecretReference) DeepCopyInto(out *SecretReference)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type SigningKeySpec ¶ added in v0.1.1
type SigningKeySpec struct {
// RotationInterval rotates the signing key once it has signed for this
// long, e.g. 2160h (90 days); at least 1h. Empty: the key rotates only
// when requested with the waf.inkwall.dev/rotate-signing-key
// annotation.
// +kubebuilder:validation:XValidation:rule="duration(self) >= duration('1h')",message="rotationInterval must be at least 1h"
// +optional
RotationInterval *metav1.Duration `json:"rotationInterval,omitempty"`
}
SigningKeySpec configures the bundle signing key.
func (*SigningKeySpec) DeepCopy ¶ added in v0.1.1
func (in *SigningKeySpec) DeepCopy() *SigningKeySpec
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new SigningKeySpec.
func (*SigningKeySpec) DeepCopyInto ¶ added in v0.1.1
func (in *SigningKeySpec) DeepCopyInto(out *SigningKeySpec)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type SkipSpec ¶
type SkipSpec struct {
// Paths that are never inspected.
// +kubebuilder:validation:MaxItems=64
// +optional
Paths []PathPattern `json:"paths,omitempty"`
// BodyPaths are paths whose body is not inspected; their headers and URI
// still are.
// +kubebuilder:validation:MaxItems=64
// +optional
BodyPaths []PathPattern `json:"bodyPaths,omitempty"`
}
SkipSpec lists requests that are never inspected.
func (*SkipSpec) DeepCopy ¶
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new SkipSpec.
func (*SkipSpec) DeepCopyInto ¶
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type Support ¶ added in v0.3.0
type Support string
Support is how far Inkwall wires a proxy controller's routes (0004 §4.1). +kubebuilder:validation:Enum=Full;Partial;Unsupported
const ( // SupportFull: Inkwall wires the routes of every class of the // controller. SupportFull Support = "Full" // SupportPartial: it wires those of some of its classes; the message // says which aren't. SupportPartial Support = "Partial" // SupportUnsupported: it wires none; a policy on one of its routes is // not Programmed (ControllerUnsupported). SupportUnsupported Support = "Unsupported" )
The support levels.
type TargetRef ¶
type TargetRef struct {
// Group of the target: networking.k8s.io (the default, for Ingress),
// gateway.networking.k8s.io (for HTTPRoute), traefik.io (for Traefik's
// IngressRoute) or networking.istio.io (for Istio's VirtualService).
// +kubebuilder:validation:MaxLength=253
// +optional
Group string `json:"group,omitempty"`
// Kind of the target: Ingress, HTTPRoute, IngressRoute or
// VirtualService. An
// IngressRoute's hosts and paths come from its routes' match rules,
// which may combine Host, Path and PathPrefix with &&; a rule with
// anything else (||, !, other matchers) is not accepted. An HTTPRoute's routes
// are each of its hostnames (none: any host) with each of its rules'
// matches, which may have an Exact or PathPrefix path and a method; a
// match with a RegularExpression path, headers or queryParams is not
// accepted. A VirtualService's routes are each of its hosts ("*": any
// host) with each of its http routes' matches, which may have an exact
// or prefix uri and an exact method; a match with anything else (a regex
// uri, headers, query parameters, ...), a delegate, or a short host name
// is not accepted. Whether a proxy wires HTTPRoute targets depends
// on its integration; VirtualService targets are wired through Istio's
// ingress gateways.
// +kubebuilder:validation:Enum=Ingress;HTTPRoute;IngressRoute;VirtualService
Kind string `json:"kind"`
// Name of the target.
// +kubebuilder:validation:MinLength=1
// +kubebuilder:validation:MaxLength=253
Name string `json:"name"`
// SectionName narrows an HTTPRoute target to the rule of that name:
// only its matches are protected, and it takes precedence over a policy
// on the whole HTTPRoute. A name no rule has is a missing target.
// +kubebuilder:validation:MinLength=1
// +kubebuilder:validation:MaxLength=253
// +optional
SectionName string `json:"sectionName,omitempty"`
}
TargetRef names a route in the policy's namespace. +kubebuilder:validation:XValidation:rule="(self.kind == 'Ingress' && (!has(self.group) || self.group == 'networking.k8s.io')) || (self.kind == 'HTTPRoute' && has(self.group) && self.group == 'gateway.networking.k8s.io') || (self.kind == 'IngressRoute' && has(self.group) && self.group == 'traefik.io') || (self.kind == 'VirtualService' && has(self.group) && self.group == 'networking.istio.io')",message="target must be a networking.k8s.io Ingress, a gateway.networking.k8s.io HTTPRoute, a traefik.io IngressRoute or a networking.istio.io VirtualService" +kubebuilder:validation:XValidation:rule="!has(self.sectionName) || self.kind == 'HTTPRoute'",message="sectionName is only allowed for an HTTPRoute"
func (*TargetRef) DeepCopy ¶
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new TargetRef.
func (*TargetRef) DeepCopyInto ¶
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type WAFPolicy ¶
type WAFPolicy struct {
metav1.TypeMeta `json:",inline"`
metav1.ObjectMeta `json:"metadata,omitempty"`
Spec WAFPolicySpec `json:"spec"`
// +optional
Status WAFPolicyStatus `json:"status,omitempty"`
}
WAFPolicy protects routes: which rules run, in which mode, and what happens when inspection fails.
+kubebuilder:object:root=true +kubebuilder:subresource:status +kubebuilder:resource:categories=inkwall,shortName=wafp +kubebuilder:printcolumn:name="Mode",type=string,JSONPath=`.spec.mode` +kubebuilder:printcolumn:name="Ready",type=string,JSONPath=`.status.conditions[?(@.type=="Ready")].status` +kubebuilder:printcolumn:name="Bundle",type=integer,JSONPath=`.status.bundleVersion` +kubebuilder:printcolumn:name="Age",type=date,JSONPath=`.metadata.creationTimestamp`
func (*WAFPolicy) DeepCopy ¶
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new WAFPolicy.
func (*WAFPolicy) DeepCopyInto ¶
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*WAFPolicy) DeepCopyObject ¶
DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
type WAFPolicyList ¶
type WAFPolicyList struct {
metav1.TypeMeta `json:",inline"`
metav1.ListMeta `json:"metadata,omitempty"`
Items []WAFPolicy `json:"items"`
}
WAFPolicyList is a list of WAFPolicy.
+kubebuilder:object:root=true
func (*WAFPolicyList) DeepCopy ¶
func (in *WAFPolicyList) DeepCopy() *WAFPolicyList
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new WAFPolicyList.
func (*WAFPolicyList) DeepCopyInto ¶
func (in *WAFPolicyList) DeepCopyInto(out *WAFPolicyList)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*WAFPolicyList) DeepCopyObject ¶
func (in *WAFPolicyList) DeepCopyObject() runtime.Object
DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
type WAFPolicySpec ¶
type WAFPolicySpec struct {
// TargetRefs are the routes this policy protects, in the policy's
// namespace.
// +kubebuilder:validation:MinItems=1
// +kubebuilder:validation:MaxItems=16
// +kubebuilder:validation:XValidation:rule="self.all(a, self.exists_one(b, b.kind == a.kind && b.name == a.name && (has(b.sectionName) ? b.sectionName : ”) == (has(a.sectionName) ? a.sectionName : ”)))",message="targetRefs must not repeat a target"
TargetRefs []TargetRef `json:"targetRefs"`
// Mode is Detect (log, let through) or Block (reject).
// +kubebuilder:default=Detect
// +optional
Mode PolicyMode `json:"mode,omitempty"`
// FailureMode is what happens to a request that can't be inspected in
// time. Unset: Closed in Block mode, Open in Detect mode.
// +optional
FailureMode FailureMode `json:"failureMode,omitempty"`
// Timeout is the inspection deadline per request, at most 1s. Unset:
// the engine's default (250ms).
// +kubebuilder:validation:XValidation:rule="duration(self) > duration('0s') && duration(self) <= duration('1s')",message="timeout must be more than 0s and at most 1s"
// +optional
Timeout *metav1.Duration `json:"timeout,omitempty"`
// Skip lists requests that are never inspected.
// +optional
Skip *SkipSpec `json:"skip,omitempty"`
// RuleSets are the rules to run, in order. Empty: the built-in OWASP CRS
// with its default paranoia level and threshold.
// +kubebuilder:validation:MaxItems=8
// +optional
RuleSets []RuleSetBinding `json:"ruleSets,omitempty"`
// Exclusions turn rules off where they cause false positives.
// +kubebuilder:validation:MaxItems=128
// +optional
Exclusions []Exclusion `json:"exclusions,omitempty"`
// Body configures request body inspection.
// +optional
Body *BodySpec `json:"body,omitempty"`
// WebSocket is what a WebSocket handshake on the policy's routes must
// meet, on top of the rules: the origins it may come from, the headers
// it must have. A handshake that doesn't is denied with 403 in Block
// mode (logged in Detect mode), and isn't upgraded. Other requests
// aren't affected. The handshake's URL and headers are inspected by
// the rules whether this is set or not; the messages after it are not
// inspected (docs/websocket.md). Engines before 0.4.0 ignore it: the
// policy isn't Enforced while one is connected.
// +optional
WebSocket *WebSocketSpec `json:"webSocket,omitempty"`
// Responses configures response inspection, for data leaks (the CRS's
// RESPONSE-95x rules, and the rule sets' rules on RESPONSE_*
// variables). Unset: responses are not inspected. Only Envoy Gateway
// sends responses to the engine: on a route of another proxy
// (Traefik's ForwardAuth can't), the policy is not Programmed
// (ResponsesNotInspected).
// +optional
Responses *ResponsesSpec `json:"responses,omitempty"`
}
WAFPolicySpec is what to enforce on which routes.
func (*WAFPolicySpec) DeepCopy ¶
func (in *WAFPolicySpec) DeepCopy() *WAFPolicySpec
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new WAFPolicySpec.
func (*WAFPolicySpec) DeepCopyInto ¶
func (in *WAFPolicySpec) DeepCopyInto(out *WAFPolicySpec)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type WAFPolicyStatus ¶
type WAFPolicyStatus struct {
// ObservedGeneration is the generation the status describes.
// +optional
ObservedGeneration int64 `json:"observedGeneration,omitempty"`
// BundleVersion is the first bundle that enforces this generation as it
// is now: later bundles do too, until one changes the policy (its
// spec, routes or rule sets) or suspends the cluster. Bundles that
// change only other policies leave it.
// +optional
BundleVersion int64 `json:"bundleVersion,omitempty"`
// Conditions are Accepted, Programmed, Enforced and Ready.
// +listType=map
// +listMapKey=type
// +optional
Conditions []metav1.Condition `json:"conditions,omitempty"`
}
WAFPolicyStatus reports how far the policy got: accepted, programmed into the proxy, enforced by every engine (0004 §3.2).
func (*WAFPolicyStatus) DeepCopy ¶
func (in *WAFPolicyStatus) DeepCopy() *WAFPolicyStatus
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new WAFPolicyStatus.
func (*WAFPolicyStatus) DeepCopyInto ¶
func (in *WAFPolicyStatus) DeepCopyInto(out *WAFPolicyStatus)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type WAFRuleSet ¶
type WAFRuleSet struct {
metav1.TypeMeta `json:",inline"`
metav1.ObjectMeta `json:"metadata,omitempty"`
Spec WAFRuleSetSpec `json:"spec"`
// +optional
Status RuleSetStatus `json:"status,omitempty"`
}
WAFRuleSet is a set of rules that policies in its namespace can use.
+kubebuilder:object:root=true +kubebuilder:subresource:status +kubebuilder:resource:categories=inkwall,shortName=wafrs +kubebuilder:printcolumn:name="Builtin",type=string,JSONPath=`.spec.source.builtin` +kubebuilder:printcolumn:name="Age",type=date,JSONPath=`.metadata.creationTimestamp`
func (*WAFRuleSet) DeepCopy ¶
func (in *WAFRuleSet) DeepCopy() *WAFRuleSet
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new WAFRuleSet.
func (*WAFRuleSet) DeepCopyInto ¶
func (in *WAFRuleSet) DeepCopyInto(out *WAFRuleSet)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*WAFRuleSet) DeepCopyObject ¶
func (in *WAFRuleSet) DeepCopyObject() runtime.Object
DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
type WAFRuleSetList ¶
type WAFRuleSetList struct {
metav1.TypeMeta `json:",inline"`
metav1.ListMeta `json:"metadata,omitempty"`
Items []WAFRuleSet `json:"items"`
}
WAFRuleSetList is a list of WAFRuleSet.
+kubebuilder:object:root=true
func (*WAFRuleSetList) DeepCopy ¶
func (in *WAFRuleSetList) DeepCopy() *WAFRuleSetList
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new WAFRuleSetList.
func (*WAFRuleSetList) DeepCopyInto ¶
func (in *WAFRuleSetList) DeepCopyInto(out *WAFRuleSetList)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*WAFRuleSetList) DeepCopyObject ¶
func (in *WAFRuleSetList) DeepCopyObject() runtime.Object
DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
type WAFRuleSetSpec ¶
type WAFRuleSetSpec struct {
// Source of the rules.
Source RuleSetSource `json:"source"`
}
WAFRuleSetSpec defines a namespaced rule set.
func (*WAFRuleSetSpec) DeepCopy ¶
func (in *WAFRuleSetSpec) DeepCopy() *WAFRuleSetSpec
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new WAFRuleSetSpec.
func (*WAFRuleSetSpec) DeepCopyInto ¶
func (in *WAFRuleSetSpec) DeepCopyInto(out *WAFRuleSetSpec)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type WebSocketOrigin ¶ added in v0.4.0
type WebSocketOrigin string
WebSocketOrigin is an origin, "scheme://host[:port]", lower case; the host may start with "*." to match subdomains. +kubebuilder:validation:MaxLength=270 +kubebuilder:validation:Pattern=`^https?://(\*\.)?[a-z0-9]([a-z0-9-]{0,61}[a-z0-9])?(\.[a-z0-9]([a-z0-9-]{0,61}[a-z0-9])?)*(:[0-9]{1,5})?$`
type WebSocketSpec ¶ added in v0.4.0
type WebSocketSpec struct {
// AllowedOrigins are the origins a handshake may come from, against
// cross-site WebSocket hijacking: a page on another site can open a
// WebSocket to the application with the user's cookies, and only the
// Origin header tells. Each is "scheme://host" or "scheme://host:port",
// lower case, with scheme http or https; a host "*.example.com"
// matches any subdomain of example.com, not example.com itself. A
// handshake without Origin is denied unless allowMissingOrigin is set.
// Empty: any origin.
// +kubebuilder:validation:MaxItems=64
// +listType=set
// +optional
AllowedOrigins []WebSocketOrigin `json:"allowedOrigins,omitempty"`
// AllowMissingOrigin lets a handshake without an Origin header pass
// the origin check. Browsers always send Origin; other clients (a
// mobile app, a service) may not, and aren't the target of cross-site
// hijacking.
// +optional
AllowMissingOrigin bool `json:"allowMissingOrigin,omitempty"`
// RequiredHeaders are headers a handshake must have, not empty: a
// token (Authorization), a subprotocol (Sec-WebSocket-Protocol). Their
// values aren't checked.
// +kubebuilder:validation:MaxItems=16
// +listType=set
// +optional
RequiredHeaders []HeaderName `json:"requiredHeaders,omitempty"`
}
WebSocketSpec is what a WebSocket handshake must meet. +kubebuilder:validation:XValidation:rule="!has(self.allowMissingOrigin) || !self.allowMissingOrigin || (has(self.allowedOrigins) && size(self.allowedOrigins) > 0)",message="allowMissingOrigin needs allowedOrigins"
func (*WebSocketSpec) DeepCopy ¶ added in v0.4.0
func (in *WebSocketSpec) DeepCopy() *WebSocketSpec
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new WebSocketSpec.
func (*WebSocketSpec) DeepCopyInto ¶ added in v0.4.0
func (in *WebSocketSpec) DeepCopyInto(out *WebSocketSpec)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.