Policy vs Config Files: Clear Boundaries and Purpose Definition #277
attackordie
started this conversation in
Ideas
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
[RFC] Policy vs Config Files: Clear Boundaries and Purpose Definition
Problem Statement
There's significant confusion in the WebAssembly ecosystem about the distinction between policy files (runtime configuration) and config files (compile-time metadata). This confusion affects:
Current Confusion Points
What developers are asking:
Root cause: Both files contain "configuration" but serve fundamentally different purposes in the WebAssembly lifecycle, yet this distinction isn't clearly documented.
Why Both Files Are Fundamentally Needed
WebAssembly Component Distribution Models
Pre-compiled Components:
Source Code Sharing:
The Capability vs Permission Gap
Supply Chain Security Benefits
Binary Verification Challenge:
Policy Verification Advantage:
Defense-in-Depth Protection: Even if a malicious component passes verification, restrictive policies provide a final security gate that can block unexpected behavior.
Clear Boundary Definition
Config File (
application/vnd.wasm.config.v0+json)Purpose: Component Identity & Capabilities
Owner: Component Publisher (developer/CI system)
Lifecycle: Generated at compile-time, read at runtime for capability validation
Mutability: Editable during compilation, immutable after distribution
What belongs in config:
Does NOT belong: Runtime limits, security controls, environment settings, deployment policies
Policy File (
application/vnd.wasm.policy.v1+yaml)Purpose: Runtime Security & Resource Control
Owner: Platform Operator (DevOps/security team)
Lifecycle: Created at deploy-time, enforced at runtime
Mutability: Environment-specific, can change without rebuilding component
What belongs in policy:
Does NOT belong: Component interfaces, build metadata, WASI specifications
Core Principle: Policy Can Only Restrict, Never Expand
Critical Rule: Policy files can only ADD restrictions beyond what the config file permits. They cannot grant capabilities that the component wasn't built with.
Key Differences Summary
Real-World Example
Config (component capabilities):
Production Policy (deployment restrictions):
Development Policy (still bounded by config):
The Goal: Make it crystal clear when developers should use config vs policy files, eliminating confusion and enabling secure, flexible WebAssembly deployment with robust supply chain protection.
Beta Was this translation helpful? Give feedback.
All reactions