[Feature Request] Support configuring a custom IAM permissions boundary for generated roles
Chưa có ai nhận issue này.
Đánh giá
- Độ khó
- 4/5
- Thời gian dự kiến
- 3-5 ngày
- Mức phù hợp với người mới
- 52/100
- Loại issue
- Tính năng
- Độ rõ ràng
- Đặc tả rõ ràng
- Mức độ hoạt động
- Sôi nổi
- Công nghệ
- aws, typescript
- Lĩnh vực
- cloud, infrastructure
Hướng nghiên cứu
Bắt đầu bằng cách lần theo entry point bin/cdk.ts được tạo qua CLI template và luồng materialization của cdk/ được agentcore deploy sử dụng. Kiểm tra cách các role của harness và runtime được tổng hợp, sau đó xác minh rằng một boundary đã được cấu hình sẽ áp dụng cho mọi role được tạo hoặc được L3 tạo ra, mặc định không tồn tại và vẫn được duy trì sau khi tạo lại và deployment.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Mô tả
Description
Please add first-class support for attaching a custom IAM permissions boundary to every IAM role that AgentCore generates during agentcore deploy.
Many enterprise and partner AWS accounts enforce an organization-managed permissions boundary on all IAM principals. A common form of this guardrail is an explicit Deny on iam:CreateRole unless the new role attaches a specific policy as its own permissions boundary.
In such accounts, agentcore deploy fails at role creation. Example error when deploying a project with a single harness:
User: arn:aws:sts::<acct>:assumed-role/cdk-hnb659fds-cfn-exec-role-<acct>-<region>/AWSCloudFormation
is not authorized to perform: iam:CreateRole
on resource: arn:aws:iam::<acct>:role/<project>_<harness>
with an explicit deny in a permissions boundary: arn:aws:iam::<acct>:policy/<OrgBoundaryPolicy>
(Status Code: 403; HandlerErrorCode: UnauthorizedTaggingOperation)
The generated roles have no PermissionsBoundary property, so CloudFormation's iam:CreateRole call is denied and the whole stack rolls back. There is currently no supported configuration (CLI flag, aws-targets.json field, env var, or agentcore.json field) to inject a boundary.
I confirmed the root cause is the "must attach boundary on create" rule (creating a probe role with the boundary succeeds; without it 403s). I patched the generated bin/cdk.ts to apply an App-wide boundary via the CDK IAM aspect:
import * as iam from 'aws-cdk-lib/aws-iam';
iam.PermissionsBoundary.of(app).apply(
iam.ManagedPolicy.fromManagedPolicyArn(
app,
'OrgPermissionsBoundary',
'arn:aws:iam::<acct>:policy/<OrgBoundaryPolicy>'
)
);
This makes the deploy succeed (stack reaches CREATE_COMPLETE), but it is not viable long-term because agentcore deploy re-materializes the cdk/ directory from CLI templates and overwrites the patch. I must deploy via raw cdk deploy instead, which leaves AgentCore's local state (.cli/deployed-state.json) out of sync.
Acceptance Criteria
- When configured, every generated IAM role (harness/runtime execution roles, and any L3-created roles) is synthesized with the specified
PermissionsBoundary. - Works through the standard
agentcore deployflow with no manual edits to generatedcdk/files. - Survives
cdk/regeneration/materialization. - No boundary is applied when the setting is absent (backward compatible).
Additional Context
@aws/agentcoreCLI:0.28.1- CDK (bundled):
2.1126.0 - Node.js:
22.x - Deploy target: single-harness project,
PYTHONruntime, region<region>
- Ngôn ngữ chính
- TypeScript
- Star
- 291
- Fork
- 96
- Merge trung bình
- 20 giờ 50 phút
- Pull request đã merge (30 ngày)
- 214
Hướng dẫn đóng góp
Bắt đầu từ đâu
- Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
- Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
- Fork repository và làm thay đổi trên một nhánh.
- Mở pull request có tham chiếu số hiệu của issue.
Issue khác của aws/agentcore-cli
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 70/100
aws/agentcore-cli#2395 ·
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 75/100
aws/agentcore-cli#2392 ·
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 76/100
aws/agentcore-cli#2267 ·
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 72/100
aws/agentcore-cli#2258 ·
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 72/100
aws/agentcore-cli#2176 ·
Tất cả issue của aws/agentcore-cli
Issue tương tự
-
Độ khó 1/5 1-3 giờ Mức phù hợp với người mới 88/100
motiondivision/motion#3849 ·
-
Add: S Play Event HD Đang mởcheck:passed streams:add
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 72/100
-
Improvement for contact popover Đang mở
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 68/100
-
LiteLLM proxy response_cost (x-litellm-response-cost) is never applied to ChatModelOutput.cost Đang mởbug
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 84/100
i-am-bee/beeai-framework#1697 · 1 reaction ·
-
Support bun dedupe Đang mởenhancement
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 75/100
antfu/node-modules-inspector#214 ·