Unified Matcher API

config.common.matcher.v3.MatchPredicate

[config.common.matcher.v3.MatchPredicate proto]

Match configuration. This is a recursive structure which allows complex nested match configurations to be built using various logical operators.

{
  "or_match": "{...}",
  "and_match": "{...}",
  "not_match": "{...}",
  "any_match": "...",
  "http_request_headers_match": "{...}",
  "http_request_trailers_match": "{...}",
  "http_response_headers_match": "{...}",
  "http_response_trailers_match": "{...}",
  "http_request_generic_body_match": "{...}",
  "http_response_generic_body_match": "{...}"
}
or_match

(config.common.matcher.v3.MatchPredicate.MatchSet) A set that describes a logical OR. If any member of the set matches, the match configuration matches.

Precisely one of or_match, and_match, not_match, any_match, http_request_headers_match, http_request_trailers_match, http_response_headers_match, http_response_trailers_match, http_request_generic_body_match, http_response_generic_body_match must be set.

and_match

(config.common.matcher.v3.MatchPredicate.MatchSet) A set that describes a logical AND. If all members of the set match, the match configuration matches.

Precisely one of or_match, and_match, not_match, any_match, http_request_headers_match, http_request_trailers_match, http_response_headers_match, http_response_trailers_match, http_request_generic_body_match, http_response_generic_body_match must be set.

not_match

(config.common.matcher.v3.MatchPredicate) A negation match. The match configuration will match if the negated match condition matches.

Precisely one of or_match, and_match, not_match, any_match, http_request_headers_match, http_request_trailers_match, http_response_headers_match, http_response_trailers_match, http_request_generic_body_match, http_response_generic_body_match must be set.

any_match

(bool) The match configuration will always match.

Precisely one of or_match, and_match, not_match, any_match, http_request_headers_match, http_request_trailers_match, http_response_headers_match, http_response_trailers_match, http_request_generic_body_match, http_response_generic_body_match must be set.

http_request_headers_match

(config.common.matcher.v3.HttpHeadersMatch) HTTP request headers match configuration.

Precisely one of or_match, and_match, not_match, any_match, http_request_headers_match, http_request_trailers_match, http_response_headers_match, http_response_trailers_match, http_request_generic_body_match, http_response_generic_body_match must be set.

http_request_trailers_match

(config.common.matcher.v3.HttpHeadersMatch) HTTP request trailers match configuration.

Precisely one of or_match, and_match, not_match, any_match, http_request_headers_match, http_request_trailers_match, http_response_headers_match, http_response_trailers_match, http_request_generic_body_match, http_response_generic_body_match must be set.

http_response_headers_match

(config.common.matcher.v3.HttpHeadersMatch) HTTP response headers match configuration.

Precisely one of or_match, and_match, not_match, any_match, http_request_headers_match, http_request_trailers_match, http_response_headers_match, http_response_trailers_match, http_request_generic_body_match, http_response_generic_body_match must be set.

http_response_trailers_match

(config.common.matcher.v3.HttpHeadersMatch) HTTP response trailers match configuration.

Precisely one of or_match, and_match, not_match, any_match, http_request_headers_match, http_request_trailers_match, http_response_headers_match, http_response_trailers_match, http_request_generic_body_match, http_response_generic_body_match must be set.

http_request_generic_body_match

(config.common.matcher.v3.HttpGenericBodyMatch) HTTP request generic body match configuration.

Precisely one of or_match, and_match, not_match, any_match, http_request_headers_match, http_request_trailers_match, http_response_headers_match, http_response_trailers_match, http_request_generic_body_match, http_response_generic_body_match must be set.

http_response_generic_body_match

(config.common.matcher.v3.HttpGenericBodyMatch) HTTP response generic body match configuration.

Precisely one of or_match, and_match, not_match, any_match, http_request_headers_match, http_request_trailers_match, http_response_headers_match, http_response_trailers_match, http_request_generic_body_match, http_response_generic_body_match must be set.

config.common.matcher.v3.MatchPredicate.MatchSet

[config.common.matcher.v3.MatchPredicate.MatchSet proto]

A set of match configurations used for logical operations.

{
  "rules": []
}
rules

(config.common.matcher.v3.MatchPredicate, REQUIRED) The list of rules that make up the set.

config.common.matcher.v3.HttpHeadersMatch

[config.common.matcher.v3.HttpHeadersMatch proto]

HTTP headers match configuration.

{
  "headers": []
}
headers

(config.route.v3.HeaderMatcher) HTTP headers to match.

config.common.matcher.v3.HttpGenericBodyMatch

[config.common.matcher.v3.HttpGenericBodyMatch proto]

HTTP generic body match configuration. List of text strings and hex strings to be located in HTTP body. All specified strings must be found in the HTTP body for positive match. The search may be limited to specified number of bytes from the body start.

Attention

Searching for patterns in HTTP body is potentially cpu intensive. For each specified pattern, http body is scanned byte by byte to find a match. If multiple patterns are specified, the process is repeated for each pattern. If location of a pattern is known, bytes_limit should be specified to scan only part of the http body.

{
  "bytes_limit": "...",
  "patterns": []
}
bytes_limit

(uint32) Limits search to specified number of bytes - default zero (no limit - match entire captured buffer).

patterns

(config.common.matcher.v3.HttpGenericBodyMatch.GenericTextMatch, REQUIRED) List of patterns to match.

config.common.matcher.v3.HttpGenericBodyMatch.GenericTextMatch

[config.common.matcher.v3.HttpGenericBodyMatch.GenericTextMatch proto]

{
  "string_match": "...",
  "binary_match": "..."
}
string_match

(string) Text string to be located in HTTP body.

Precisely one of string_match, binary_match must be set.

binary_match

(bytes) Sequence of bytes to be located in HTTP body.

Precisely one of string_match, binary_match must be set.