Re: [OAUTH-WG] Working Group Last Call on OAuth 2.0 Discovery

"Phil Hunt (IDM)" <phil.hunt@oracle.com> Fri, 11 March 2016 15:13 UTC

Return-Path: <phil.hunt@oracle.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 590FF12D74F for <oauth@ietfa.amsl.com>; Fri, 11 Mar 2016 07:13:13 -0800 (PST)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -2.212
X-Spam-Level:
X-Spam-Status: No, score=-2.212 tagged_above=-999 required=5 tests=[BAYES_00=-1.9, HTML_MESSAGE=0.001, HTTPS_HTTP_MISMATCH=1.989, MIME_QP_LONG_LINE=0.001, RCVD_IN_DNSWL_MED=-2.3, RCVD_IN_MSPIKE_H2=-0.001, RP_MATCHES_RCVD=-0.001, SPF_PASS=-0.001] autolearn=ham autolearn_force=no
Received: from mail.ietf.org ([4.31.198.44]) by localhost (ietfa.amsl.com [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id l-TsGaAeGa-n for <oauth@ietfa.amsl.com>; Fri, 11 Mar 2016 07:13:10 -0800 (PST)
Received: from aserp1040.oracle.com (aserp1040.oracle.com [141.146.126.69]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ietfa.amsl.com (Postfix) with ESMTPS id 8C65E12D7A5 for <oauth@ietf.org>; Fri, 11 Mar 2016 07:13:09 -0800 (PST)
Received: from userv0022.oracle.com (userv0022.oracle.com [156.151.31.74]) by aserp1040.oracle.com (Sentrion-MTA-4.3.2/Sentrion-MTA-4.3.2) with ESMTP id u2BFD4R5031972 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Fri, 11 Mar 2016 15:13:04 GMT
Received: from userv0121.oracle.com (userv0121.oracle.com [156.151.31.72]) by userv0022.oracle.com (8.14.4/8.13.8) with ESMTP id u2BFD3uN028320 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=FAIL); Fri, 11 Mar 2016 15:13:03 GMT
Received: from abhmp0002.oracle.com (abhmp0002.oracle.com [141.146.116.8]) by userv0121.oracle.com (8.13.8/8.13.8) with ESMTP id u2BFD3Gu003629; Fri, 11 Mar 2016 15:13:03 GMT
Received: from [192.168.1.23] (/174.7.250.104) by default (Oracle Beehive Gateway v4.0) with ESMTP ; Fri, 11 Mar 2016 07:13:02 -0800
Content-Type: multipart/alternative; boundary="Apple-Mail-BB61F413-A765-4D98-B2F6-7AD007E16BBB"
Mime-Version: 1.0 (1.0)
From: "Phil Hunt (IDM)" <phil.hunt@oracle.com>
X-Mailer: iPhone Mail (13D20)
In-Reply-To: <A3114947-499A-4B79-924E-D65E466B3466@ve7jtb.com>
Date: Fri, 11 Mar 2016 07:13:00 -0800
Content-Transfer-Encoding: 7bit
Message-Id: <091CB09C-1552-4777-ABF1-5E50DBC45437@oracle.com>
References: <56C5C9D5.6040703@gmx.net> <D5D8B85B-68E6-4E88-89F7-88E6851381E4@adm.umu.se> <CA+k3eCQOX6DgiJFp4b0A8R0boVQxVwGJP2-dY8_TbrCpJowOtw@mail.gmail.com> <56E19B6D.6060509@connect2id.com> <64D743EA-3F8D-403B-B05E-74539124A847@oracle.com> <CABzCy2D0P0NZW573g6NG3yYtbdVBifio=4hZi4QkYc3EKxOV5Q@mail.gmail.com> <BN3PR0301MB1234BFC8070FAC8CD5B3135FA6B50@BN3PR0301MB1234.namprd03.prod.outlook.com> <A3114947-499A-4B79-924E-D65E466B3466@ve7jtb.com>
To: John Bradley <ve7jtb@ve7jtb.com>
X-Source-IP: userv0022.oracle.com [156.151.31.74]
Archived-At: <http://mailarchive.ietf.org/arch/msg/oauth/d31QzVi88ywRzNcOmno_vJ6BVpw>
Cc: oauth <oauth@ietf.org>
Subject: Re: [OAUTH-WG] Working Group Last Call on OAuth 2.0 Discovery
X-BeenThere: oauth@ietf.org
X-Mailman-Version: 2.1.17
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: <https://mailarchive.ietf.org/arch/browse/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: Fri, 11 Mar 2016 15:13:13 -0000

John

In many case all the AS has to check is the domain name component to check for mitm. 

POP and the other solns are dramatically more complex than a simple check. 

I see it as part of the discovery(bad name aside) problem because we discussed that if a client finds app.example.com how do we ensure it gets a complete set of oauth endpoints as a valid set of endpoints--that a hacker has not inserted one of their own endpoints. The most important endpoint to get right is ensuring the resource server (and optionally the path) is the correct one. We can't really define resource discovery but we can validate it to some degree. 

I am not stuck on webfinger or well-known. Because this is config maybe it should be an oauth endpoint. 

Phil

> On Mar 11, 2016, at 06:51, John Bradley <ve7jtb@ve7jtb.com> wrote:
> 
> I think Phil is proposing something different.   Should the client send a token from this AS to that RS.  
> 
> His goal is to prevent man in the middle attacks where a bad RS gets a AT that is audianced to/accepted by another RS.
> 
> That is separate from the question of if a RS accepts tokens from a good AS.   A bad AS would always say yes.
> 
> We need to be careful of what if anything the RS provides to the client as meta-data without validation.
> 
> Currently the client can provide a list of scopes required to get access.   I personally feel it would be useful to also include in the unauthenticated error response an indication of what API the resource supports.  Say “scim2” as an example.   I don’t think adding that is however a high priority as most if all clients know what API they expect.   It might be useful if at some point in the future if a client were to be given a RS URI it could check to see if it is a protocol that it supports before bothering with OAuth.    I expect that a lot of people will want that left to the API definition.   I think we can talk about it but rate this low priority.
> 
> I agree that the RS giving out a list of AS that it trusts is a generally bad idea.  I hope that is not on the table.
> 
> I don’t think that preventing a client from sending a token to the wrong RS is part of a AS meta-data discovery problem.
> 
> I do however think that it is important.
> 
> We have been discussing this as a separate problem to AS meta-data discovery where the endpoints of the AS and it’s configuration are discovery.   Sorry for perhaps stating the obvious, but the RS is explicitly not part of the AS in OAuth 2.   Starting in WAP that was a core principal.
> 
> So we have a number of options to address the RS token leakage via MiTM attacks.
> 
> 1) PoP bound tokens.  If they are bound to the TLS channel by mutual TLS or Token binding they cannot be replayed.  Signed messages where the signing covers the RS Host and path components,  also would work.
> 
> 2) Have the AS audience restrict the resources the AT is good at. (AT should be doing that now) 
> In the token response include the list of audience/s the token is presentable at.  The client would throw an error if the RS it intends to send the token to is not on the list.   The RS the token is good at might change based on scopes, client_id and resource owner.   This is the place where all of that comes together.   In some cases the RS and AS might not have a pre-established relationship.   The client should send the RS base URI to the AS as part of the request.  The AS can use that to audience restrict the AT and issue the AT or refuse to issue the AT based on policy.
> It can also use the audience in the request to down audience the AT if the default is to have multiple audiences.    We may want to use a term other than audience for this like resource or destination.  It is a audience but that term might confuse people with AT.
> 
> We did talk about breaking audience out of POP key distribution, and Brian Campbell did a draft https://tools.ietf.org/html/draft-campbell-oauth-dst4jwt.   
> 
> To do this we could take dst4jwt and add another spec that adds a new dst parameter to the token and authorization endpoints requests That would be a space separated list of dst values.  and in the response from the token endpoint would be a JSON array of dst values.
> 
> 3) Have the AS always return all the list of all RS the token can be used at (basically Nat's link relationship proposal).  It needs a way to handle 
> down destinationing of AT and to allow for un-configured RS that it might issue a token for.  So could be combined with dst from 2.  Basically returning the acceptable destinations as link headers vs JS in the response is mostly a style issue that other people can bike shed.
> 
> 
> 4) Trying to add all the RS to the AS discovery document.  This seems impractical as there would be multiple protocols and doesn’t address un-configured RS.
> 
> 5) Some new AS endpoint that the client could introspect the RS URI and get back metadata about if the client should send tokens there.
>     A couple of problems with this.  The first is that it would not support un-configured RS unless you add dst to the token and authorization endpoints.   The other is that the introspection endpoint doesn’t have the context of the RO and client_id unless you also pass the code/RT and client_id, and probably client credentials.    Basically this is trying to introspect the AT to determine the audiance/dst.   By the time you build a new introspection endpoint securely it is going to look like the token endpoint with a bit more meta data about the token beyond expiry and scopes.
> 
> 
> I think we should go a head with the renamed "OAuth 2.0 Authorization Server Discovery Metadata” 
> I am also fine with making the default document 'openid-configuration’  as long as we allow for protocol specific variation so that SCIM2 could define a file name.    If people want we could do a API  to file name registry so that protocol specific ones can be defined.
> 
> We are all-ready working on option 1 to secure AT, we need a spec like I propose in 2 for bearer tokens.  We can add one request parameter and a bit more token meta-data to the token response and that takes care of the problem.   Honestly we probably should have separated scope and destination in the first place and returned both dst and scope in the response all along, so this is update that is consistent with the eisting architecture of OAuth 2.
> 
> Lets keep the two issues separate.
> 
> John B.
>  
> 
> 
> 
>> On Mar 11, 2016, at 12:07 AM, Anthony Nadalin <tonynad@microsoft.com> wrote:
>> 
>> The relationship between AS and RS need to be scoped to “does this RS accept tokens from this AS” as a list is too much information that could be used in the wrong way
>>  
>> From: OAuth [mailto:oauth-bounces@ietf.org] On Behalf Of Nat Sakimura
>> Sent: Thursday, March 10, 2016 6:25 PM
>> To: Phil Hunt (IDM) <phil.hunt@oracle.com>
>> Cc: oauth <oauth@ietf.org>
>> Subject: Re: [OAUTH-WG] Working Group Last Call on OAuth 2.0 Discovery
>>  
>> Phil, 
>>  
>> Right. So what my conditional approvals (11 conditions in total) said was to drop the word "discovery" from everywhere. This is not a discovery spec. This is a configuration lookup spec as you correctly points out. So, I am with you here. 
>>  
>> Also, my 2nd conditiion is essentially saying to drop section 3. 
>>  
>> One thing that I overlooked and am with you is that we need to be able to express the AS-RS relationships. I have been preaching this in the other thread for so many times as you know so I thought I pointed it out, but missed apparently in my previous comment. So, I would add my 12th condition: 
>>  
>> 12. A way to express a list of valid RSs for this AS needs to be added to section 2. 
>>  
>> Best, 
>>  
>> Nat
>>  
>> 2016-03-11 2:09 GMT+09:00 Phil Hunt (IDM) <phil.hunt@oracle.com>:
>> I strongly oppose. 2 major issues. 
>>  
>> This is not service discovery this is configuration lookup. The client must have already discovered the oauth issuer uri and the resource uri. 
>>  
>> The objective was to provide a method to ensure the client has a valid set of endpoints to prevent mitm of endpoints like the token endpoint to the resource server. 
>>  
>> The draft does not address the issue of a client being given a bad endpoint for an rs. What we end up with is a promiscuous authz service giving out tokens to an unwitting client. 
>> 
>> Phil
>> 
>> On Mar 10, 2016, at 08:06, Vladimir Dzhuvinov <vladimir@connect2id.com> wrote:
>> 
>> +1 to move forward with these
>> 
>> On 10/03/16 17:35, Brian Campbell wrote:
>> +1
>>  
>> On Thu, Mar 10, 2016 at 6:04 AM, Roland Hedberg <roland.hedberg@umu.se>
>> wrote:
>>  
>> I support this document being moved forward with these two changes:
>>  
>> - change name to “OAuth 2.0 Authorization Server Discovery Metadata” as
>> proposed by Brian and
>> - use the URI path suffix ’oauth-authorization-server’ instead of
>> ’openid-configuration’ as proposed by Justin.
>>  
>> 18 feb 2016 kl. 14:40 skrev Hannes Tschofenig <hannes.tschofenig@gmx.net
>> :
>>  
>> Hi all,
>>  
>> This is a Last Call for comments on the  OAuth 2.0 Discovery
>> specification:
>> https://tools.ietf.org/html/draft-ietf-oauth-discovery-01
>>  
>> Since this document was only adopted recently we are running this last
>> call for **3 weeks**.
>>  
>> Please have your comments in no later than March 10th.
>>  
>> Ciao
>> Hannes & Derek
>>  
>> _______________________________________________
>> OAuth mailing list
>> OAuth@ietf.org
>> https://www.ietf.org/mailman/listinfo/oauth
>> — Roland
>>  
>> ”Everybody should be quiet near a little stream and listen."
>> >From ’Open House for Butterflies’ by Ruth Krauss
>>  
>>  
>> _______________________________________________
>> 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
>> 
>> _______________________________________________
>> OAuth mailing list
>> OAuth@ietf.org
>> https://www.ietf.org/mailman/listinfo/oauth
>> 
>> 
>> 
>>  
>> -- 
>> Nat Sakimura (=nat)
>> Chairman, OpenID Foundation
>> http://nat.sakimura.org/
>> @_nat_en
>> _______________________________________________
>> OAuth mailing list
>> OAuth@ietf.org
>> https://www.ietf.org/mailman/listinfo/oauth
>