【发布时间】:2012-01-12 19:13:14
【问题描述】:
我打算为现有应用构建委托登录系统。我将同时实现 OAuth 客户端(在 Web 应用程序中)和 OAuth 服务器(一个简单的授权和资源服务器,目前实际上只有一个“用户”资源。)
考虑到这一点,我在当前的OAuth 2 draft(第 22 版)中遇到了以下部分:
3.1.2.1. Endpoint Request Confidentiality
If a redirection request will result in the transmission of an
authorization code or access token over an open network (between the
resource owner's user-agent and the client), the client SHOULD
require the use of a transport-layer security mechanism.
Lack of transport-layer security can have a severe impact on the
security of the client and the protected resources it is authorized
to access. The use of transport-layer security is particularly
critical when the authorization process is used as a form of
delegated end-user authentication by the client (e.g. third-party
sign-in service).
这特别警告我应该在客户端上使用 TLS。当然,我们将在服务器上使用 HTTPS,但在所有客户端上启用 HTTPS 将很困难,如果不是不可能的话。
根据我对安全性的有限理解,我想有人可能会窃取授权。这让我想到了我的问题:
不会进行客户端身份验证(使用客户端密码)防止窃听者使用授权授予?(因为恶意方不会知道客户端密码,希望。)
如果没有,或者如果这里我没有看到另一个攻击媒介,我可以做些什么来确保在客户端上没有 HTTPS 的情况下安全地工作?例如,OAuth 1 会有所帮助吗? (也许是因为它有额外的请求令牌步骤。)
P.S.:我正计划使用 TLS 客户端证书而不是秘密进行客户端身份验证,如果这会使情况变得更好的话。
【问题讨论】:
标签: security oauth https oauth-2.0 ssl