RMT Reference: Security and Policies
Executable language rules live in tools/rmt-language/vnext-security.js.
Security and hydration policies live in lifecycle operation policy blocks.
Syntax
Allowed contexts
These operators appear in the policy block after mount, hydrate, update, stream or other lifecycle operations. trust boundary also appears in remote surface.
Parameters
Trust boundaries are stable string identifiers. Hydration, isolation and sanitize values are static identifiers or booleans.
Description
Policies describe security and hydration boundaries without executing host code in the RMT source.
Examples
template reference.security {
portal app.root root "#app" layer surface
surface preview kind page component x-section {
portal app.root
lane visible weight 80 {
mount preview.body from endpoint docs.preview {
trust boundary "xtend.security.sanitizing-boundary.v1"
hydration policy visible-only
hydration mode eager
hydration insular true
isolation boundary "docs.preview"
isolation mode strict
sanitize html
}
}
}
}
Diagnostics
Policy blocks allow only slots, event bindings, hydration, isolation and security policies. Other tokens are context errors.
Related operators
mount, hydrate, stream, remote surface, origin, integrity sha256.
Related reading
The RMT reference index distinguishes language-level policy records from host security policy. Related article