Expand description
Filter packs from Cloud.
GET /v1/policy/bundle (conditional) → verified here before anything is
kept: filter packs must be signed by an Cloud key of the verified key
set, match their digest and validate completely (every pattern
compiles); all packs together stay within CLOUD_MAX_RULES. A bundle
that fails any check never replaces the last good one; the refusal is
shown in cloud status and lean-ctx doctor, and local work goes on
under the last verified bundle.
Stored in <data_dir>/cloud/policy/: the verified bundle, its state,
and filters/set.json, the one file the policy snapshot reads to apply
the patterns (filter_rules).
Structs§
- Filter
Rules - Cloud filter patterns as policy rules.
- Filter
Set - The verified filter packs in force, as one file the policy snapshot reads.
- Policy
State - What the last verified bundle established.
- Pull
Record - The last policy pull, and whether Cloud has shown it sends policy
nudges (
<data_dir>/cloud/policy/pulls.json).
Enums§
- Policy
Pull - What a policy pull did.
- Pulled
Via - What started a policy pull.
Constants§
- CLOUD_
MAX_ RULES - Cloud filter rules have their own budget, apart from the user’s policy rules; a bundle above it is refused rather than applied in part.
- FILTER_
SET_ SCHEMA
Functions§
- filter_
rules - Rules from the captured bytes of the filter set. Labels are unique
(
cloud:<label or id>, the first pack in id order wins) and every pattern compiled at installation within the policy limits. - filter_
set_ path <data_dir>/cloud/policy/filters/set.jsonof this installation.- installed_
filter_ rules - The filter rules of this installation, read now (for screening, which has no policy snapshot of its own).
- load_
bundle - The last verified bundle, as received.
- load_
filter_ set - The installed filter set of
data_dir, as text (what the policy snapshot reads), if there is one. - load_
pulls - load_
state - note_
nudges_ seen - Note that Cloud sends policy nudges (written once).
- note_
pull - Note a successful pull started by
via. - pull
- Pull, verify and keep the policy bundle.
- required_
packs_ installed - The policy runtime’s check for an org policy
artifactit still holds from before Cloud-Protocol 2.1 (verified there, not here): for every filter pack its signed statement requires, the installedsetmust hold statement bytes whose SHA-256 is the signed digest, and the pack it applies must be exactly the one those bytes decode to. A set whose patterns, bytes or listing were changed or removed by hand is refused like any other tampering. - verify_
bundle - Verify a whole bundle against the key set, and against the last accepted state (filter pack versions only move forward). Returns the state it establishes and the verified filter packs. The bundle’s TOML org policy fields are not read.