Dhanzz1/azure-entra-zero-trust-landing-zone
GitHub: Dhanzz1/azure-entra-zero-trust-landing-zone
基于 Terraform 的 Azure Entra 零信任落地参考实现,将身份安全控制代码化并提供完整的设计文档与架构决策记录。
Stars: 0 | Forks: 0
# Azure Entra Zero Trust Landing Zone
[](https://developer.hashicorp.com/terraform)  [](LICENSE) 
一个基于 **Terraform 驱动**的 Zero Trust 参考实现,涵盖 Microsoft Entra ID、Intune 和 Microsoft Defender。每一个身份和设备安全控制都被定义为代码、进行版本控制,并配有一份架构决策记录(ADR)来解释其背后的设计选择。
## 存在的原因
大多数身份相关工作是不可见的——在门户中点击设置的策略不会留下任何工件。本仓库让*设计思考*变得可见:每一个控制都被代码化,每一个权衡都被记录下来,并且架构与 Zero Trust 原则相对应。它是管理 Entra 与构建身份安全架构之间的桥梁。
## 架构概览
```
flowchart TD
user([User sign-in]) --> CA[02 Conditional Access]
IB[01 Identity baseline] --> CA
CA -->|identity risk| IDP[Entra ID Protection]
CA -->|device state| INT[03 Intune compliance]
DEF[06 Defender for Endpoint] --> INT
BG[Break-glass: excluded] -. emergency .-> CA
CA --> grant{Grant / Block}
grant --> apps([Cloud apps / M365])
PIM[09 PIM + break-glass] --> admin([Admin access])
SEN[07 Sentinel + KQL] -. monitors .-> CA
```
### 模块状态
| # | 模块 | 用途 | Zero Trust 支柱 | 状态 |
|---|--------|---------|-------------------|--------|
| 01 | identity-baseline | 租户加固、动态组、应急访问 | 身份 | ✅ 完成 |
| 02 | conditional-access | 作为可重用 Terraform 的 CA 策略框架 | 身份 | ✅ 完成 (CA004 仅报告) |
| 03 | device-compliance | Intune 合规性 + Defender 风险评分门控 | 设备 | 🗓 计划中 (阶段 2) |
| 04 | autopilot | Windows Autopilot 配置 | 设备 | 🗓 计划中 (阶段 2) |
| 05 | update-rings | 补丁环 (试点 / 广泛) | 设备 | 🗓 计划中 (阶段 2) |
| 06 | defender-endpoint | Defender for Endpoint 基线 + ASR | 威胁防护 | 🗓 计划中 (阶段 2) |
| 07 | sentinel-kql | Sentinel + KQL 检测 | 检测 | 🗓 计划中 (阶段 3) |
| 08 | cloud-lifecycle-automation | 纯云端 JML 演示(链接至 LOA 仓库) | 自动化 | 🗓 计划中 (阶段 3) |
| 09 | administrative-governance | 应急访问 + PIM | 身份 / 治理 | 🚧 进行中 (应急访问已完成;PIM 阶段 3) |
### Conditional Access 策略集(模块 02,已实现)
- 阻止传统身份验证
- 要求所有用户进行 MFA(排除应急访问)
- 阻止高风险登录(Entra ID Protection / P2)
- 通过 MFA + 安全密码更改来修正高风险用户(仅报告)
所有策略均由单个可重用的 Terraform 模块生成,并排除了专门的应急访问组。
## 仓库结构
```
.
├── terraform/ # the run-root — all live config; run terraform here
│ ├── providers.tf versions.tf variables.tf backend.tf
│ ├── break-glass.tf identity-baseline.tf conditional-access.tf
│ └── modules/conditional-access-policy/ # reusable CA policy module
├── 01-identity-baseline/ … 09-administrative-governance/ # per-area design docs
├── docs/ # architecture, threat model, ADRs, screenshots
└── README.md
```
## 自行部署
**前提条件:** Terraform ≥ 1.6,Azure CLI,一个演示 Entra 租户,以及 Entra ID P2(用于基于风险的 CA 和 PIM)。后续模块需要额外的 Intune/Defender 许可证——请参阅[假设](docs/assumptions-limitations.md)。
```
az login --tenant
cd terraform
terraform init
terraform plan
terraform apply
```
Conditional Access 要求首先**禁用** Security Defaults——有关安全执行顺序及确保其安全的应急访问设计,请参阅 [ADR-002](docs/adr/adr-002-break-glass-exclusion.md)。
## 设计文档
- [架构](docs/architecture.md)
- [威胁模型](docs/threat-model.md)
- [假设与限制](docs/assumptions-limitations.md)
- [架构决策记录](docs/adr/)
- [证据 / 截图](docs/screenshots.md)
## 安全与脱敏
本仓库**不含任何机密、租户标识符或状态**。Terraform 状态和 `*.tfvars` 已被 gitignore。截图已作脱敏处理(租户/订阅 ID 已裁剪或模糊处理)。在一个一次性的开发者租户中构建和测试。
## 许可证
MIT — 请参阅 [LICENSE](LICENSE)。
标签:Azure, ECS, JSONLines, Terraform, 基线加固, 身份与访问管理, 零信任