Skip to main content

Module policy

Module policy 

Source
Expand description

Filter packs.

GET /v1/policy/bundle (If-None-Match) → PolicyBundleV1 or 304.

Filter packs carry their statement as base64 bytes, signed by a Cloud key under FILTER_PACK_SIGNATURE_DOMAIN.

Structs§

FilterPackRefV1
One filter pack the org enabled.
FilterPackV1
The signed statement of a filter pack (the bytes behind statement_b64). Unknown top-level fields are tolerated; patterns are strict.
FilterPatternV1
One pattern of a filter pack. Unknown fields or values refuse the pack.
PolicyBundleV1
Response of GET /v1/policy/bundle.
RequiredFilterPackV1
A filter pack a TOML org policy statement required: field order is the signed byte order. Cloud-Protocol 2.1 sends no org policy; the engine’s policy runtime still reads it from a policy it kept from before.
SignedStatementV1
A statement and its signature.

Enums§

FilterActionV1
What a matching pattern does.

Constants§

FILTER_PACK_SCHEMA
MAX_FILTER_LABEL_BYTES
Longest pattern id and label (cloud:<id> must fit a 64-byte rule label).
MAX_FILTER_PACKS
MAX_FILTER_PACK_STATEMENT_B64
Largest encoded filter-pack statement.
MAX_FILTER_PATTERNS
MAX_FILTER_PATTERN_CHARS
MAX_FILTER_PATTERN_COMPILED_BYTES
Compiled-size limit of one pattern (regex size_limit and dfa_size_limit).
MAX_POLICY_BUNDLE_BYTES
Largest policy-bundle response (a full 1 MiB pack plus envelopes).
POLICY_BUNDLE_SCHEMA

Functions§

filter_pack_signing_input
domain || statement: what a filter-pack signature covers.
validate_required_filter_packs
At most MAX_FILTER_PACKS, ids strictly ascending (one encoding per set), versions from 1, digests lowercase hex. The signed org policy v2 contract (ee/contracts/team-company) validates its required packs with it.