influxdata / influxdata/datafusion-udf-wasm
Stronger HTTP Permission Model
- Dominant language
- Rust
- Stars
- 20
- Forks
- 3
- Avg merge
- 6h 20m
- Merged PRs (30d)
- 24
Description
# What
Extend the builtin HTTP permission system by additional checks.
# Why
The current interface is rather abstract and allows users to implement many possible checks:
https://github.com/influxdata/datafusion-udf-wasm/blob/38e195b69bc8bdd9c562f4c177f4105378393c81/host/src/http.rs#L8-L20
We also offer two implementations of this interface for the users:
https://github.com/influxdata/datafusion-udf-wasm/blob/38e195b69bc8bdd9c562f4c177f4105378393c81/host/src/http.rs#L22-L24
https://github.com/influxdata/datafusion-udf-wasm/blob/38e195b69bc8bdd9c562f4c177f4105378393c81/host/src/http.rs#L36-L60
Esp. the 2nd one could be a bit more thorough.
# How
Add the following checks:
- [ ] **request path prefix:** This is in addition to host. That would allow restricting requests to certain APIs on the host.
- [ ] **request body size:** Limits certain types of DoS attacks.
- [ ] **response body size:** Prevents possible OOM situations on the host by buffering overlarge responses.
- [ ] **rate limit:** Prevents DoS.
- [ ] **request timeout:** Prevent long-running / forever-open HTTP requests (although this is somewhat limited by the UDF lifetime anyways).
Contributor guide
Assessment
This issue has not been assessed yet.