✨ feat(infra): add namespace-scoped IAM policies with PrincipalTag conditions (#370)#387
Merged
Conversation
…nditions (#370) Add 3 static namespace-scoped IAM managed policies (ns-acq, ns-full, ns-read) that use ${aws:PrincipalTag/zael_namespace_id} in dynamodb:LeadingKeys conditions for tag-based access control. - ns-acq: UpdateItem on namespace prefix, read-only on _/* (two statements) - ns-full: full CRUD on both namespace and _/* prefixes - ns-read: read-only on both namespace and _/* prefixes - 3 new CFN parameters, conditions, and stack outputs - Wire namespace policy names through StackOptions.to_parameters() - Tighten policy_name_format max length from 122 to 120 (ns-full = 7 chars) - Add 11 unit tests for policy actions, LeadingKeys, and outputs Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #387 +/- ##
=======================================
Coverage 91.86% 91.87%
=======================================
Files 33 33
Lines 7426 7435 +9
=======================================
+ Hits 6822 6831 +9
Misses 604 604
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. |
Add documentation for namespace-scoped IAM policies including single namespace setup, admin/cross-namespace access, and selective multi-namespace access via STS session policies or custom IAM policies. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
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
ns-acq,ns-full,ns-read) that use${aws:PrincipalTag/zael_namespace_id}indynamodb:LeadingKeysconditions for tag-based access controlns-acq: UpdateItem on namespace prefix, read-only on_/*(two statements);ns-full: full CRUD on both namespace and_/*prefixes;ns-read: read-only on both prefixesStackOptions.to_parameters()policy_name_formatmax length from 122 to 120 (longest component isns-fullat 7 chars)Test plan
StackOptionsmodel changes (policy_name_format length)Closes #370
🤖 Generated with Claude Code