WASM एक्सटेंशन
पूर्ण प्रोडक्शन प्रोफ़ाइल पर आधारित समर्पित Wasm बिल्ड, जिसमें सीमित पॉलिसी हुक, ACME, मेट्रिक्स और OpenTelemetry शामिल हैं
यह आपको क्या देता है
पूर्ण प्रोडक्शन प्रोफ़ाइल पर आधारित समर्पित Wasm बिल्ड, जिसमें सीमित पॉलिसी हुक, ACME, मेट्रिक्स और OpenTelemetry शामिल हैं.
| फीचर | इसके लिए इसका उपयोग करें |
|---|---|
| पहुंच निर्णय | Live native HTTP/1 access-decision hooks priority ordering, first-deny-wins composition और fail-closed behavior का उपयोग करते हैं। |
| हेडर hooks | request-headers और response-headers hooks सिर्फ allow-listed synthetic headers, जैसे policy-tier example, set या remove कर सकते हैं। |
| रूट निर्णय | route-decision hooks केवल continue, deny या configured matching canary और mirror route branches चुन सकते हैं। |
| Cache निर्णय | cache-lookup hooks continue, pass, bypass या deny कर सकते हैं। cache-store hooks memory/disk cache writes से पहले continue, skip storage या deny कर सकते हैं। |
चलाएँ
समर्पित profile-wasm आर्काइव या इमेज का उपयोग करें; सामान्य पूर्ण बिल्ड को जानबूझकर Wasm से मुक्त रखा गया है।
आधिकारिक Wasm इमेज में रनटाइम है, लेकिन ऑपरेटर प्लगइन नहीं हैं। समीक्षा किए गए मॉड्यूल केवल पढ़ने योग्य रूप में माउंट करें और हर मॉड्यूल को SHA-256 से पिन करें।
podman pull ghcr.io/valkyoth/fluxheim:v1.8.0-wasm
podman run --rm \
-v ./fluxheim.toml:/etc/fluxheim/fluxheim.toml:ro,Z \
-v /srv/infra/fluxheim/plugins:/etc/fluxheim/plugins:ro,Z \
ghcr.io/valkyoth/fluxheim:v1.8.0-wasm
स्वीकृत plugin roots
Plugin फ़ाइलें स्वीकृत root के नीचे absolute path वाली regular file होनी चाहिए; symlink या parent path नहीं होने चाहिए।
[wasm]
enabled = true
plugin_roots = ["/etc/fluxheim/plugins"]
max_total_concurrent_executions = 256
max_total_preview_concurrent_executions = 32
max_total_cache_concurrent_executions = 256
[[wasm.plugins]]
name = "security_headers"
path = "/etc/fluxheim/plugins/security_headers.wasm"
sha256 = "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa"
abi = "fluxheim-policy-v1"
host_call_namespace = "fluxheim-policy-v1"
phases = ["response-headers"]
fail_mode = "fail-closed"
[[wasm.attachments]]
plugin = "security_headers"
vhost = "example"
priority = 100
phases = ["response-headers"]
सीमित execution
Fuel, memory, table, instance, compile-timeout, compile-worker और प्रति-call watchdog सीमाएँ sandbox को सीमित रखती हैं।
[wasm.plugins.limits]
max_module_bytes = "1MiB"
max_compiled_artifact_bytes = "32MiB"
max_memory_bytes = "16MiB"
max_table_elements = 10000
fuel = 5000000
timeout_ms = 50
compile_timeout_ms = 500
उत्पादन नोट्स
कंटेनर का केवल पढ़ने योग्य माउंट होस्ट की फ़ाइलों की सुरक्षा नहीं करता। होस्ट कॉन्फ़िगरेशन और प्लगइन डायरेक्टरी को ऐसे विश्वसनीय खाते के स्वामित्व में रखें जिसके पास लिखने की अनुमति न हो।
- सार्वजनिक प्लगइन मैनिफेस्ट में एक निश्चित SHA-256 डाइजेस्ट होना चाहिए। पूरे प्रोसेस में एक समय में अधिकतम दो मॉड्यूल संकलित होते हैं। संकलित आउटपुट की डिफ़ॉल्ट सीमा 32 MiB है और यह 256 MiB से अधिक नहीं हो सकता।
- config file और उसकी हर मौजूदा parent directory को विश्वसनीय ownership में रखें तथा group या अन्य user को लिखने की अनुमति न दें।
- release versions या image digests को pin करें।
- secrets को files, environment या container secrets में रखें, सार्वजनिक docs में नहीं।