You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
ec2,iam: the second ec2:CreateTags authorization pass for a resource-creating action that carries tags #691
Scoped out of #674. When a resource-creating action carries a TagSpecification, real AWS performs a second authorization pass for ec2:CreateTags, distinguished from a direct tagging call by the ec2:CreateAction condition key — which is how AWS's own documented "may create a resource only if it is tagged" policies are written:
Substrate models neither the second pass nor the condition key, so such a policy has no effect: a RunInstances carrying tags is authorized once, as ec2:RunInstances. A consumer who copies AWS's documented policy gets a false allow on the tagging half.
ec2:CreateAction would be substrate's second ec2:-prefixed condition key, after the one #673's follow-up adds.
Acceptance criteria
Exactly which actions trigger the second pass is verified against the API reference (and the SAR's CreateAction rows), not assumed.
A tagged resource-creating call is decided twice, and a denial on the tagging pass names ec2:CreateTags in its message so a caller can tell the two apart.
ec2:CreateAction is populated with the creating operation's name and evaluated by the existing condition machinery.
AWS's documented policy above is reproduced as a test: the call is allowed when tagged and denied when not.
Activity
fix(ec2,iam): a tagged create is authorized twice, against ec2:Create…