implementing-aws-iam-permission-boundaries
Skill này làm gì
Công cụ này giúp thiết lập giới hạn quyền trong AWS. Nó cho phép bạn đặt trần quyền mà một người dùng hoặc vai trò có thể có, để họ không bao giờ có nhiều quyền hơn mức cần thiết, ngay cả khi một chính sách chung cấp toàn quyền.
Khi nào nên dùng
- ✓Khi giao cho lập trình viên việc tạo vai trò và chính sách.
- ✓Khi muốn đảm bảo lập trình viên không nhận quá nhiều quyền.
- ✓Khi xây dựng hoặc cải thiện bảo mật tài khoản AWS của bạn.
Liên kết skill
https://github.com/mukul975/Anthropic-Cybersecurity-Skills/blob/main/skills/implementing-aws-iam-permission-boundaries/SKILL.mdSao chép rồi dán vào AI của bạn (Claude, ChatGPT hoặc Cursor) và nhờ nó làm theo hướng dẫn.
Cách dùng
Cách dễ nhất: sao chép tin nhắn và dán vào AI của bạn. AI sẽ đọc skill và làm theo hướng dẫn.
Tin nhắn có sẵn để dán
Dành cho Claude Code, Codex hoặc Cursor: chạy lệnh trong thư mục dự án của bạn và skill sẽ được cài đặt.
Tải tệp SKILL.md về và thả vào thư mục skill của agent.
Ví dụ cách nhờ AI
“Thiết lập permission boundary để lập trình viên có thể tạo vai trò cho ứng dụng nhưng không có quyền quản trị đầy đủ.”
5 skill mới mỗi tuần. Đọc chỉ 1 phút.
Cách hoạt động
Bạn định nghĩa một chính sách “boundary” xác định quyền tối đa được phép. Sau đó, bạn gắn chính sách này vào người dùng hoặc vai trò. Quyền thực tế sẽ là phần giao nhau giữa những gì chính sách của người dùng/vai trò cho phép và những gì boundary cho phép.
Nội dung kỹ thuật (SKILL.md gốc)
Lấy nguyên văn từ GitHub, do tác giả viết bằng tiếng Anh.
Implementing AWS IAM Permission Boundaries
Overview
IAM permission boundaries are an advanced AWS feature that sets the maximum permissions an identity-based policy can grant to an IAM entity (user or role). They enable centralized security teams to safely delegate IAM role and policy creation to application developers without risking privilege escalation. The effective permissions of an entity are the intersection of its identity-based policies and its permission boundary -- even if an identity policy grants AdministratorAccess, the permission boundary restricts it to only the allowed actions.
When to Use
- When deploying or configuring implementing aws iam permission boundaries capabilities in your environment
- When establishing security controls aligned to compliance requirements
- When building or improving security architecture for this domain
- When conducting security assessments that require this implementation
Prerequisites
- AWS account with IAM administrative access
- Understanding of AWS IAM policy language (JSON)
- AWS CLI v2 configured with appropriate credentials
- Terraform or CloudFormation for infrastructure-as-code deployment
Core Concepts
How Permission Boundaries Work
Identity-Based Policy Permission Boundary
(What the role CAN do) ∩ (What the role MAY do)
│ │
└──────────┬───────────────────┘
│
Effective Permissions
(Only actions in BOTH policies)
Policy Evaluation Logic
AWS evaluates permissions in this order:
- Explicit Deny in any policy - always wins
- Organizations SCP - sets org-wide maximum
- Permission Boundary - sets entity-level maximum
- Identity-Based Policy - grants actual permissions
- Resource-Based Policy - cross-account access (evaluated separately)
The entity can only perform an action if ALL applicable policy types allow it.
Key Use Cases
| Use Case | Description |
|---|---|
| Developer Delegation | Allow devs to create IAM roles without escalating beyond their boundary |
| Sandbox Isolation | Limit what roles can do in sandbox/dev accounts |
| Multi-Tenant Workloads | Ensure tenant-specific roles cannot access other tenants' resources |
| CI/CD Pipeline Roles | Restrict automation roles to specific services |
Workflow
Step 1: Define the Permission Boundary Policy
Create a managed policy that defines the maximum allowed permissions:
{
"Version": "2012-10-17",
"Statement": [
{
"Sid": "AllowedServices",
"Effect": "Allow",
"Action": [
"s3:*",
"dynamodb:*",
"lambda:*",
"logs:*",
"cloudwatch:*",
"sqs:*",
"sns:*",
"events:*",
"states:*",
"xray:*",
"ec2:Describe*",
"ec2:CreateTags",
"sts:AssumeRole",
"kms:Decrypt",
"kms:GenerateDataKey",
"kms:DescribeKey",
"secretsmanager:GetSecretValue"
],
"Resource": "*"
},
{
"Sid": "AllowIAMPassRole",
"Effect": "Allow",
"Action": "iam:PassRole",
"Resource": "arn:aws:iam::*:role/app-*",
"Condition": {
"StringEquals": {
"iam:PassedToService": [
"lambda.amazonaws.com",
"states.amazonaws.com"
]
}
}
},
{
"Sid": "DenyBoundaryDeletion",
"Effect": "Deny",
"Action": [
"iam:DeletePolicy",
"iam:DeletePolicyVersion",
"iam:CreatePolicyVersion"
],
"Resource": "arn:aws:iam::*:policy/DeveloperBoundary"
},
{
"Sid": "DenyBoundaryRemoval",
"Effect": "Deny",
"Action": [
"iam:DeleteUserPermissionsBoundary",
"iam:DeleteRolePermissionsBoundary"
],
"Resource": "*"
}
]
}
Step 2: Create the Developer Delegation Policy
Grant developers the ability to create IAM roles, but only with the boundary attached:
{
"Version": "2012-10-17",
"Statement": [
{
…
Câu hỏi thường gặp
Permission Boundaries là gì?
Đây là tính năng nâng cao của AWS, hoạt động như giới hạn tối đa cho quyền của người dùng hoặc vai trò, đảm bảo quyền được cấp không vượt quá mức đã định.
Vì sao dùng Permission Boundaries?
Nó cho phép nhóm bảo mật giao việc tạo quyền một cách an toàn cho lập trình viên, đảm bảo họ tuân theo nguyên tắc “least privilege” và không vô tình cấp quyền quá mức.
Quyền được tính toán như thế nào với Permission Boundary?
Quyền hiệu lực là phần giao nhau giữa các chính sách cấp quyền trực tiếp và chính sách boundary. Nếu một chính sách cấp quyền quản trị nhưng boundary không cho phép, quyền truy cập sẽ bị từ chối.
Chi tiết
Mô tả gốc của tác giả
Configures AWS IAM permission boundaries that cap the maximum permissions an identity-based policy can grant to a user or role, so effective permissions are the intersection of the identity policy and the boundary even if the policy grants AdministratorAccess. Use when letting security teams delegate IAM role and policy creation to developers for self-service while enforcing least-privilege ceilin
Độ phổ biến
- Sao GitHub
- 35k
- Vị trí xếp hạng
- #7998
- Giấy phép
- Apache-2.0
- Cập nhật
- 31/8/2026
Bình luận
- …
Thêm skill từ kho mã này
abusing-dpapi-for-credential-access
35kCung cấp cho agent AI của bạn hướng dẫn có sẵn cho một tác vụ cụ thể, giúp nó làm việc tốt hơn và nhanh hơn.
abusing-shadow-credentials-for-privesc
35kDạy agent AI của bạn viết văn bản rõ ràng và có cấu trúc tốt.
achieving-cmmc-level-2-compliance
35kGiúp agent của bạn chuẩn bị môi trường để tuân thủ CMMC Level 2. Triển khai các yêu cầu bảo mật và quản lý tài liệu cần thiết.
acquiring-disk-image-with-dd-and-dcfldd
35kGiúp agent của bạn tạo bản sao chính xác của ổ đĩa. Cách này đảm bảo không mất hay thay đổi thông tin trong quá trình điều tra.
Skill tương tự
openclaw-update
394kGiúp agent của bạn cập nhật OpenClaw Gateway đang có, chọn cách cập nhật phù hợp với cách cài đặt và giữ phiên làm việc của bạn hoạt động.
diagnose-gateway
394kGiúp agent của bạn tìm hiểu vì sao OpenClaw Gateway bị lỗi bằng cách kiểm tra cài đặt, kênh và cổng mà không thay đổi gì.
crabbox-apps
394kGiúp agent của bạn mở và chạy một app trên máy đám mây tạm thời, rồi hiển thị giao diện của nó trong thanh bên của chat.