Re: [OAUTH-WG] SSO scenario

Justin Richer <jricher@mitre.org> Wed, 31 August 2011 19:41 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 4850F21F8CAB for <oauth@ietfa.amsl.com>; Wed, 31 Aug 2011 12:41:31 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -6.574
X-Spam-Level:
X-Spam-Status: No, score=-6.574 tagged_above=-999 required=5 tests=[AWL=0.025, BAYES_00=-2.599, 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 kUSj+GMAJF4h for <oauth@ietfa.amsl.com>; Wed, 31 Aug 2011 12:41:30 -0700 (PDT)
Received: from smtpksrv1.mitre.org (smtpksrv1.mitre.org [198.49.146.77]) by ietfa.amsl.com (Postfix) with ESMTP id 8C2A721F8C7B for <oauth@ietf.org>; Wed, 31 Aug 2011 12:41:30 -0700 (PDT)
Received: from smtpksrv1.mitre.org (localhost.localdomain [127.0.0.1]) by localhost (Postfix) with SMTP id 17CBF21B129A; Wed, 31 Aug 2011 15:43:01 -0400 (EDT)
Received: from IMCCAS03.MITRE.ORG (imccas03.mitre.org [129.83.29.80]) by smtpksrv1.mitre.org (Postfix) with ESMTP id B361421B153A; Wed, 31 Aug 2011 15:43:00 -0400 (EDT)
Received: from [129.83.50.1] (129.83.31.55) by IMCCAS03.MITRE.ORG (129.83.29.80) with Microsoft SMTP Server id 14.1.270.1; Wed, 31 Aug 2011 15:43:00 -0400
From: Justin Richer <jricher@mitre.org>
To: Peter Saint-Andre <stpeter@stpeter.im>
In-Reply-To: <4E5E881F.70901@stpeter.im>
References: <201108261604.57643.justin@affinix.com> <4E5E881F.70901@stpeter.im>
Content-Type: text/plain; charset="UTF-8"
Date: Wed, 31 Aug 2011 15:42:05 -0400
Message-ID: <1314819725.9663.322.camel@ground>
MIME-Version: 1.0
X-Mailer: Evolution 2.32.2
Content-Transfer-Encoding: 7bit
Cc: "oauth@ietf.org" <oauth@ietf.org>
Subject: Re: [OAUTH-WG] SSO scenario
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: Wed, 31 Aug 2011 19:41:31 -0000

This description actually sounds a lot like the user-agent flow (aka,
"implicit authorization grant") in OAuth2 more than it does a true
two-legged system. The user is still there, and there's still a client
and protected resource, it's just that they're fairly tightly tied.

When using the implicit flow, one of the things you rely on for
verification of the client is the callback url. In this case, it can be
completely pre-registered back to something that the AS/PR has direct
control over.

If you wanted to do a more traditional two-legged approach, you can use
the client-credentials flow between the two servers and have the user's
identity just be asserted as part of an explicit API call. But since you
have a user in the loop, you might as well use them and do a real
three-legged kind of thing.

Additionally, the "user is logged in" bits could be handled by using
OpenID Connect if he wants to go in that direction. At a very high
level, the user ID basically becomes an OAuth2 protected resource, thus
allowing you to log in from any where you can get an access token.
(Connect folks, please feel free to chime in and tell Justin how wrong I
am.)

 -- Justin

On Wed, 2011-08-31 at 15:14 -0400, Peter Saint-Andre wrote:
> I tried to help Justin off-list, but it would be nice to have a FAQ
> somewhere that shows developers how to translate from OAuth 1.1 to OAuth
> 2.0, even just conceptually (as in, "they got rid of the legs, how do I
> do two-legged auth in OAuth 2.0?!?").
> 
> On 8/26/11 5:04 PM, Justin Karneges wrote:
> > Hi folks,
> > 
> > I currently use a proprietary token approach to provide authentication to a 
> > browser widget, and I wonder if OAuth could be used to replace it.
> > 
> > Here's how the system currently works:
> >   - website supports authenticated users (happens via username/password form)
> >   - website and widget provider have a shared secret
> >   - the website serves a page to the browser, containing an embed of a remote 
> > widget as well as a token that asserts the currently logged in user.  the 
> > widget takes this token and performs an ajax call to the widget provider 
> > server.  behold, the user is now logged in to the widget.
> > 
> > In trying to organize this into OAuth terms and roles, here is what I come up 
> > with:
> >   - resource owner: the user
> >   - resource server: widget provider (where the resource is generically "the 
> > ability to utilize the widget")
> >   - client: the webpage running in the browser
> >   - authorization server: the website
> > 
> > The website essentially serves up the client application and token in one 
> > shot, so the client never has to explicitly ask for a token.  However, the 
> > client would then take that token and use it to access a service.  The website 
> > and widget provider would share key material such that token validation is 
> > possible, but it's important to note that the two services are not owned and 
> > operated by the same people.
> > 
> > Does this seem right?  Normally when I think of OAuth, I think of a user 
> > giving a third-party service access to his personal stuff, but in the above flow 
> > I'm proposing that OAuth be used so that the user gains access to his own 
> > stuff.  In fact, there would be no way to access his stuff other than this 
> > approach, so it's not just about optional third-party access.  It's the direct 
> > and only access.
> > 
> > Would love confirmation that OAuth is appropriate for my needs, and if I have 
> > the roles right in that case.
> > 
> > Thanks,
> > Justin
> > _______________________________________________
> > OAuth mailing list
> > OAuth@ietf.org
> > https://www.ietf.org/mailman/listinfo/oauth
> 
> _______________________________________________
> OAuth mailing list
> OAuth@ietf.org
> https://www.ietf.org/mailman/listinfo/oauth