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 authz: the ID resolver runs for operations AWS says have no resource-level permissions #762
buildResourceARNs' EC2 arm resolves an operation's InstanceId.N, GroupId.N, RouteTableId.N and InternetGatewayId.N into per-resource ARNs, for every operation that
carries one of those parameters. #730 established that for a single ID and #744 extended it to
every ID a request names. Neither decided whether the resolution should happen for operations
AWS says do not support resource-level permissions.
It should not, for those operations. AWS's Example policies to control access to the Amazon EC2
API states that ec2:DescribeInstances does not support resource-level permissions, so a real
request's resource is * and a policy scoping ec2:DescribeInstances to an instance ARN grants
nothing on AWS. Substrate resolves the IDs, so the same policy grants exactly those instances
here — a false allow in the policy author's favour, and the opposite of the deny-side
divergence that usually shows up first. A consumer who tests a scoped describe policy against
substrate learns it works, and it does not.
The four parameters are read by more than the describes, so the fix is not "skip describes":
it is a per-operation statement of which EC2 operations support resource-level permissions,
which is a table AWS publishes per action in the Service Authorization Reference. That is the
work, and it is a decision about #730's resolver rather than about #744's expansion of it —
which is why it was carved out of both.
Acceptance criteria
An EC2 operation AWS documents as not supporting resource-level permissions is authorized
against *, so a policy scoping it to an ARN grants nothing — as on AWS.
Activity
fix(ec2,iam): authorize every ID an EC2 request names (#744) (#763)
feat(authz): vendor AWS's per-operation authorization data, generated…
fix(ec2): the operation decides whether a request has a resource (#799)