安全与隐私smallstep.com
不用 SSH 证书,说明你的 SSH 用错了
If you’re not using SSH certificates you’re doing SSH wrong (2019)
2019 — 2022,它一次次回到首页
黑点是上首页(≥ 50 分)的那次投稿,空心点是没冲上去的投稿,点越大分数越高。
导读
Smallstep 的这篇经典文章主张用 SSH 证书替代传统的 authorized_keys 公钥管理:通过建立证书颁发机构(CA)签发短生命周期证书,实现集中化的访问控制、自动过期和可撤销性,从而简化大规模 SSH 访问管理。文章详细介绍了 SSH 证书的原理和落地步骤。
为什么经久不衰:它把 SSH 证书这一被忽视多年的标准机制讲得通俗易懂,2019 和 2022 两次登上首页说明其在 SSH 安全管理话题上持续被引用和讨论。
HN 评论精选
安全领域缺乏面向新手的系统教程,学习门槛令人沮丧
吐槽一下:作为一个要对所建系统的安全负责的人,安全领域让人感到难以捉摸、令人挫败。有没有面向小白的指南、慕课、认证或其他教学材料能帮我搞懂这些东西?SSH 密钥我理解,但证书呢?这是 OIDC、SAML 还是什么?当 PKI 对某人还是个新缩写时,要求提供更深入的新安全技术教程,这过分吗?
tomrod查看英文原文
Rant engaged. As a person who feels responsible for ensuring what I build is secure, the security space feels inscrutably defeating. Is there a dummies guide, MOOC, cert, or other instructional material to better get a handle on all these things? SSH keys make sense. But certificates? Is this OIDC, SAML, what? Is it unreasonable to request better and deeper "how to do {new security thing}" when PKI is a new acronym to someone? Where can I point my data science managers so they can understand the need and how to implement measures to have security on PII-laden dashboards? As so on.
短生命周期证书与 SSH 密钥日益扩展的其他用途(加密、签名)相冲突
让 SSH 密钥短生命周期化正变得越来越痛苦,因为越来越多工具把 SSH 密钥用于 SSH 登录之外的用途:age 用它加密文件,agenix 用它管理密钥,Git 可以用它签名提交,ssh-keygen 甚至能签名任意数据。一旦改用短生命周期密钥,这些用途全部失效。
soraminazuki查看英文原文
I feel that trying to make SSH keys short-lived is becoming more painful each year because there's an increase of tools that use SSH keys for purposes other than SSH logins. For example, age [1] encrypts files with SSH keys, agenix [2] does secrets management with it, Git can now sign commits with it [3], and even ssh-keygen can now sign arbitrary data [4]. All of these become useless the moment you start using short-lived keys. [1]: https://github.com/FiloSottile/age [2]: https://github.com/ryantm/agenix [3]: https://calebhearth.com/sign-git-with-ssh [4]: https://www.man7.org/linux/man-pages/man1/ssh-keygen.1.html
证书体系会带来新的故障和运维负担,未必适合所有团队
不跳过 SSH 证书也没错。它们是成熟的安全技术,但对所有人来说还不够成熟。和其他东西一样,它们会以可预见和不可预见的方式出故障。如果你没准备好在圣诞节早上让人紧急进入生产环境修复 SSH 故障,你就没准备好用 SSH 证书。运维维护总会找上门来。
1970-01-01查看英文原文
Meh, you're not wrong for skipping SSH certs. They're mature security, but not mature enough for everyone. And like everything else, they break, predictably and unpredictably. If you're not ready for someone to emergency access their way into prod to fix a broken SSH issue on Christmas morning, you're not ready for SSH certs. Maintenance will get you, one way or another..
SSH 证书只适合中大型企业,小团队用是徒增复杂度
作者一直在用"简单"这个词,但我认为我们对这个词的定义不同。粗读文章就能看出要点:它面向的是有重大安全威胁模型、有专职系统管理员团队的中大型公司。如果你两者都没有,这就是徒增运维复杂度而没有实际收益。威胁模型小时,攻击者根本不够 sophisticated 到针对你的 SSH 访问。配置和使用它纯属浪费时间,你甚至可能因为失误或丢钥匙把自己锁在服务器外面。
Fradow查看英文原文
The author keep using the word "easy". I don't think we have the same definition of that word. A cursory read of the article is enough to gather a main point, which should be a disclaimer: it's aimed at medium/big companies that have significant security threat model and have a dedicated sysadmin team. If you have neither, this is adding operational complexity for no real gain. When your threat model is small, potential attackers are not sophisticated enough to target SSH access. And configuring this and properly using it is a big waste of time. You might even lock yourself out of your servers because of a mistake or lost keys (that's my biggest fear which prevents me from ever switching to certificates unless I get a dedicated sysadmin). Yeah there are benefits, but they are just too abstract to bother for small companies.
补充:SSH 证书支持显式吊销,这是相对静态公钥的优势
还值得一提的是,被泄露的证书可以被显式吊销。
aloknnikhil查看英文原文
It's also worth mentioning that compromised certificates can be explicitly revoked. https://serverfault.com/questions/264515/how-to-revoke-an-ssh-certificate-not-ssh-identity-file
历次讨论
同类还值得读
非法素数
Illegal prime
维基百科条目,介绍“非法素数”:某些素数之所以被称为“非法”,是因为它们经特定编码后,恰好对应一段被法律禁止传播的数据——最著名的是 DVD 解密程序 DeCSS 的代码,有人把…
安全与隐私上首页 5 次 · 2010–2021en.wikipedia.org编辑精选关于 /dev/urandom 的常见误区
Myths about /dev/urandom
(Thomas Hühn 撰写,2014 年首发并持续更新)逐条反驳关于 /dev/urandom 的常见误解:它与 /dev/random 使用的是同一个 CSPRNG,一旦完…
安全与隐私上首页 5 次 · 2014–20202uo.de编辑精选AES 高级加密标准火柴人图解
A Stick Figure Guide to the Advanced Encryption Standard (AES)
一篇用火柴人漫画形式讲解 AES(高级加密标准)算法的经典科普文章。
安全与隐私上首页 5 次 · 2009–2022moserware.com编辑精选指纹是用户名,不是密码
Fingerprints are Usernames, not Passwords
作者(eCryptfs 维护者、Ubuntu 安全工程师)认为指纹等生物特征是公开、不可更改的标识,应视作用户名而非密码,不能当作秘密凭据用于认证。
安全与隐私上首页 4 次 · 2013–2017blog.dustinkirkland.comHTTPS 连接的最初几毫秒(2009)
The First Few Milliseconds of an HTTPS Connection (2009)
逐毫秒拆解一次 HTTPS 连接建立时发生了什么,重点讲 TLS 握手、证书验证、RSA 签名与密钥协商等机制,面向不熟悉该领域的读者。
安全与隐私上首页 4 次 · 2009–2020moserware.com编辑精选