elastic / kibana

Your window into the Elastic Stack
https://www.elastic.co/products/kibana
Other
19.61k stars 8.22k forks source link

[Discuss] Implement WebAssembly (WASM) in Kibana #199258

Open bhapas opened 20 hours ago

bhapas commented 20 hours ago

This goal of this issue is to discuss multiple options to implement WASM into Kibana. This focuses on WASM builds from Golang. Implementation details on Golang side are out of scope for this issue since it does not affect the way wasm module is applied in Kibana.

Background

WebAssembly is a high-performance assembly-like language that can be compiled from various languages, including C/C++, Rust, Go and AssemblyScript. Currently, it is supported by Chrome, Firefox, Safari, Edge, and Node.js!

Usecase

This issue focuses on building WASM modules from Golang. There are a few tools in Golang that can be used in Kibana for solving different problems like validations etc.,

WASM build

Currently Golang supports building the Go files/packages into wasm modules using different ports:js/wasm wasip1/wasm etc., Out of these wasip1/wasm uses Experimental WASI features in NodeJS , which means there are potential security concerns around this port usage.

That leaves us with usage of js/wasm port, which means the wasm build comes with file.wasm and JS glue filewasm_exec.js to be added to Kibana distribution.

Usage options

Risks

cc: @azasypkin @kobelb @elastic/kibana-security

elasticmachine commented 20 hours ago

Pinging @elastic/security-scalability (Team:Security-Scalability)