envoyproxy/envoy

Expose files to wasm extensions

Open

#22,557 建立於 2022年8月4日

在 GitHub 查看
 (15 留言) (8 反應) (0 負責人)C++ (5,373 fork)batch import
enhancementhelp wanted

倉庫指標

Star
 (27,997 star)
PR 合併指標
 (平均合併 8天) (30 天內合併 378 個 PR)

描述

Title: Allow files to be specified when enabling a wasm plugin which will be accessible via wasi.

Description:

It can be useful to load large-ish data files from a wasm plugin, for example complex WAF rules or neural network parameters used to classify requests. While wasi defines an interface for reading files, Envoy does not expose it to wasm plugins yet. Plugins should not be able to access any file on the host automatically - the configuration should decide what folders or files are expose. The configuration could look like

{
  "vm_id": ...,
  "runtime": ...,
  "code": {...},
  "configuration": {...},
  "allow_precompiled": ...,
  "nack_on_code_cache_miss": ...,
  "environment_variables": {...}
  "filesystem": [
    "/some/directory/",
    "/some/other/directory/file.dat",
  ]
}

[optional Relevant Links:] This is similar to #14958 but for files instead of environment variables.

貢獻者指南