Restructure team IAM to tag-based isolation model#93
Merged
Conversation
Replace hardcoded service action lists with pure tag-based ABAC: - AllowAll: unrestricted allow (deny policies are the real gates) - DenyCrossTeamAccess: blocks any action on resources where aws:ResourceTag/team exists and isn't the team's or "shared". Creates pass through (no tags on new resources). - DenyMutateSharedInfra: protects shared resources from deletion/modification while allowing child creation (listener rules, ECS services get team's tag, not parent's "shared" tag). Tag shared platform resources with team=shared: - VPC, subnets, ECS tasks SG (networking) - ALB, HTTPS listener (ingress) - ECS cluster (compute) - SNS alert topics (monitoring) - ECS execution role (iam) Resources tagged team=platform remain inaccessible to teams. New shared resources just need team=shared to be automatically usable.
Terraform Plan🚧 Changes detected — Plan: 0 to add, 14 to change, 0 to destroy. Plan outputLLM ReviewRisk: 🟢 LOW Routine tag updates changing team ownership from 'javabin' to 'shared' across 14 infrastructure resources with no destructive or security-impacting changes.
|
Alexanderamiri
added a commit
that referenced
this pull request
May 9, 2026
## Summary Replace hardcoded service action lists with pure tag-based ABAC. Three statements handle all isolation: | Statement | What it does | |-----------|-------------| | `AllowAll` | Unrestricted allow — deny policies are the gates | | `DenyCrossTeamAccess` | Blocks any action where `aws:ResourceTag/team` exists and isn't the team's or `"shared"` | | `DenyMutateSharedInfra` | Blocks Delete*/Modify* on `team=shared` resources | ### Tag model - `team=shared` → any team can use (read + create children), but not delete/modify - `team=teamX` → only that team can access - `team=platform` → no team can access - No tag → deny doesn't fire (new resources during create) ### Shared resources tagged VPC, subnets, ECS tasks SG, ALB, HTTPS listener, ECS cluster, SNS topics, ECS execution role. ### Cross-team isolation Teams **cannot** touch each other's resources — the deny fires when `aws:ResourceTag/team` doesn't match. Teams also **cannot** delete/modify shared infra (ALB, cluster, zone) — only create children (listener rules, ECS services, DNS records) which get the team's own tag. ## Test plan - [ ] Merge and wait for apply (tag changes are safe — just adds/changes tags) - [ ] Re-run test app CI — should pass plan and apply end-to-end
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Replace hardcoded service action lists with pure tag-based ABAC. Three statements handle all isolation:
AllowAllDenyCrossTeamAccessaws:ResourceTag/teamexists and isn't the team's or"shared"DenyMutateSharedInfrateam=sharedresourcesTag model
team=shared→ any team can use (read + create children), but not delete/modifyteam=teamX→ only that team can accessteam=platform→ no team can accessShared resources tagged
VPC, subnets, ECS tasks SG, ALB, HTTPS listener, ECS cluster, SNS topics, ECS execution role.
Cross-team isolation
Teams cannot touch each other's resources — the deny fires when
aws:ResourceTag/teamdoesn't match. Teams also cannot delete/modify shared infra (ALB, cluster, zone) — only create children (listener rules, ECS services, DNS records) which get the team's own tag.Test plan