Envoy library¶
The envoy library adds some types and function to simplify the creation of CheckResponse objects.
Types¶
<CheckRequest>¶
CEL Type / Proto: envoy.service.auth.v3.CheckRequest
<CheckResponse>¶
CEL Type / Proto: envoy.service.auth.v3.CheckResponse
<OkHttpResponse>¶
CEL Type / Proto: envoy.service.auth.v3.OkHttpResponse
<DeniedHttpResponse>¶
CEL Type / Proto: envoy.service.auth.v3.DeniedHttpResponse
<Metadata>¶
CEL Type / Proto: google.protobuf.Struct
<HeaderValueOption>¶
CEL Type / Proto: envoy.config.core.v3.HeaderValueOption
<QueryParameter>¶
CEL Type / Proto: envoy.config.core.v3.QueryParameter
<Status>¶
CEL Type / Proto: google.rpc.Status
Functions¶
envoy.Allowed¶
This function creates an <OkHttpResponse> object.
Signature and overloads¶
Example¶
envoy.Denied¶
This function creates a <DeniedHttpResponse> object.
Signature and overloads¶
Example¶
envoy.Header¶
This function creates an <HeaderValueOption> object.
Signature and overloads¶
Example¶
envoy.QueryParam¶
This function creates a <QueryParameter> object.
Signature and overloads¶
Example¶
WithBody¶
This function sets the body of a <DeniedHttpResponse> object.
Signature and overloads¶
Example¶
WithHeader¶
This function adds a <HeaderValueOption>:
- When the request is sent upstream by Envoy, in the case of an
<OkHttpResponse>. - When the response is sent downstream by Envoy, in the case of a
<DeniedHttpResponse>.
Signature and overloads¶
Example¶
WithoutHeader¶
This function marks a header to be removed when the request is sent upstream by Envoy.
Signature and overloads¶
Example¶
WithResponseHeader¶
This function adds a <HeaderValueOption> when the response is sent downstream by Envoy.
Signature and overloads¶
Example¶
WithQueryParam¶
This function adds a <QueryParameter> to be added when the request is sent upstream by Envoy.
Signature and overloads¶
Example¶
WithoutQueryParam¶
This function marks a query parameter to be removed when the request is sent upstream by Envoy.
Signature and overloads¶
Example¶
KeepEmptyValue¶
This function sets the keep_empty_value field of an <HeaderValueOption> object.
Signature and overloads¶
Example¶
Response¶
This function creates a <CheckResponse> object from an <OkHttpResponse> / <DeniedHttpResponse>.
Signature and overloads¶
Example¶
WithMessage¶
This function sets the status.message field of a <CheckResponse> object.
Signature and overloads¶
Example¶
WithMetadata¶
This function sets the dynamic_metadata field of an <CheckResponse> object.