概念 · 基于 CLF-C02
Users, groups and roles: authorization model
Pick the identity by who needs access, and cap what administrators can hand out.
本课尚未翻译,暂以英文显示。
你在云从业者中已学过
- An IAM user is one person or application with long-term credentials.
- A group gives the same policies to many users. Groups cannot be nested.
- A role has no password or keys. It hands out temporary credentials.
- AWS recommends roles and federation for people and applications.
An employee, many accounts
An application on EC2
- Role with an instance profile
A Lambda function
- Execution role
A person in another AWS account
- Cross-account role
A customer of your app
A tool that cannot use roles
- IAM user with MFA
| Who needs access | Use |
|---|---|
| An employee, many accounts | |
| An application on EC2 | Role with an instance profile |
| A Lambda function | Execution role |
| A person in another AWS account | Cross-account role |
| A customer of your app | |
| A tool that cannot use roles | IAM user with MFA |
1 / 2
An employee, many accounts
An application on EC2
- Role with an instance profile
A Lambda function
- Execution role
A person in another AWS account
- Cross-account role
| Who needs access | Use |
|---|---|
| An employee, many accounts | |
| An application on EC2 | Role with an instance profile |
| A Lambda function | Execution role |
| A person in another AWS account | Cross-account role |
S3 and EC2
- Boundary allows
- S3 only
- Result
- S3 only
S3
- Boundary allows
- EC2 only
- Result
- Nothing
Nothing
- Boundary allows
- Everything
- Result
- Nothing
| Identity policy allows | Boundary allows | Result |
|---|---|---|
| S3 and EC2 | S3 only | S3 only |
| S3 | EC2 only | Nothing |
| Nothing | Everything | Nothing |
是什么
Roles cover three jobs. A service role lets a service act for you, such as a Lambda execution role. An instance profile is the container that passes a role to an EC2 instance. A cross-account role lets a trusted principal from another account in. In all three, no one stores a key.
A permissions boundary is a managed policy set as the maximum for a user or role. The identity gets only what its own policies and the boundary both allow. A boundary never grants anything. Use it to let developers create roles without letting them create more power than they have.
是什么
Role-based access control (RBAC) writes one policy per job. Attribute-based access control (ABAC) compares tags on the person with tags on the resource, such as project. With ABAC, new projects need no new policies.
要记住
- No users at all for the workforce: use IAM Identity Center or federation.
- Keep IAM users only for tools that cannot use roles and for break-glass access.
- An instance profile connects an IAM role to an EC2 instance.
- A permissions boundary limits, it does not grant.
要记住
- ABAC: match aws:PrincipalTag with the resource tag. It scales with fewer policies.
- A group holds IAM users in one account. A permission set creates roles across many accounts.
考试中
- “An application on EC2 needs to read S3 without stored keys” points to an IAM role through an instance profile.
- “Developers may create roles but never exceed their own permissions” points to a permissions boundary.
- “Reduce the number of policies as projects grow” points to ABAC with tags.
别和这些弄混
AWS IAM Identity CenterWorkforce sign-in for all accounts: one identity source, permission sets, and no IAM users.
- STS, role switching and cross-account accessAWS STS hands out temporary credentials when a trusted identity assumes a role.
- Federating identities into IAMMatch the sign-in source to the right federation path: staff, app users or Active Directory users.
本任务内容 · 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