Re: [OAUTH-WG] Using OAuth to get a JWT/SAML token

John Bradley <ve7jtb@ve7jtb.com> Thu, 19 April 2012 22:35 UTC

Return-Path: <ve7jtb@ve7jtb.com>
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 53CDE21F8568 for <oauth@ietfa.amsl.com>; Thu, 19 Apr 2012 15:35:46 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -2.801
X-Spam-Level:
X-Spam-Status: No, score=-2.801 tagged_above=-999 required=5 tests=[AWL=-0.599, BAYES_00=-2.599, HTML_MESSAGE=0.001, MIME_QP_LONG_LINE=1.396, RCVD_IN_DNSWL_LOW=-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 EtvxM3jo917i for <oauth@ietfa.amsl.com>; Thu, 19 Apr 2012 15:35:45 -0700 (PDT)
Received: from mail-wg0-f44.google.com (mail-wg0-f44.google.com [74.125.82.44]) by ietfa.amsl.com (Postfix) with ESMTP id B66B921F8567 for <oauth@ietf.org>; Thu, 19 Apr 2012 15:35:44 -0700 (PDT)
Received: by wgbdr13 with SMTP id dr13so6155336wgb.13 for <oauth@ietf.org>; Thu, 19 Apr 2012 15:35:43 -0700 (PDT)
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20120113; h=subject:mime-version:content-type:from:in-reply-to:date:cc :message-id:references:to:x-mailer:x-gm-message-state; bh=/9cFKwE8uGjWnTehG2eT0UoLBErxSPrXmh7HAyh/IwI=; b=Z1oDPiXZEcO26NBTH13ZDSGlZ1w9Xfoi5/8AgWkTBCtJefQLWsKvOu5OnAtp/wFNlx L0sHdYxGtRRM/c1RIzuOj3GgP/Mz0h0Fumr6AUhiwLgl8GFY3fMkOIKOVgnO7TIL6cd/ gWzFa7eB06XCmXIBJRoKfwAUkKEW+a+iyzt9cUt0GuonaUwBOGdZvo36ckxDN4J1lzl7 6riwwDDqXMZX7Ch0gunvk1cSZMJyuX02dAVEIH74uTRWccLYRvUmGRdMC6wJKd9nMIux tL3PzDUl2SoZQii9czd33mQ6MxRmo+VOws+P7ZC2J5e8YCfeuMDY0Et5Zt9wZ6UlNCgz 4e1A==
Received: by 10.180.102.100 with SMTP id fn4mr9389671wib.1.1334874943625; Thu, 19 Apr 2012 15:35:43 -0700 (PDT)
Received: from [10.0.9.253] ([212.144.56.68]) by mx.google.com with ESMTPS id o2sm1368963wiv.11.2012.04.19.15.35.40 (version=TLSv1/SSLv3 cipher=OTHER); Thu, 19 Apr 2012 15:35:42 -0700 (PDT)
Mime-Version: 1.0 (Apple Message framework v1257)
Content-Type: multipart/signed; boundary="Apple-Mail=_A5B2597C-970F-4DEA-8277-D1EE63711498"; protocol="application/pkcs7-signature"; micalg="sha1"
From: John Bradley <ve7jtb@ve7jtb.com>
In-Reply-To: <59E470B10C4630419ED717AC79FCF9A9097843@BL2PRD0410MB363.namprd04.prod.outlook.com>
Date: Fri, 20 Apr 2012 00:35:37 +0200
Message-Id: <CAA644E8-C5E3-4C17-B477-2725D6DA7988@ve7jtb.com>
References: <5jrlua1y80mdxtvpmygf5tp1.1334872982862@email.android.com> <59E470B10C4630419ED717AC79FCF9A9097843@BL2PRD0410MB363.namprd04.prod.outlook.com>
To: Lewis Adam-CAL022 <Adam.Lewis@motorolasolutions.com>
X-Mailer: Apple Mail (2.1257)
X-Gm-Message-State: ALoCoQnjWGcwz3EUgxVgb0/qofsqv+7WJUi2pQkAglalTQGQtq9Fm5JgeR1TpxMui0ssaF+HKG5h
Cc: "oauth@ietf.org" <oauth@ietf.org>
Subject: Re: [OAUTH-WG] Using OAuth to get a JWT/SAML token
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: Thu, 19 Apr 2012 22:35:46 -0000

The goal is to train users to use a trusted browser to enter credentials rather than an embedded app that is phishing there authentication credentials.

The other advantage is that if there are multiple apps the browser can maintain session state across provisioning tokens for multiple apps with a single login.

Can the app embed a browser?  YEs it is easy, but it trains the user to do the wrong thing with untreated apps.

John B.
On 2012-04-20, at 12:11 AM, Lewis Adam-CAL022 wrote:

> Hi Paul,
>  
> So by saying ‘more easily’ then there is nothing really inherently preventing a native implementation from making the HTTP calls to the AS directly, right?
>  
> My use cases are a bit atypical from the web service driven models that you guys are solving, but I think the technology should still fit.  The RS that my native client is talking to is *not* a web service (I realize I’m not outside the bounds of OAuth-proper here).  But it’s easy enough for me to use OAuth to get an access-token and include that in my message between my native client and my (non-web service) RS.  My RS can still introspect it against an OAuth STS.
>  
> These native apps I’m speaking of, I’m attempting to retrofit with OAuth, and today they already have native interfaces for accepting a user’s logon and credentials … to pop a web browser would not be intuitive to my customer base. 
>  
> I don’t see any reason I can’t implement this native within my client, just want to be sure since the browser trick is such a prominent trend, I want to be sure that there’s no gotcha I haven’t thought of. 
>  
> Tx!
> adam
>  
> From: Paul Madsen [mailto:paul.madsen@gmail.com] 
> Sent: Thursday, April 19, 2012 5:03 PM
> To: Lewis Adam-CAL022; jricher@mitre.org
> Cc: oauth@ietf.org
> Subject: Re: [OAUTH-WG] Using OAuth to get a JWT/SAML token
>  
> Using the browser as part of the AS interaction allows you to more easily collect the users consent. 
>  
> Once you get the tokens based on that consent, everything is 'RESTful'
> 
> 
> 
> -------- Original message --------
> Subject: Re: [OAUTH-WG] Using OAuth to get a JWT/SAML token
> From: Lewis Adam-CAL022 <Adam.Lewis@motorolasolutions.com>
> To: Justin Richer <jricher@mitre.org>
> CC: Re: [OAUTH-WG] Using OAuth to get a JWT/SAML token
> 
> 
> Hi Justin,
>  
> There is one thing I have not understood about the whole external browser vs. embedded browser guidance … and that is, why is *any* browser needed?  Java for example has an HTTP library, and OAuth is RESTful.  So why is it necessary to require the web browser at all, whether external or embedded?  Why can’t my native client make RESTful API calls to the AS and RS natively?
>  
> Tx!
> adam
>  
> From: Justin Richer [mailto:jricher@mitre.org] 
> Sent: Friday, April 13, 2012 11:38 AM
> To: Lewis Adam-CAL022
> Cc: oauth@ietf.org
> Subject: Re: [OAUTH-WG] Using OAuth to get a JWT/SAML token
>  
> If the mobile device has a web browser (such as a smart phone), then this is pretty easy, and you've got a couple of options.
> 
> One of the best options when the token is on behalf of an end user is, in my opinion, to use the authorization code flow like this: First, register what's called a "public client" with your server -- so you'll get an ID but not a client secret. With that client ID, register a custom-scheme callback URI, like "myapp://oauthcallback", and register your app on the device as the handler for "myapp". 
> 
> In your application, to start things off, you fire off a web browser to the authorization server's authorization endpoint. The user logs in to the authorization server through the web browser, approves this copy of your app, and gets redirected to "myapp://oauthcallback?code=basdf132". Your app grabs the "myapp://" url and plucks the authorization code off the end of it. Your app then takes that code and sends it in the background to the token endpoint to exchange for a token. 
> 
> Some key points: 
> 
> 1) You need to have access to a web browser on the platform, and it's considered best practice to push the user to the external browser application on the platform instead of embedding one. There are a couple paragraphs in the spec's security considerations section that talk about this.
> 2) Your app is "public" because you can't publish it with a secret at configuration time. It can, however, keep the tokens secret at runtime.
> 3) You need to be very careful with how you store the tokens on the device -- they need to be in a trusted space where other apps on the device can't sniff them out.
> 4) Another app can try to register "myapp://" and intercept your code on the way through, so make sure your codes are all one time use and short lived.
> 
> None of this is just theoretically possible, people are doing it today. What libraries and stuff you'd be after depends wholly on your platform (both server and client side). 
> 
>  -- Justin
> 
> On 04/12/2012 03:01 PM, Lewis Adam-CAL022 wrote:
> Hi all,
>  
> I’ve been talking to some of you off line about this already, but I need some help in terms of implementation.  I would like to use OAuth as a means to get either a JWT or SAML token to a client running on a handheld device.  This is something that I’m looking to prototype (as part of a larger project) beginning this week.  So, it is important to me to understand the divide between what is theoretically possible and what is actually possible.
>  
> Anybody aware of any implementations out there, either vendor or open source, that I can use for this?
>  
> Tx!
> adam
> 
> 
> 
> 
> _______________________________________________
> 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