Post-compile checks on every macaroon in the ash_vault section:
prefixis 2-32 characters of[a-z][a-z0-9]*(no_: it separates the prefix from the payload) and unique among the resource's macaroonsidentitynames the single primary key attribute or a one-key identity — so it is unique — of a type a token can carry (string, ci_string, UUID, integer)- the scope is resolvable from a token:
:global, or:tenanton a resource with multitenancy. A customAshVault.Scopecannot be inverted from a token's scope back to a tenant, so it is refused - the vault (a plain module) exports
mac_at!/3andmac_key_version!/1, and its key provider serves the:macpurpose - warns when a macaroon declares
phase: :authorizecaveats and none of the resource's own policies referenceAshVault.Checks.MacaroonAllows(unless the macaroon setsrequire_authorize_enforcement? true) - the resource has a primary read action, which the mint action loads through
- every caveat has a type with a stable encoding (
AshVault.Macaroon.CaveatCodec), a name other than the reserved:expires_at, and a check module that is compiled and exportscheck/3