Files
nexus/wiki/concepts/IAM-角色.md
2026-04-19 14:51:38 +08:00

40 lines
1.2 KiB
Markdown
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
---
title: "IAM 角色"
type: concept
tags: [AWS, IAM, Identity]
date: 2026-04-19
---
## Definition
IAM 角色是 AWS IAM 中的身份,可以被其他实体 assum 以获取临时安全凭证。
## Core Concept
> "Roles don't enable actions; they tie together who can do something and what they can do."
角色本身不执行操作,而是将"谁可以做什么"关联在一起。
## Characteristics
- 临时凭证(通过 AssumeRole API 获取)
- 可被服务AWS Service Role或用户 assum
- 包含信任策略和权限策略
- 无持久化登录凭证
## Use Cases
- 授予服务访问 AWS 资源的权限(如 EC2 实例角色)
- 授予用户跨账号访问权限
- 联合访问映射AD 组 → IAM 角色 → 权限)
## Types
- **服务角色**:供 AWS 服务使用
- **跨账号角色**:跨 AWS 账号授权
- **联合角色**:外部身份提供商映射的角色
## Related Concepts
- [[IAM-策略]]: 定义角色可执行的操作
- [[信任策略]]: 定义谁可以 assum 角色
- [[联合访问]]: AD 组映射到 IAM 角色的工作流
- [[最小权限原则]]: 策略设计原则
## Connections
- [[IAM-角色]] ← contains ← [[IAM-策略]]
- [[IAM-角色]] ← defined_by ← [[信任策略]]