Re: [OAUTH-WG] problem statement

John Kemp <john@jkemp.net> Tue, 06 September 2011 18:13 UTC

Return-Path: <john@jkemp.net>
X-Original-To: oauth@ietfa.amsl.com
Delivered-To: oauth@ietfa.amsl.com
Received: from localhost (localhost [127.0.0.1]) by ietfa.amsl.com (Postfix) with ESMTP id B0F6921F8CA7 for <oauth@ietfa.amsl.com>; Tue, 6 Sep 2011 11:13:44 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -0.161
X-Spam-Level:
X-Spam-Status: No, score=-0.161 tagged_above=-999 required=5 tests=[BAYES_00=-2.599, FH_RELAY_NODNS=1.451, HELO_MISMATCH_COM=0.553, IP_NOT_FRIENDLY=0.334, RDNS_NONE=0.1]
Received: from mail.ietf.org ([12.22.58.30]) by localhost (ietfa.amsl.com [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 93DkSCHnmbeT for <oauth@ietfa.amsl.com>; Tue, 6 Sep 2011 11:13:44 -0700 (PDT)
Received: from oproxy1-pub.bluehost.com (oproxy1.bluehost.com [IPv6:2605:dc00:100:2::a1]) by ietfa.amsl.com (Postfix) with SMTP id BB0BF21F8B58 for <oauth@ietf.org>; Tue, 6 Sep 2011 11:13:39 -0700 (PDT)
Received: (qmail 14497 invoked by uid 0); 6 Sep 2011 18:15:26 -0000
Received: from unknown (HELO box320.bluehost.com) (69.89.31.120) by oproxy1.bluehost.com with SMTP; 6 Sep 2011 18:15:26 -0000
DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=jkemp.net; s=default; h=To:References:Message-Id:Content-Transfer-Encoding:Cc:Date:In-Reply-To:From:Content-Type:Mime-Version:Subject; bh=ZRQO71qM5uZU20d8J8xoMuBC/A2lefSfEI4szQkM4Z4=; b=RLMBZDRx4eTgqwz66Nc/RxX8ezGmHmuXQbjqT6Xy62Wbou6WUDh52dwghqDqcwkYXUW8mWZtBwDcOjzowa4UraHnP0vc+pJmxJf6QDO5Jfg7fCAvVe/0saKHoBtQRvHZ;
Received: from cpe-74-67-30-101.nycap.res.rr.com ([74.67.30.101] helo=[192.168.1.110]) by box320.bluehost.com with esmtpsa (TLSv1:AES128-SHA:128) (Exim 4.76) (envelope-from <john@jkemp.net>) id 1R10BC-0000ib-Ic; Tue, 06 Sep 2011 12:15:26 -0600
Mime-Version: 1.0 (Apple Message framework v1244.3)
Content-Type: text/plain; charset="us-ascii"
From: John Kemp <john@jkemp.net>
In-Reply-To: <4E665B25.6090709@mtcc.com>
Date: Tue, 06 Sep 2011 14:15:47 -0400
Content-Transfer-Encoding: quoted-printable
Message-Id: <F5DE9F34-EF45-4C72-8257-A019AF2ABBB2@jkemp.net>
References: <4E665B25.6090709@mtcc.com>
To: Michael Thomas <mike@mtcc.com>
X-Mailer: Apple Mail (2.1244.3)
X-Identified-User: {1122:box320.bluehost.com:jkempnet:jkemp.net} {sentby:smtp auth 74.67.30.101 authed with john+jkemp.net}
Cc: oauth@ietf.org
Subject: Re: [OAUTH-WG] problem statement
X-BeenThere: oauth@ietf.org
X-Mailman-Version: 2.1.12
Precedence: list
List-Id: OAUTH WG <oauth.ietf.org>
List-Unsubscribe: <https://www.ietf.org/mailman/options/oauth>, <mailto:oauth-request@ietf.org?subject=unsubscribe>
List-Archive: <http://www.ietf.org/mail-archive/web/oauth>
List-Post: <mailto:oauth@ietf.org>
List-Help: <mailto:oauth-request@ietf.org?subject=help>
List-Subscribe: <https://www.ietf.org/mailman/listinfo/oauth>, <mailto:oauth-request@ietf.org?subject=subscribe>
X-List-Received-Date: Tue, 06 Sep 2011 18:13:44 -0000

Michael,

On Sep 6, 2011, at 1:40 PM, Michael Thomas wrote:

> Hi all,
> 
> Barry suggested that I might subscribe and explain what I sent him.
> 
> My basic problem is that in neither the protocol nor the threats drafts,
> I can't seem to find what problem is actually trying to be solved with
> oauth, and what assumptions you're making about various elements.
> 
> Here's what I did. I've written an app, and I wanted re-integrate the
> ability to send tweets after they deprecated Basic. So the app has a
> webView (android, iphone...) which it obviously completely controls.
> With oauth, the webview UA will ultimately redirect off to Twitter's
> site to collect the user's credentials and grant my app's backend an
> access token (sorry if I get terminology screwed up, i'm just coming
> up to speed).
> 
> What occurs to me is that webview affords exactly zero protection from
> my client (ie, the app) from getting the user's twitter credentials. All
> I have to do is set up a keypress handler on that webview and in a few
> minutes of hacking I have a key logger. etc.

If an attacker is able to log key presses from a "webview" created by your app with their own app/library, then this is a threat to the user's credentials, yes.

> 
> So what I can't tell is whether this is a "problem" or not, because I
> don't know what problem you're trying to solve.

Broadly-speaking, the "problem" to be solved is to avoid the requirement for a user to share her username/password at one web application with another. OAuth is similar in that regard to Kerberos or SAML - a "ticket" system. 
 
> If the object of oauth
> isn't to keep user/server credentials out of the hands of a third party,
> then what is it trying to solve? Is there an expectation that the
> UA is trusted by the user/server?

Not in all cases, no. It depends on which OAuth "flow" you use for your application. In general, I would say that the UA is NOT to be trusted by the user/server.

> What happens when that's not the case?
> 
> Regardless of whether I'm misunderstanding, it would sure be nice to have
> both the problem and your assumptions laid out, hopefully with some prominence
> so you don't get these sort of dumb questions.

One point I would mention first is that your question isn't dumb ;) 

But, as I noted, OAuth seeks to avoid the requirement for a user to share her username/password at one web application with another. That being said, there are lots of ways to get that wrong, and the way of resolving those is to implement OAuth-based applications using the security features available in their specific environments, as these vary quite a lot. OAuth provides a number of different protocol flows to help with that, and "security considerations" that discuss known security threats within various environments. By careful reading, you can determine which flow is appropriate for your application, and which security features should be used to avoid the threats to your application.

Regards,

- John

> 
> Mike
> _______________________________________________
> OAuth mailing list
> OAuth@ietf.org
> https://www.ietf.org/mailman/listinfo/oauth