在OAuth应用程序中使用隐式授权的客户端模拟 [英] Client impersonation in OAuth application with implicit authorization
本文介绍了在OAuth应用程序中使用隐式授权的客户端模拟的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
从OAuth草案中,隐含的部分< a>:
From OAuth draft, implicit section:
在隐式授权流程中发出访问令牌时,
授权服务器不会验证客户端。 / p>
When issuing an access token during the implicit grant flow, the authorization server does not authenticate the client.
现在,我们假设:
- 我有一个Android或iOS应用程序。
- 我使用OAuth隐式授权来获取某些资源的访问令牌。这将通过网络视图进行。
- 用户将我的应用程序授权给某些资源。这意味着:
- I have an Android or iOS app.
- I use OAuth implicit authorization to get access token to some resource. This will happen via web view.
- A user authorized my app to some resource. This means:
- 他在具有资源的原始服务中进行身份验证。
- 网络视图将会有一个会话
client_id获取访问令牌
我在我的应用程序中使用(客户端模拟)。他还具有相同的 redirect_uri
,在本机应用程序中可以像 fb:// blabla
。 client_id
的访问令牌。这是因为用户甚至不会意识到自己正在使用的 client_id
,这是我的3.1和3.2。
client_id
that I use in my app (client impersonating). He also has the same redirect_uri
which in native apps can be anything like fb://blabla
.client_id
of mine, using a web view as well. This happens because the user won't even realize the client_id
he is using, which is mine, due to 3.1 and 3.2.有没有办法可以防止这种情况?
Is there a way I can prevent this?
推荐答案
链接:
恶意客户端可以模仿另一个客户端,并获得访问受保护的资源
,如果模拟客户端无法访问,或者是
无法保留其客户端凭据机密。
我猜这是唯一的办法。另外也许你可以在你的clientId上应用一些加密,只有在验证用户之前才对它进行加密和解密。
I guess this is the only way. In addition maybe you can apply some encryption on your clientId, store it encrypted and decrypt it only before you authenticate the user.
这篇关于在OAuth应用程序中使用隐式授权的客户端模拟的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文