Re: [OAUTH-WG] Authorization Request via back channel / direct communication?

"Richer, Justin P." <jricher@mitre.org> Sat, 09 June 2012 01:00 UTC

Return-Path: <jricher@mitre.org>
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 203ED21F865F for <oauth@ietfa.amsl.com>; Fri, 8 Jun 2012 18:00:48 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -6.598
X-Spam-Level:
X-Spam-Status: No, score=-6.598 tagged_above=-999 required=5 tests=[AWL=-0.000, BAYES_00=-2.599, HTML_MESSAGE=0.001, RCVD_IN_DNSWL_MED=-4]
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 9-lLm1HOg6Fw for <oauth@ietfa.amsl.com>; Fri, 8 Jun 2012 18:00:47 -0700 (PDT)
Received: from smtpksrv1.mitre.org (smtpksrv1.mitre.org [198.49.146.77]) by ietfa.amsl.com (Postfix) with ESMTP id C71CD21F85FC for <oauth@ietf.org>; Fri, 8 Jun 2012 18:00:46 -0700 (PDT)
Received: from smtpksrv1.mitre.org (localhost.localdomain [127.0.0.1]) by localhost (Postfix) with SMTP id 5B9C421B13FC; Fri, 8 Jun 2012 21:00:45 -0400 (EDT)
Received: from IMCCAS04.MITRE.ORG (imccas04.mitre.org [129.83.29.81]) by smtpksrv1.mitre.org (Postfix) with ESMTP id 4C32B21B05A3; Fri, 8 Jun 2012 21:00:45 -0400 (EDT)
Received: from IMCMBX01.MITRE.ORG ([169.254.1.127]) by IMCCAS04.MITRE.ORG ([129.83.29.81]) with mapi id 14.02.0283.003; Fri, 8 Jun 2012 21:00:45 -0400
From: "Richer, Justin P." <jricher@mitre.org>
To: Lewis Adam-CAL022 <Adam.Lewis@motorolasolutions.com>
Thread-Topic: [OAUTH-WG] Authorization Request via back channel / direct communication?
Thread-Index: Ac1FyBd3lOmctaVIR/OLtuzN7H7cRQANLusA
Date: Sat, 09 Jun 2012 01:00:44 +0000
Message-ID: <526CE92D-E1BB-4FA1-B8B9-B776C86DC5BA@mitre.org>
References: <59E470B10C4630419ED717AC79FCF9A90AED9537@BL2PRD0410MB363.namprd04.prod.outlook.com>
In-Reply-To: <59E470B10C4630419ED717AC79FCF9A90AED9537@BL2PRD0410MB363.namprd04.prod.outlook.com>
Accept-Language: en-US
Content-Language: en-US
X-MS-Has-Attach:
X-MS-TNEF-Correlator:
x-originating-ip: [172.31.17.4]
Content-Type: multipart/alternative; boundary="_000_526CE92DE1BB4FA1B8B9B776C86DC5BAmitreorg_"
MIME-Version: 1.0
Cc: "oauth@ietf.org" <oauth@ietf.org>
Subject: Re: [OAUTH-WG] Authorization Request via back channel / direct communication?
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: Sat, 09 Jun 2012 01:00:48 -0000

You're right in that OAuth is optimized for the confidential clients case -- specifically, a client being a web server talking to another web server. But what you've just described, in a nutshell, is the assertion grant type:

http://tools.ietf.org/html/draft-ietf-oauth-assertions-03

Which has been profile for both SAML and JWT assertions here:

http://tools.ietf.org/html/draft-ietf-oauth-saml2-bearer-12
http://tools.ietf.org/html/draft-jones-oauth-jwt-bearer-04

And could be extended to house any number of stronger-auth circumstances and formats. I believe Google and Deutch Telekom are making wide use of this today (correct me if I'm remembering incorrectly).

But I'll say that for many cases it's still best practice to use the code flow and go through a UI for one simple but subtle reason: a browser can take in an infinitely diverse set of user credentials and the UI can change at any time without making any changes to the native code. Say you've got an OAuth backed native app that everyone's using the code flow and a username and password for. Great, works, no problem. Then you decide that you're not doing un/pw anymore and everyone needs to have a second factor, or do a captcha, or any number of other little things when they sign in and use the app. These kinds of things are *easy* to add to a web server's login page, but much harder to deal with in a native app directly. Challenge response scenarios are *trivial* with a web page -- they're practically made for it. And extend this scenario further by saying that you'll now let people log into your service using OpenID or another distributed identity protocol. All of this is really easy for the web server at the AS to handle, and the native app through all of this needs to be none the wiser. And this is a Very Good Thing. Plus it also gets your app out of the business of ever having to see users credentials directly. Remember: when you're doing the Resource Owners Credentials Flow, you're basically doing a benevolent man in the middle attack. Sure it works, and it beats logging in directly as the user at all times, but only just so.

We actually ran into exactly this kind of thing a few years ago with an app here. It went like this:

* Dev team was building a native application to connect to a website that had several different auth mechanisms including a username/password authentication key (similar to the OAuth2 un/pw flow) and OAuth 1.
* They went with the un/pw setup because they figured it was easier and their native app could just ask for the un/pw combination.
* This all worked swimmingly in the dev environment with all the test accounts
* They roll to the integration environment which, like the Production system, was protected by OpenID 2.0 and not a username/password. In fact, none of the users on the system -- including the developers themselves -- actually had anything resembling a local password. Their app was completely at a loss -- the users couldn't present anything to the app to log them in directly at all.
* After some head scratching and scrambling, they switched the whole app setup to OAuth (again, 1.0a). Now they could use the same exact code in the dev, integration, and production environments. And it worked across all user sets, regardless of how they got in the front door. *And* it will continue to work when we eventually upgrade this same service to use OpenID Connect instead of OpenID 2.0 in the future.


Hope this sheds some light on this,
 -- Justin


On Jun 8, 2012, at 6:43 PM, Lewis Adam-CAL022 wrote:

Hi,

I have a historical question around front channel / back channel (direct) communications and Authorization Requests.  Both the code-flow and implicit-flow utilize a front channel communication through the UA.  This makes sense for the delegated credentials case (e.g. shutterfly accessing photos on facebook).

I’m in the native app / client market, and the RO password credentials flow fits really well … expect it’s limited to passwords.  I’ve been well educated (by lots of folks on this list) about the “best practices” to enable native clients to use the code flow, e.g. registering a custom callback URI and register my native app ass the handler for that URI.

But … (and not knowing the history behind all this), it seems that OAuth was designed for confidential clients, and was “retro-fitted” to make native apps work.  And it just feels a bit like a hack to me (albeit a workable one), the whole custom callback URI thing, to get it to work.  The RO password credentials seems like a much better fit for native apps, since it has no need for the UA and can use back channel / direction communication to talk to the AS and obtain and access token.  But that limits me to a password and eliminates any chance of strong authentication.

It would seem more straight forward to define a back channel flow such that a native client could send off an authorization request with response=token (or id_token in the Connect case), respond to a challenge from the AS for authentication, and obtain a response containing the access_token / id_token and use it for its RESTful API communications with the RS/RP.  This would enable strong authentication methods not possible using just RO passwords.

Has anybody else ever expressed interest in such back channel calls between for native clients?  Was it previously considered and dropped?

Tx!
adam
_______________________________________________
OAuth mailing list
OAuth@ietf.org<mailto:OAuth@ietf.org>
https://www.ietf.org/mailman/listinfo/oauth