smallstep/certificates
GitHub: smallstep/certificates
一套自托管的私有证书颁发机构与 ACME 服务器,支持 X.509 和 SSH 证书的自动化管理。
Stars: 8319 | Forks: 536
# step-ca
[](https://github.com/smallstep/certificates/releases/latest)
[](https://goreportcard.com/report/github.com/smallstep/certificates)
[](https://github.com/smallstep/certificates)
[](https://opensource.org/licenses/Apache-2.0)
[](https://cla-assistant.io/smallstep/certificates)
`step-ca` 是一个在线证书颁发机构,用于 DevOps 的安全、自动化证书管理。
它是用于处理证书和密钥的 [`step` CLI 工具](https://github.com/smallstep/cli) 的服务端对应组件。
这两个项目均由 [Smallstep Labs](https://smallstep.com) 维护。
你可以使用 `step-ca` 来:
- 颁发[在浏览器中工作]( )的 HTTPS 服务器和客户端证书(符合 [RFC5280](https://tools.ietf.org/html/rfc5280) 和 [CA/Browser Forum](https://cabforum.org/baseline-requirements-documents/) 标准)
- 为 DevOps 颁发 TLS 证书:虚拟机、容器、API、数据库连接、Kubernetes pods...
- 颁发 SSH 证书:
- 对于人员,以单点登录身份令牌作为交换
- 对于主机,以云实例身份文档作为交换
- 轻松自动化证书管理:
- 它是一个支持所有[流行 ACME challenge 类型](https://smallstep.com/docs/step-ca/acme-basics/#acme-challenge-types)的 [ACME 服务器](https://smallstep.com/docs/step-ca/acme-basics/)
- 它附带一个 [Go wrapper](./examples#user-content-basic-client-usage)
- ... 并且有一个[命令行客户端](https://github.com/smallstep/cli)可在脚本中使用!
### 与 Smallstep 商业产品的比较
`step-ca` 针对服务于常见 DevOps 用例的两层 PKI 进行了优化。
在设计 PKI 时,如果您需要以下任何功能,请[考虑我们的商业 CA](http://smallstep.com):
- 多个证书颁发机构
- 主动撤销(CRL, OCSP)
- 交钥匙式的大容量、高可用性 CA
- 用于无缝 PKI IaC 管理的 API
- 对 SCEP 和 NDES 的集成支持,用于从旧版 Active Directory Certificate Services 部署迁移
- 设备身份 —— 使用 Secure Enclave 和 TPM 2.0 进行跨平台设备清单和认证
- 高度自动化的 PKI —— 托管证书更新、监控、基于 TPM 的认证注册
- EAP-TLS Wi-Fi、VPN、SSH 和浏览器证书的无缝客户端部署
- Jamf、Intune 或其他用于根分发和客户端注册的 MDM
- Web 管理 UI —— 历史、颁发和指标
- ACME 外部帐户绑定 (EAB)
- 与身份提供商的深度集成
- 细粒度的、基于角色的访问控制
- 符合 FIPS 的软件
- HSM 绑定的私钥
有关更多信息,请参阅我们的[完整功能比较](https://smallstep.com/step-ca-vs-smallstep-certificate-manager/)。
您可以[开始免费试用](https://smallstep.com/signup)或[与我们安排通话](https://go.smallstep.com/request-demo)以了解更多信息。
**有问题?请在 [Discussions](https://github.com/smallstep/certificates/discussions) 中找到我们或 [加入我们的 Discord](https://u.step.sm/discord)。**
[网站](https://smallstep.com/certificates) |
[文档](https://smallstep.com/docs/step-ca) |
[安装](https://smallstep.com/docs/step-ca/installation) |
[贡献者指南](./CONTRIBUTING.md)
## 功能
### 🦾 快速、稳定、灵活的私有 CA
建立*公钥基础设施* (PKI) 对许多小团队来说是遥不可及的。`step-ca` 让这变得更容易。
- 选择适合您需求的密钥类型(RSA, ECDSA, EdDSA)和生命周期
- 具有自动注册、更新和被动撤销功能的[短期证书](https://smallstep.com/blog/passive-revocation.html)
- 可以作为[现有根 CA 的在线中间 CA](https://smallstep.com/docs/tutorials/intermediate-ca-new-ca) 运行
- [Badger, BoltDB, Postgres 和 MySQL 数据库后端](https://smallstep.com/docs/step-ca/configuration#databases)
### ⚙️ 多种自动化方式
有几种方法可以授权对 CA 的请求,并建立适合您流程的信任链。
您可以通过交换以下内容来颁发证书:
- 来自任何 ACMEv2 客户端的 [ACME challenge 响应](#your-own-private-acme-server)
- [OAuth OIDC 单点登录令牌](https://smallstep.com/blog/easily-curl-services-secured-by-https-tls.html),例如:
- 来自 Okta, GSuite, Azure AD, Auth0 的 ID 令牌。
- 来自您自托管的 OAuth OIDC 服务的 ID 令牌,例如 [Keycloak](https://www.keycloak.org/) 或 [Dex](https://github.com/dexidp/dex)
- [云实例身份文档](https://smallstep.com/blog/embarrassingly-easy-certificates-on-aws-azure-gcp/),用于 AWS, GCP 和 Azure 上的虚拟机
- 由您的 CD 工具(Puppet, Chef, Ansible, Terraform 等)颁发的[一次性、短期 JWK 令牌](https://smallstep.com/docs/step-ca/provisioners#jwk)
- 受信任的 X.509 证书(X5C provisioner)
- 来自您的 Nebula 网络的主机证书
- SCEP challenge(SCEP provisioner)
- 需要更新的 SSH 主机证书(SSHPOP provisioner)
- 在我们的 [provisioner 文档](https://smallstep.com/docs/step-ca/provisioners)中了解更多信息
### 🏔 您自己的私有 ACME 服务器
ACME 是 Let's Encrypt 用于自动化颁发 HTTPS 证书的协议。向任何 ACMEv2 ([RFC8555](https://tools.ietf.org/html/rfc8555)) 客户端颁发证书*非常简单*。
- [在开发和预生产环境中使用 ACME](https://smallstep.com/blog/private-acme-server/#local-development--pre-production)
- 支持最流行的 [ACME challenge 类型](https://letsencrypt.org/docs/challenge-types/):
- 对于 `http-01`,在众所周知的 URL 放置一个令牌,以证明您控制该 Web 服务器
- 对于 `dns-01`,添加一个 `TXT` 记录,以证明您控制该 DNS 记录集
- 对于 `tls-alpn-01`,在 TLS 层响应 challenge([就像 Caddy 做的那样](https://caddy.community/t/caddy-supports-the-acme-tls-alpn-challenge/4860)),以证明您控制该 Web 服务器
- 适用于任何 ACME 客户端。我们编写了以下示例:
- [certbot](https://smallstep.com/docs/tutorials/acme-protocol-acme-clients#certbot)
- [acme.sh](https://smallstep.com/docs/tutorials/acme-protocol-acme-clients#acmesh)
- [win-acme](https://smallstep.com/docs/tutorials/acme-protocol-acme-clients#win-acme)
- [Caddy](https://smallstep.com/docs/tutorials/acme-protocol-acme-clients#caddy-v2)
- [Traefik](https://smallstep.com/docs/tutorials/acme-protocol-acme-clients#traefik)
- [Apache](https://smallstep.com/docs/tutorials/acme-protocol-acme-clients#apache)
- [nginx](https://smallstep.com/docs/tutorials/acme-protocol-acme-clients#nginx)
- 使用这些库通过 ACME 以编程方式获取证书:
- 用于 Golang 的 [`lego`](https://github.com/go-acme/lego)([用法示例](https://smallstep.com/docs/tutorials/acme-protocol-acme-clients#golang))
- 用于 Python 的 certbot [`acme` 模块](https://github.com/certbot/certbot/tree/master/acme)([用法示例](https://smallstep.com/docs/tutorials/acme-protocol-acme-clients#python))
- 用于 Node.js 的 [`acme-client`](https://github.com/publishlab/node-acme-client)([用法示例](https://smallstep.com/docs/tutorials/acme-protocol-acme-clients#node))
- 我们自己的 [`step` CLI 工具](https://github.com/smallstep/cli)也是一个 ACME 客户端!
- 有关更多信息,请参阅我们的 [ACME 教程](https://smallstep.com/docs/tutorials/acme-challenge)
### 👩🏽💻 在线 SSH 证书颁发机构
- 通过使用 [SSH 证书](https://smallstep.com/blog/use-ssh-certificates/)代替公钥和 `authorized_keys` 文件,将 SSH 认证委托给 `step-ca`
- 对于用户证书,[将 SSH 连接到您的单点登录提供商](https://smallstep.com/blog/diy-single-sign-on-for-ssh/),通过任何 OAuth OIDC 提供商利用短期证书和 MFA(或其他安全策略)来提高安全性。
- 对于主机证书,提高安全性,[消除 TOFU 警告](https://smallstep.com/blog/use-ssh-certificates/),并设置自动主机证书更新。
### 🤓 通用 PKI 工具,通过 [`step` CLI](https://github.com/smallstep/cli) [集成](https://smallstep.com/docs/step-cli/reference/ca/)
- 在需要的地方生成密钥对,这样私钥就永远不会通过网络传输
- 使用 `step-ca` 支持的任何 provisioner [认证并获取证书](https://smallstep.com/docs/step-cli/reference/ca/certificate/)
- 安全地[分发根证书](https://smallstep.com/docs/step-cli/reference/ca/root/)并[引导](https://smallstep.com/docs/step-cli/reference/ca/bootstrap/) PKI 依赖方
- [更新](https://smallstep.com/docs/step-cli/reference/ca/renew/)和[撤销](https://smallstep.com/docs/step-cli/reference/ca/revoke/)由 `step-ca` 颁发的证书
- 在您的机器和浏览器上[安装根证书](https://smallstep.com/docs/step-cli/reference/certificate/install/),以便您的 CA 受到信任
- [检查](https://smallstep.com/docs/step-cli/reference/certificate/inspect/)和[校验](https://smallstep.com/docs/step-cli/reference/certificate/lint/)证书
## 安装
请参阅此处的安装文档[此处](https://smallstep.com/docs/step-ca/installation)。
## 文档
* [官方文档](https://smallstep.com/docs/step-ca)位于 smallstep.com
* `step` 命令参考可通过 `step help` 获取,
[位于 smallstep.com](https://smallstep.com/docs/step-cli/reference/),
或通过命令行运行 `step help --http=:8080`
并访问 http://localhost:8080。
## 反馈?
* 告诉我们您在管理 PKI 方面喜欢什么和不喜欢什么 —— 我们渴望帮助解决这一领域的问题。[加入我们的 Discord](https://u.step.sm/discord) 或 [GitHub Discussions](https://github.com/smallstep/certificates/discussions)
* 告诉我们您希望看到的功能
标签:ACME, CA, EVTX分析, Go, HTTPS, JSONLines, mTLS, Ruby工具, SamuraiWTF, Smallstep, SSH证书, TLS, X.509, 加密, 单点登录, 日志审计, 服务网格, 测试用例, 漏洞扫描器, 网络安全, 自动化证书管理, 证书颁发机构, 软件清单, 防御工具, 隐私保护, 零信任, 零信任安全