Expand description
Strict validator for BIND9 address_match_list entries used in
allow-query, allow-transfer, and related ACL directives.
CRD-supplied values flow directly into named.conf. Without validation a
malicious or compromised CRD author could close the enclosing { … } block
and append arbitrary BIND9 directives. This module implements a strict
whitelist of the address-match-list forms bindy supports, rejecting
anything else with a structured error that reconcilers propagate to the
resource status.
Accepted forms (optionally prefixed with ! for negation):
- keywords:
any,none,localhost,localnets - IPv4 address with optional
/prefix(0..=32) - IPv6 address with optional
/prefix(0..=128) key <name>where<name>matches[A-Za-z0-9._-]{1,253}
Enums§
Constants§
- MAX_
ACL_ ENTRY_ LEN - Maximum accepted length of a single ACL entry, in bytes. Any reasonable address-match token is well under this; the cap is defensive against pathologically large CRD inputs.
Functions§
- build_
acl_ list - Validate each entry in
entriesand return the;-joined payload that goes between the{ }of anallow-query/allow-transferblock. - validate_
acl_ entry - Validate a single
address_match_listentry.