zitadel/zitadel
GitHub: zitadel/zitadel
开源的企业级身份与访问管理平台,提供 SSO、MFA、多租户等开箱即用的 IAM 能力,API 优先设计便于开发者集成。
Stars: 13241 | Forks: 975
## 面向开发者的身份基础设施
**ZITADEL** 是一个开源的身份和访问管理平台,专为需要超越基础认证的团队而构建。无论您是在保护 SaaS 产品、构建 B2B 平台,还是自托管生产级 IAM 堆栈——ZITADEL 都能开箱即用地为您提供一切:SSO、MFA、Passkeys、OIDC、SAML、SCIM 以及久经考验的多租户模型。
无供应商锁定。不牺牲控制权。只是一个您可以拥有的、健壮的、API 优先的身份平台。
**[🏡 官网](https://zitadel.com) | [💬 聊天](https://zitadel.com/chat) | [📋 文档](https://zitadel.com/docs/) | [🧑💻 博客](https://zitadel.com/blog) | [📞 联系方式](https://zitadel.com/contact/)**
## 为什么选择 ZITADEL
我们构建 ZITADEL 是为了应对规模化下最棘手的 IAM 挑战——从多租户开始。
| | ZITADEL | FusionAuth | Keycloak | Auth0/Okta |
|---|---|---|---|---|
| 开源 | ✅ | ❌ | ✅ | ❌ |
| 可自托管 | ✅ | ✅ | ✅ | ❌ |
| 基础设施级租户 | ✅ 实例 (高扩展性) | ✅ 租户 | 🟡 Realms (扩展限制) | ❌ (多租户 = 多账户) |
| B2B 组织 | ✅ 原生且无限制 | 🟡 通过实体管理 | ✅ (近期新增) | 🟡 (依赖套餐/账户) |
| 完整审计追踪 | ✅ 全面事件流* | 🟡 审计日志 | 🟡 审计日志 | 🟡 审计日志 |
| Passkeys (FIDO2) | ✅ | ✅ | ✅ | ✅ |
| [Actions / webhooks](https://zitadel.com/docs/concepts/features/actions_v2) | ✅ | ✅ | 🟡 通过 SPI | ✅ |
| API 优先 (gRPC + REST) | ✅ | 🟡 仅 REST | 🟡 仅 REST | 🟡 仅 REST |
| SaaS + 自托管功能对等 | ✅ | ✅ | ➖ 不适用 | ➖ 不适用 |
ZITADEL Cloud 和自托管 ZITADEL 运行相同的代码库。
**面向架构师的关键差异化优势:**
- **关系型核心,事件驱动灵魂** —— 每次变更都作为不可变事件写入,以提供完整的、可通过 API 访问的[审计追踪](https://zitadel.com/docs/concepts/features/audit-trail)。与仅记录部分活动的系统不同,ZITADEL 提供全面的事件流,可进行审计或通过 Webhooks 流式传输到外部系统。
- **严格的多租户层级** —— 身份系统 → 组织 → 项目,在多个层级具有隔离的数据和策略范围
- **API 优先设计** —— 每个资源和操作都可通过 [connectRPC、gRPC 和 HTTP/JSON APIs](https://zitadel.com/docs/apis/introduction) 使用
- **[零停机更新](https://zitadel.com/docs/concepts/architecture/solution#zero-downtime-updates)** 和[水平可扩展性](https://zitadel.com/docs/self-hosting/manage/updating_scaling),无需外部会话存储
## 3 分钟快速开始
👉 [快速入门指南](https://zitadel.com/docs/guides/start/quickstart)
### ZITADEL 自托管
```
# Docker Compose — 3 分钟内启动并运行
curl -LO https://raw.githubusercontent.com/zitadel/zitadel/main/deploy/compose/docker-compose.yml \
&& curl -LO https://raw.githubusercontent.com/zitadel/zitadel/main/deploy/compose/.env.example \
&& cp .env.example .env \
&& docker compose up -d --wait
```
完整部署指南:
- [Docker Compose](https://zitadel.com/docs/self-hosting/deploy/compose)
- [Kubernetes](https://zitadel.com/docs/self-hosting/deploy/kubernetes)
### ZITADEL Cloud (SaaS)
在 [zitadel.com](https://zitadel.com) 免费开始——无需信用卡。支持地区:US · EU · AU · CH。[按量付费定价](https://zitadel.com/pricing)。
## 通过 V2 API 集成
ZITADEL 通过类型化 API 暴露所有功能。以下是如何使用 V2 REST API 创建用户:
```
curl -X POST https://$ZITADEL_DOMAIN/v2/users/human \
-H "Authorization: Bearer $ACCESS_TOKEN" \
-H "Content-Type: application/json" \
-d '{
"username": "alice@example.com",
"profile": { "givenName": "Alice", "familyName": "Smith" },
"email": { "email": "alice@example.com", "sendCode": {} }
}'
```
浏览完整的 [API 参考](https://zitadel.com/docs/apis/introduction)——包括 connectRPC 和 gRPC 传输——或直接跳转到[快速入门示例](https://zitadel.com/docs/guides/start/quickstart)。
## 功能特性
**认证**
- 单点登录 (SSO) · 用户名/密码 · [Passkeys (FIDO2 / WebAuthn)](https://zitadel.com/docs/concepts/features/passkeys)
- MFA: OTP, U2F, OTP Email, OTP SMS
- [LDAP](https://zitadel.com/docs/guides/integrate/identity-providers/ldap) · [企业 IdPs 和社交登录](https://zitadel.com/docs/guides/integrate/identity-providers/introduction)
- [OpenID Connect 认证](https://openid.net/certification/#OPs) · [SAML 2.0](https://zitadel.com/docs/apis/saml/endpoints) · [设备授权](https://zitadel.com/docs/guides/integrate/login/oidc/device-authorization)
- [机器对机器](https://zitadel.com/docs/guides/integrate/service-accounts/authenticate-service-accounts): JWT Profile, PAT, Client Credentials
- [Token 交换和模拟](https://zitadel.com/docs/guides/integrate/token-exchange)
- 用于 OIDC/SAML 之外流程的[自定义会话](https://zitadel.com/docs/guides/integrate/login-ui/username-password)
- [托管登录 V2](https://zitadel.com/docs/guides/integrate/login/hosted-login)
**多租户**
- 使用预构建 IdP 模板的[身份代理](https://zitadel.com/docs/concepts/features/identity-brokering)
- [可定制的 B2B 入驻](https://zitadel.com/docs/guides/integrate/onboarding/b2b),为客户提供自助服务
- [委托角色管理](https://zitadel.com/docs/guides/manage/console/projects-overview)给第三方
- [域发现](https://zitadel.com/docs/guides/solution-scenarios/domain-discovery)
**集成**
- 针对所有资源的 [gRPC, connectRPC, 和 REST APIs](https://zitadel.com/docs/apis/introduction)
- [Actions](https://zitadel.com/docs/concepts/features/actions_v2): webhooks, 自定义代码, token 富化
- [RBAC](https://zitadel.com/docs/guides/integrate/retrieve-user-roles) · [SCIM 2.0 Server](https://zitadel.com/docs/apis/scim2)
- [审计日志和 SOC/SIEM 集成](https://zitadel.com/docs/guides/integrate/external-audit-log)
- [SDKs 和示例应用](https://zitadel.com/docs/sdk-examples/introduction)
**自助服务 & 管理**
- 带有邮箱/手机验证的[自助注册](https://zitadel.com/docs/concepts/features/selfservice#registration)
- 用于组织和项目的[管理控制台](https://zitadel.com/docs/guides/manage/console/console-overview)
- 每个组织的[自定义品牌化](https://zitadel.com/docs/guides/manage/customize/branding)
**部署**
- [PostgreSQL](https://zitadel.com/docs/self-hosting/manage/database#postgres) (≥ 14) · [零停机更新](https://zitadel.com/docs/concepts/architecture/solution#zero-downtime-updates) · [高可扩展性](https://zitadel.com/docs/self-hosting/manage/production)
在我们的[路线图](https://zitadel.com/roadmap)上跟踪即将推出的功能,并关注我们的[更新日志](https://zitadel.com/changelog)以获取最新更新。
## 展示
### 登录 V2
我们全新的、完全可定制的登录体验——[文档](https://zitadel.com/docs/guides/integrate/login/hosted-login)
## 采用者 & 生态系统
被全球组织用于生产环境。查看完整的[采用者列表](./ADOPTERS.md)——并通过提交 pull request 添加您的组织。
- **SDKs**: [所有支持的语言和框架](https://zitadel.com/docs/sdk-examples/introduction)
- **示例**: [克隆并使用我们的示例](https://zitadel.com/docs/sdk-examples/introduction)
## 安全
安全策略: [SECURITY.md](./SECURITY.md)
[漏洞披露政策](https://zitadel.com/docs/legal/policies/vulnerability-disclosure-policy)——如何负责任地报告安全问题。
针对可能影响生产环境安全性或稳定性的主要问题,我们会发布[技术公告](https://zitadel.com/docs/support/technical_advisory)。
## 许可证
[AGPL-3.0](./LICENSE)——有关完整的许可政策,包括针对特定目录的 Apache 2.0 和 MIT 例外情况,请参阅 [LICENSING.md](./LICENSING.md)。
标签:Admin UI, API安全, Auth0替代方案, B2B, B2C, Docker, EVTX分析, FIDO2, Go语言, IAM, JSONLines, JSON输出, Keycloak替代方案, MFA, OAuth 2.0, OIDC, OpenID Connect, Passkeys, Python工具, RBAC, SAML, SSO, ZITADEL, 单点登录, 多因素认证, 威胁情报, 子域名突变, 安全合规, 安全防御评估, 开发者工具, 开源, 无密码认证, 日志审计, 权限控制, 测试用例, 用户管理, 程序破解, 网络代理, 请求拦截, 账号管理, 身份与访问管理, 身份基础设施, 零信任