我可以使用 mTLS 代替 Open ID Connect 进行身份验证吗?
我想使用 mTLS 来保护微服务,而不是 Open ID Connect。
据我了解,mTLS 的工作原理是,它通过 SSL 握手对两个服务之间的通信进行加密。
但是,我可以使用 mTLS 作为身份验证机制,而不是通过 Open ID Connect 保护服务吗?
I would like to use mTLS to protect microservices instead of Open ID Connect.
As I understand how mTLS works, it encrypts the communications between two services via SSL handshake.
However, can I use mTLS as authentication mechanism instead protect services through Open ID Connect?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
您可以使用 mTLS 作为微服务之间的基础设施安全解决方案,但它会有局限性,并且无法管理用户级别的安全。因此,这取决于您的微服务的客户端是谁,以及您需要如何授权 API 请求。
用户级别安全性
这是使用 OAuth 和 OIDC 的地方,通常有一个 Web 或移动应用程序作为客户端:
由于访问令牌中的用户身份,API 可以执行用户级别的授权,例如。确保用户只能查看自己的购买历史记录。
结合 mTLS 和 OAUTH
将这两个构建块结合起来很常见,安全标准/法规有时也需要这样做。请参阅金融级安全概述了解一些示例场景。
You can use mTLS as an infrastructure security solution between microservices, but it will have limitations, and will not be able to manage user level security. So it depends who the clients of your microservices are, and how you need to authorize API requests.
USER LEVEL SECURITY
This is where OAuth and OIDC are used, and often there is a web or mobile app as a client:
Because of the user identity in the access token, the API can perform user level authorization, eg to. ensure that a user can only view their own purchase history.
COMBINING mTLS AND OAUTH
It is common to combine these two building blocks, and security standards / regulations sometimes require this. See this financial-grade security overview for some example scenarios.