Skip to content

Commit 6753173

Browse files
committed
Tighten remaining docs readability
1 parent 9a92135 commit 6753173

4 files changed

Lines changed: 18 additions & 11 deletions

File tree

docs/ARCHITECTURE.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -162,7 +162,8 @@ Proxy-Wasm HTTP callouts (`proxy_http_call`) reuse connections via an internal p
162162
- Blocking TCP sockets from the Varnish worker thread executing the filter
163163
- Default pool size: 16 persistent connections; configurable with `wasm.set_http_pool_size(size)`
164164
- Circuit breaker: after N consecutive failures, short-circuit for cooldown period
165-
- SSRF prevention: upstream allowlist plus private/internal IP checks for non-allowlisted destinations after DNS resolution
165+
- SSRF prevention: upstream allowlist plus private/internal IP checks for
166+
non-allowlisted destinations after DNS resolution
166167

167168
### Deferred HTTP Callout Callback
168169

docs/PRODUCTION.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,7 @@ path:
4444

4545
```vcl
4646
import wasm;
47+
import std;
4748
4849
sub vcl_init {
4950
wasm.load("edge", "/etc/varnish/wasm/edge_security_filter.wasm");
@@ -61,7 +62,7 @@ sub vcl_recv {
6162
6263
set req.http.X-Wasm-Action = wasm.proxy_wasm_on_request("edge");
6364
if (req.http.X-Wasm-Action != "0") {
64-
return (synth(403, "Blocked"));
65+
return (synth(std.integer(req.http.X-Wasm-Action, 403), "Blocked"));
6566
}
6667
}
6768
```

docs/SECURITY.md

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,8 @@ following security considerations:
6767

6868
### Body Access
6969
- `proxy_get_buffer_bytes`: Read-only access to request/response body
70-
- `proxy_set_buffer_bytes`: Can rewrite response body chunks in the VDP; request-body replacements are visible to later module reads
70+
- `proxy_set_buffer_bytes`: Can rewrite response body chunks in the VDP;
71+
request-body replacements are visible to later module reads
7172
- Body modification is per-request, not persistent
7273

7374
### Property Access
@@ -177,5 +178,5 @@ untrusted input:
177178
| Rate limit bypass (IP spoofing) | Relies on trusted `X-Forwarded-For` from upstream load balancer |
178179
| Shared data exhaustion | Time-bucketed keys; old buckets naturally expire |
179180
| Auth service DoS | HTTP call limit + timeout; circuit breaker in http_pool |
180-
| Config injection | The product validates and rejects unknown fields; the fixture falls back to defaults on malformed JSON |
181+
| Config injection | Product config rejects unknown fields; the fixture falls back to defaults on malformed JSON |
181182
| Integer overflow in counters | u64 counters; overflow at 2^64 is not reachable |

examples/README.md

Lines changed: 11 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -7,13 +7,17 @@ at once.
77

88
## Module Map
99

10-
| Module | ABI style | What it is good for |
11-
|--------|-----------|---------------------|
12-
| [`rust/`](rust/) | Native vmod-wasm host functions plus raw Proxy-Wasm ABI | Learning the low-level imports exposed by vmod-wasm and testing execution limits |
13-
| [`proxy-wasm-filter/`](proxy-wasm-filter/) | Rust `proxy-wasm` SDK | A readable starter filter with request, response, local response, and body callbacks |
14-
| [`passthrough/`](passthrough/) | Raw Proxy-Wasm ABI | Baseline lifecycle module for smoke tests and overhead checks |
15-
| [`transform/`](transform/) | Raw Proxy-Wasm ABI | Minimal response-header mutation without the SDK |
16-
| [`edge-security-filter/`](edge-security-filter/) | Rust `proxy-wasm` SDK | Integration-test fixture covering config, metrics, shared data, callouts, body callbacks, and local responses |
10+
- [`rust/`](rust/) uses native vmod-wasm host functions plus a small raw
11+
Proxy-Wasm ABI filter. Read it when you want low-level imports or execution
12+
limit tests.
13+
- [`proxy-wasm-filter/`](proxy-wasm-filter/) uses the Rust `proxy-wasm` SDK.
14+
Read it first if you want the normal SDK shape.
15+
- [`passthrough/`](passthrough/) is a no-op raw Proxy-Wasm ABI module for
16+
lifecycle smoke tests and overhead checks.
17+
- [`transform/`](transform/) is a minimal response-header mutation using direct
18+
Proxy-Wasm ABI imports.
19+
- [`edge-security-filter/`](edge-security-filter/) is the realistic fixture:
20+
config, metrics, shared data, callouts, body callbacks, and local responses.
1721

1822
For production edge security deployments, use the standalone
1923
[vmod-wasm Edge Security Filter](https://github.com/RamazanKara/vmod-wasm-edge-security-filter)

0 commit comments

Comments
 (0)