概念 · 基于 CLF-C02
Least privilege in practice
Start with enough access to work, then tighten with real activity and IAM Access Analyzer.
本课尚未翻译,暂以英文显示。
你在云从业者中已学过
- Grant only the permissions a task needs, and nothing more.
- Last accessed information shows which services an identity really uses.
- IAM Access Analyzer can generate a policy from past activity.
- 1The workload runs with a broad starter policy.
- 2CloudTrail records every call the role makes.
- 3Access Analyzer turns that activity into a policy that you attach in place of the broad one.
分步说明
- 1The workload runs with a broad starter policy.
- 2CloudTrail records every call the role makes.
- 3Access Analyzer turns that activity into a policy that you attach in place of the broad one.
Tighten a policy with real activity.
External access
- Who outside my account can reach this resource?
Unused access
- Which roles and permissions are never used?
Policy validation
- Is this policy valid and safe?
Policy generation
- What did this role really call?
| Access Analyzer feature | It answers |
|---|---|
| External access | Who outside my account can reach this resource? |
| Unused access | Which roles and permissions are never used? |
| Policy validation | Is this policy valid and safe? |
| Policy generation | What did this role really call? |
是什么
Perfect least privilege on day one is hard, because you do not yet know what the workload calls. A practical path is to start with a broader policy in a test account, let the workload run, and then replace the policy with one that matches what it used.
IAM Access Analyzer supports this. It reads AWS CloudTrail activity and generates a policy for a role. It also reports findings for resources that outside principals can reach, such as an S3 bucket shared with another account. Policy validation checks a draft against the policy grammar and best practices.
是什么
Customer managed policies are reusable, versioned and easy to audit. Inline policies belong to one identity and suit a strict one-to-one link. AWS managed policies are a start, not an end.
要记住
- External access findings show resources open to principals outside your account or organization.
- Policy generation builds a policy from CloudTrail activity.
- Policy validation catches mistakes before you attach a policy.
- Unused access findings show roles, users and permissions nobody uses.
要记住
- Last accessed data shows the services and actions an identity used.
- Prefer customer managed policies for reuse. Use inline policies only for a strict one-to-one link.
考试中
- “Find S3 buckets shared with outside accounts” points to IAM Access Analyzer.
- “Replace a broad policy with one that matches what the role really used” points to Access Analyzer policy generation.
- “Remove permissions that nobody uses” points to last accessed data or unused access findings.
别和这些弄混
- Policy evaluation and conditionsThe order AWS checks policies in, and the condition keys that narrow an Allow.
AWS CloudTrailEvent types, organization trails, tamper-proof logs and CloudTrail Lake.
AWS ConfigRules, conformance packs, automatic remediation and multi-account views, and how Config differs from CloudTrail and CloudWatch.
本任务内容 · 1.1
- Shared responsibility model
- Root user and MFA
- Users, groups and roles: authorization model
- Policy evaluation and conditions
- Least privilege in practice
- STS, role switching and cross-account access
- Resource-based policies
- Service control policies
Organizations
Control Tower
IAM Identity Center
- Federating identities into IAM
Directory Service
RAM
- Regions and AZs as the HA building block
- Placing resources