feat(m0.6-r2): host-owned plugin handle authority

- add PluginHandleTable with owner, run id and generation scoping
- reject forged, cross-owner, cross-run and post-unload handles
- reject any plugin_handle returned by plugin or foreign-kernel output,
  including nested values
- add ADR-0014 and update value-wire/security specs
This commit is contained in:
cflmy committed 2026-11-20 11:43:21 +08:00
1 parent d940013f35
commit 7797d78d86
8 files changed
+276 -9

No files matched your search

+4 -2
View File
@@ -127,8 +127,10 @@ The following are **not** bounded by `WireLimits` in
`plugin_handle.plugin`/`export` are not checked against
`max_string_bytes`;
* a `plugin_handle` decoded from wire data is a structurally reconstructed
`Value::PluginHandle`; this build does not carry an unforgeable capability
token. Host code must therefore treat a plugin handle as opaque *intent* and
`Value::PluginHandle`; it is **not** an authorization token. The host owns a
`PluginHandleTable` with owner/run/generation scope (ADR-0014), and plugin or
foreign output containing any handle is rejected with
`plugin_handle.untrusted`. Host code must therefore treat a plugin handle as opaque *intent* and
re-authorize any operation, not as proof of prior authorization. The header
comment "cannot be forged from wire data" is aspirational for this point and
should be fixed or reworded in a future ADR.