Skip to main content

Module ext_auth

Module ext_auth 

Source
Available on crate feature gateway-api only.
Expand description

Listener filters (Gateway API v1.7, experimental, GEP-5224): a listener’s filters.requests run in order on every HTTP request, before a route is picked. rws supports ExternalAuth:

  • HTTP: the request’s method and path (after http.path, the prefix) go to the authorization server with Host, Authorization, Content-Length and the allowedHeaders, and the body up to forwardBody.maxSize. 200 allows the request, which gets the server’s response headers (allowedResponseHeaders, else all but Host/:authority and framing); any other status is the answer.
  • GRPC: Envoy’s ext_authz (envoy.service.auth.v3.Authorization/Check) over HTTP/2 — the request’s attributes (method, path, host, scheme, headers, body) in a CheckRequest; status OK allows it (with the ok_response’s header changes), anything else answers with the denied_response (403 by default).

A request an authorization server denies goes no further; changes to Host/:authority are ignored (the listener was already chosen). An authorization server that can’t be reached denies with 403: the filter fails closed.

Modules§

proto
The few protobuf messages of Envoy’s ext_authz API rws needs (envoy.service.auth.v3, envoy.config.core.v3, google.rpc.Status), encoded and decoded by hand: a CheckRequest with the HTTP request’s attributes, and the parts of a CheckResponse that decide.

Structs§

CompiledAuth
One ExternalAuth filter, its server resolved.

Enums§

Decision
What an authorization server decided.

Functions§

check
Ask one authorization server.
grpc_decision
A CheckResponse as a decision.
http_decision
An HTTP authorization server’s answer as a decision.
http_request
The HTTP authorization request for request.
run
Run filters in order on request: the request as they left it (None: unchanged), or the answer when one denies it.