gpt4 book ai didi

security - 相互 SSL 与基于 token 的身份验证

转载 作者:太空宇宙 更新时间:2023-11-03 12:56:47 28 4
gpt4 key购买 nike

我正在开发一个 Web 应用程序,安全性是我们在此应用程序中的主要关注点之一。我正在查看不同的 API 安全方法(在 OWASP 中提到),无法理解相互 SSL 身份验证和基于 token 的身份验证之间的区别。在我继续之前,这是对两者的简要介绍,

Mutual (or two-way) SSL authentication provides a combination of an encrypted data stream, mutual authentication of both server and client, and automatic sign-in convenience.

Source

Every single request will require the token. This token should be sent in the HTTP header so that we keep with the idea of stateless HTTP requests.

Source

据我所知,它们可能是彼此的替代品,所以这里有几个我想到的问题,如果你能回答它们,我将不胜感激。

  • 在我看来,这两种方法可以互为替代,是吗?
  • 是吗?那么哪个更好,为什么?
  • 没有?那我们应该使用其中之一还是两者都使用?另外,根据您所说的不同,它们之间有什么区别。

最佳答案

In my opinion, both of these methods are alternatives of each other, is it so?

应根据您的上下文使用这两种方法。根据需要和安全上下文使用两种方法。

No? Then should we use one of these or both? Also, whats the difference between them based on which you're saying that they are different.

基于 token 的身份验证 (OAuth) 通常用于需要在移动应用程序/网络应用程序和 api 服务器之间建立安全通信的场景。密码未存储在设备中.它将临时 token 存储到设备,该 token 会随着时间的推移而过期。

相互 SSL 相互身份验证可以很好地在两个服务器之间建立安全通信。

所以是上下文决定了选择!

关于security - 相互 SSL 与基于 token 的身份验证,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/39741736/

28 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com