在OAuth应用程序中使用隐式授权的客户端模拟 [英] Client impersonation in OAuth application with implicit authorization

查看:142
本文介绍了在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.

现在,我们假设:


  1. 我有一个Android或iOS应用程序。

  2. 我使用OAuth隐式授权来获取某些资源的访问令牌。这将通过网络视图进行。

  3. 用户将我的应用程序授权给某些资源。这意味着:
  1. I have an Android or iOS app.
  2. I use OAuth implicit authorization to get access token to some resource. This will happen via web view.
  3. A user authorized my app to some resource. This means:

  1. 他在具有资源的原始服务中进行身份验证。

  2. 网络视图将会有一个会话


  • 有一个恶意的Android或iOS应用程序试图使用相同的 client_id获取访问令牌我在我的应用程序中使用(客户端模拟)。他还具有相同的 redirect_uri ,在本机应用程序中可以像 fb:// blabla

  • 根据我的理解,这个恶意应用程序可以使用网页视图获取最初属于我的 client_id 的访问令牌。这是因为用户甚至不会意识到自己正在使用的 client_id ,这是我的3.1和3.2。

  • 除了速度限制(像FB和Twitter这样的几个提供商),客户端将因为使用过多而使用,所以他可以做到有害的事情。

  • There is a malicious Android or iOS app that's trying to get an access token using the same 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.
  • As to my understanding, this malicious app can get an access token that originally belongs to the 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.
  • He can do harmful things with it, apart from the rate limiting(in several providers like FB and Twitter) that my client will have to due to the excessive usage.
  • 有没有办法可以防止这种情况?

    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屋!

    查看全文
    登录 关闭
    扫码关注1秒登录
    发送“验证码”获取 | 15天全站免登陆