Under enforcement a REST route no vendored model names runs unchecked, and DLM was among them: any caller could
create, read, update or delete a lifecycle policy and read or change its tags with no permission at all. DLM's model is
vendored now (regen_rest_routes.MODELS: dlm), so each request is checked as its operation's action, and dlm joins the
generated tables of request resources, passed roles and tags on create: the tag routes on the policy their path's ARN
names, the role CreateLifecyclePolicy and UpdateLifecyclePolicy pass in ExecutionRoleArn, and the tags a create
carries, which need dlm:TagResource.
The routes naming a policy by its PolicyId (GetLifecyclePolicy, UpdateLifecyclePolicy, DeleteLifecyclePolicy) are
checked on *, as the generated table reads them: a policy's ARN is policy/${ResourceName}, a name variable, which the
rule's compatible() keeps an id member from filling. CreateLifecyclePolicy's tags are checked on the policy the table
fills from DefaultPolicy, and on * when the request leaves it out.
DlmStoredResourceArns answers the tags DLM holds on the policy an ARN names, read in the ARN's account and Region by
the id it ends in without moving it and matched on the whole ARN, which an aws:ResourceTag condition reads. A namespace
the table reads is served on its tag routes only at the ARN its path encodes, so DlmIntegrationTest sends the ARN
encoded, as the SDKs do, and docs/services/dlm.md says so.
IamRestRouteEnforcementIntegrationTest checks that with no grant a policy's tags are refused, that a grant on one
policy's ARN reads them and refuses another's, that a deny on one policy's ARN refuses it and leaves another, that an
aws:ResourceTag condition reads a policy's tags, that GetLifecyclePolicy is checked on *, and that a create needs
iam:PassRole on its execution role and dlm:TagResource for the tags it carries.