Replies: 1 comment
-
|
Thanks for reaching out. I was able to verify and reproduce the issue. We added this to the backlog to work on it. |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Summary
iam.SimulatePrincipalPolicyreturnsimplicitDenyfor actions that should beallowedwhen the policy condition usesecs:ResourceTag/*context keys supplied viaContextEntries. The same policies enforce correctly when using LocalStack's IAM enforcement mode (ENFORCE_IAM=1) at runtime.Environment
compose.ci.yml(Docker executor)ENFORCE_IAM=1is not set for simulation tests (using thesimulate_principal_policyAPI directly)Reproduction
Case 1: ABAC policy with
${aws:PrincipalTag/username}{ "Version": "2012-10-17", "Statement": [{ "Sid": "ExecuteCommandOnOwnedTasks", "Effect": "Allow", "Action": ["ecs:ExecuteCommand"], "Resource": "*", "Condition": { "StringEquals": { "ecs:ResourceTag/username": "${aws:PrincipalTag/username}" } } }] }Case 2: Reaper policy with
ForAnyValue:StringLikeon deadline tag{ "Sid": "StopExpiredTasks", "Effect": "Allow", "Action": "ecs:StopTask", "Resource": "arn:aws:ecs:us-east-1:123456789012:task/test-cluster/*", "Condition": { "ForAnyValue:StringLike": { "ecs:ResourceTag/deadline": "*" } } }Expected Behavior
When
ContextEntriessuppliesecs:ResourceTag/<key>values,simulate_principal_policyshould evaluateecs:ResourceTag/*conditions against those values, the same way it handlesaws:PrincipalTag/*and other global condition keys. Real AWS IAM Policy Simulator handles this correctly.Impact
This prevents testing ABAC policies that use
ecs:ResourceTag/*conditions — a common pattern for ECS task isolation and timeout enforcement — viasimulate_principal_policy. We are forced to skip these simulation-based tests and fall back to structural (policy document) tests only.See: openshift-online/rosa-boundary#27
Related
Beta Was this translation helpful? Give feedback.
All reactions