spec icon indicating copy to clipboard operation
spec copied to clipboard

HTTP: add more control over buffering and/or offloading processing to the host

Open PiotrSikora opened this issue 1 year ago • 2 comments

Currently, we only support Continue and Pause actions, which is quite limiting.

Most notably, we require forwarding HTTP headers before processing HTTP body, which prevents building plugins that perform authorization based on contents of HTTP request body or completely consume requests and generate responses from within plugin (for which proxy_send_local_response is too limited).

Refs:

  • https://github.com/proxy-wasm/proxy-wasm-cpp-host/pull/95
  • https://github.com/proxy-wasm/proxy-wasm-cpp-host/issues/143
  • https://github.com/proxy-wasm/proxy-wasm-cpp-host/issues/367
  • https://github.com/proxy-wasm/proxy-wasm-cpp-host/issues/417

PiotrSikora avatar Oct 09 '24 06:10 PiotrSikora

Another use case is to decide whether buffer or not based on headers e.g. in Coraza WAF we only want to buffer and inspect body if certain content type.

jcchavezs avatar Oct 09 '24 09:10 jcchavezs

I put together a doc that consolidates information about this issue and evaluates options: Envoy Wasm / Proxy-Wasm support for FilterHeadersStatus::StopIteration

tl;dr is that I think we should define a v0.2.2 ABI minor revision that fixes this issue (only), decoupling this from other fixes targeted for the v0.3 ABI.

mpwarres avatar Dec 19 '24 18:12 mpwarres