Multiple Require blocks and multiple Must statements combine with AND¶
Context and Problem Statement¶
A policy can have several Require blocks, and a Require (or Each) block can contain several Must statements. How are they combined?
Considered Options¶
- AND at both levels
- OR between
Requireblocks, AND inside each block - An explicit combinator keyword required everywhere
Decision Outcome¶
Chosen option: "AND at both levels", because a compliant resource must meet every stated requirement. That matches how people read a list of requirements.
Require A { m1; m2 }andRequire B { m3 }mean compliant =m1 AND m2 AND m3.- After inversion (ADR-0002), the violation is
anyOf[NOT m1, NOT m2, NOT m3], flattened into a singleanyOf. - The same rule applies to
Muststatements insideEach. - An alternative such as "A or B is acceptable" is written with an
AnyOf { }group inside theRequireorEachblock (ADR-0026). AND stays the default everywhere, soAllOf { }is only needed insideAnyOf.
Consequences¶
- Good, because the semantics are simple and predictable.
- Good, because each
Requiredescription gives a named, documented reason for compliance. - Neutral, because "either/or" requirements need an explicit
AnyOfgroup.
Confirmation¶
Golden test: multiple Require blocks with multiple Must statements in one block.