Open boeboe opened 1 year ago
This is correct, URL fetching of wasm is very rudimentary and should only be used with care in production. Envoy should be issuing a warning if you look into the logs. This is the reason why Istio built a whole separate sidecar to pre-fetch the modules.
This issue has been automatically marked as stale because it has not had activity in the last 30 days. It will be closed in the next 7 days unless it is tagged "help wanted" or "no stalebot" or other activity occurs. Thank you for your contributions.
This issue has been automatically closed because it has not had activity in the last 37 days. If this issue is still valid, please ping a maintainer and ask them to label it as "help wanted" or "no stalebot". Thank you for your contributions.
Title: Add support to fetch wasm binary from https base clusters
Description: Currently, using https urls to fetch wasm binaries, does not support https, as it will always set the wrong :scheme:http header, despite configuring an https url.
Bootstrapping wasm service:
Creating static cluster:
This results in the following error traces:
As one can see, the headers are not taking into account the fact that my uri is of scheme
https
.Source code:
Digging into the code, I can see the following.
https://github.com/envoyproxy/envoy/blob/f1369ae370a1062744980b0c0a4a991c8acf68a2/source/common/config/remote_data_fetcher.cc#L33C52-L33C66
https://github.com/envoyproxy/envoy/blob/f1369ae370a1062744980b0c0a4a991c8acf68a2/source/common/http/utility.cc#L1083
As you can see, they just do not take into account the scheme at all.
Also, there is no logic to deal with retries, or with 302 HTTP redirect (eg http > https) from the upstream web server containing the wasm binary.