Limits

microgateway.airlock.com/v1alpha1


Limits contains the configuration for limits.

apiVersion: microgateway.airlock.com/v1alpha1
kind: Limits
metadata:
  name: limits-example
spec:
  settings:
    threatHandlingMode: Block
  request:
    limited:
      general:
        # Reduce the parsed body size to '10Ki' to increase security.
        bodySize: 10Ki
        pathLength: 1Ki
      parameter:
        count: 128
        nameLength: 128
        # Reduce the maximum length to '1Ki'.
        valueLength: 1Ki
      json:
        nestingDepth: 100
        keyCount: 250
        elementCount: 150000
        keyLength: 128
        valueLength: 8Ki
apiVersion: microgateway.airlock.com/v1alpha1
kind: Limits
metadata:
  name: default
spec: 
  settings: 
    threatHandlingMode: Block
  request: 
    limited: 
      general: 
        bodySize: "100Ki"
        pathLength: "1Ki"
      parameter: 
        count: 128
        nameLength: "128"
        valueLength: "8Ki"
      json: 
        nestingDepth: 100
        keyCount: 250
        elementCount: 10000
        keyLength: "128"
        valueLength: "8Ki"

Limits

Field Type Description Required Default Allowed Values
metadata ObjectMeta Refer to Kubernetes API documentation for fields of metadata yes
spec object Specification of the desired limits behavior. no

Limits.spec

Field Type Description Required Default Allowed Values
request object Request defines the limits for requests. no limited{...} unlimited{}, limited{}
settings object Settings configures the limits filter. no

Limits.spec.request

Field Type Description Required Default Allowed Values
limited object Limited enables limits on request scope. no
unlimited object Unlimited disables all limits on request scope. no

Limits.spec.request.limited

Field Type Description Required Default Allowed Values
general object General defines general request limits. no
json object JSON defines the limits for JSON requests. no
parameter object Parameter defines the limits for request parameters. no

Limits.spec.request.limited.general

Field Type Description Required Default Allowed Values
bodySize Quantity BodySize limits the total size of the request body. It specifies the number of bytes (0 = unlimited). This limit is effective only for requests that are parsed (e.g. JSON data). File uploads are not affected by this limit. no 100Ki
pathLength Quantity PathLength defines the maximum path length for requests. no 1Ki

Limits.spec.request.limited.json

Field Type Description Required Default Allowed Values
elementCount uint64 ElementCount defines the maximum number of keys and array items in the whole JSON document (recursive). no 10000 [0, 18446744073709551615]
keyCount uint64 KeyCount defines the maximum number of keys of a single JSON object (non-recursive). no 250 [0, 18446744073709551615]
keyLength Quantity KeyLength defines the maximum length for JSON keys. no 128
nestingDepth uint64 NestingDepth defines the maximum depth of nesting for JSON objects and JSON arrays. no 100 [0, 18446744073709551615]
valueLength Quantity ValueLength defines the maximum length for JSON values. no 8Ki

Limits.spec.request.limited.parameter

Field Type Description Required Default Allowed Values
count uint64 Count defines the maximum number of request parameters. no 128 [0, 18446744073709551615]
nameLength Quantity NameLength defines the maximum length for parameter names. no 128
valueLength Quantity ValueLength defines the maximum length for parameter values. no 8Ki

Limits.spec.settings

Field Type Description Required Default Allowed Values
threatHandlingMode enum ThreatHandlingMode specifies how threats should be handled when a limit hits. no Block Block, LogOnly