Re: [OAUTH-WG] Registration: Scope Values

Mike Jones <Michael.Jones@microsoft.com> Fri, 12 April 2013 18:46 UTC

Return-Path: <Michael.Jones@microsoft.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 6BEDE21F8E87 for <oauth@ietfa.amsl.com>; Fri, 12 Apr 2013 11:46:48 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -2.598
X-Spam-Level:
X-Spam-Status: No, score=-2.598 tagged_above=-999 required=5 tests=[BAYES_00=-2.599, HTML_MESSAGE=0.001]
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 v98VL4bcMYeF for <oauth@ietfa.amsl.com>; Fri, 12 Apr 2013 11:46:47 -0700 (PDT)
Received: from na01-by2-obe.outbound.protection.outlook.com (mail-by2lp0242.outbound.protection.outlook.com [207.46.163.242]) by ietfa.amsl.com (Postfix) with ESMTP id 4B18621F8E79 for <oauth@ietf.org>; Fri, 12 Apr 2013 11:46:47 -0700 (PDT)
Received: from BY2FFO11FD011.protection.gbl (10.1.15.201) by BY2FFO11HUB036.protection.gbl (10.1.14.179) with Microsoft SMTP Server (TLS) id 15.0.664.0; Fri, 12 Apr 2013 18:47:18 +0000
Received: from TK5EX14MLTC104.redmond.corp.microsoft.com (131.107.125.37) by BY2FFO11FD011.mail.protection.outlook.com (10.1.14.129) with Microsoft SMTP Server (TLS) id 15.0.664.0 via Frontend Transport; Fri, 12 Apr 2013 18:46:45 +0000
Received: from TK5EX14MBXC283.redmond.corp.microsoft.com ([169.254.2.224]) by TK5EX14MLTC104.redmond.corp.microsoft.com ([157.54.79.159]) with mapi id 14.02.0318.003; Fri, 12 Apr 2013 18:46:29 +0000
From: Mike Jones <Michael.Jones@microsoft.com>
To: Tim Bray <twbray@google.com>, Justin Richer <jricher@mitre.org>
Thread-Topic: [OAUTH-WG] Registration: Scope Values
Thread-Index: AQHON6sV5AOCpr9wLEyFt+RPKbMBMpjS6IWAgAABiQA=
Date: Fri, 12 Apr 2013 18:46:28 +0000
Message-ID: <4E1F6AAD24975D4BA5B168042967394367619C97@TK5EX14MBXC283.redmond.corp.microsoft.com>
References: <51685177.8060603@mitre.org> <CA+ZpN24B2ZouMFYqRE4ST6qCP6SeTRabBm6xBsjoUHgr+r+Jrw@mail.gmail.com>
In-Reply-To: <CA+ZpN24B2ZouMFYqRE4ST6qCP6SeTRabBm6xBsjoUHgr+r+Jrw@mail.gmail.com>
Accept-Language: en-US
Content-Language: en-US
X-MS-Has-Attach:
X-MS-TNEF-Correlator:
x-originating-ip: [157.54.51.35]
Content-Type: multipart/alternative; boundary="_000_4E1F6AAD24975D4BA5B168042967394367619C97TK5EX14MBXC283r_"
MIME-Version: 1.0
X-Forefront-Antispam-Report: CIP:131.107.125.37; CTRY:US; IPV:CAL; IPV:NLI; EFV:NLI; SFV:NSPM; SFS:(199002)(189002)(47736001)(65816001)(512874001)(20776003)(44976002)(47446002)(76482001)(66066001)(18277545001)(77982001)(54316002)(59766001)(81542001)(74662001)(54356001)(55846006)(4396001)(56816002)(71186001)(50986001)(47976001)(69226001)(51856001)(33656001)(18276755001)(53806001)(49866001)(564824004)(46102001)(81342001)(63696002)(79102001)(74502001)(80022001)(56776001)(16406001)(31966008); DIR:OUT; SFP:; SCL:1; SRVR:BY2FFO11HUB036; H:TK5EX14MLTC104.redmond.corp.microsoft.com; RD:InfoDomainNonexistent; A:1; MX:1; LANG:en;
X-OriginatorOrg: microsoft.onmicrosoft.com
X-Forefront-PRVS: 0814A2C7A3
Cc: "oauth@ietf.org" <oauth@ietf.org>
Subject: Re: [OAUTH-WG] Registration: Scope Values
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: Fri, 12 Apr 2013 18:46:48 -0000

Tim, if you look at the scope examples in http://tools.ietf.org/html/rfc6750#section-3, you’ll see that one of them, from the Open Authentication Technology Committee (OATC) Online Multimedia Authorization Protocol [OMAP], does use non-static scope values to convey parameters:
scope="urn:example:channel=HBO&urn:example:rating=G,PG-13"

Also, if you look at the OAuth usage survey results collected during IETF 86 in http://self-issued.info/misc/OAuth%20Feature%20Matrix%20-%20All.xlsx (cell G145), you’ll see that the OpenESPI “Smart Grid” specs also use scope values to convey structured information.

The horse has left the barn on requiring scope values to be static strings.  RFC 6749 didn’t do it and lots of implementations are conveying structured information there.  As Justin is bringing up, the OAuth Registration spec shouldn’t do anything to preclude this usage.

                                                            Cheers,
                                                            -- Mike

From: oauth-bounces@ietf.org [mailto:oauth-bounces@ietf.org] On Behalf Of Tim Bray
Sent: Friday, April 12, 2013 11:31 AM
To: Justin Richer
Cc: oauth@ietf.org
Subject: Re: [OAUTH-WG] Registration: Scope Values

Speaking for myself, I have considerable concern about Turing-complete programming languages starting to emerge inside scope strings, which I think is probably a symptom of bad engineering.  I really like the idea of specifying the scopes you’re going to ask for at registration time, and if that also gets in the way of what I’ll call “scope creep” (snicker), that feels like a feature not a bug.  Anyhow, in practical terms, I can’t see how you could extend this specify-at-registration-time feature much without stepping on a very slippery complexity slope.

-T

On Fri, Apr 12, 2013 at 11:24 AM, Justin Richer <jricher@mitre.org<mailto:jricher@mitre.org>> wrote:
Currently, the Dynamic Registration draft defines a "scope" value as part of the client metadata table, with the following definition:

   scope

      OPTIONAL.  Space separated list of scope values (as described in

      OAuth 2.0 Section 3.3 [RFC6749]<http://tools.ietf.org/html/rfc6749#section-3.3>) that the client is declaring that

      it may use when requesting access tokens.  If omitted, an

      Authorization Server MAY register a Client with a default set of

      scopes.

The idea here is that a client can request a particular set of available scopes from the AS (analogous as to what's available from many/most manual registration pages today), and the AS can communicate back to the client what scopes it's allowed to ask for at authz time. In a strictly-enforced implementation, the client wouldn't be able to ask for any scopes that it wasn't registered for in the first place.

However, it's been brought up in some side conversations that the language as found in the DynReg spec might get in the way of people using the "scope" field as an expression language. That is to say, you could have a scope like "send_email_to:myaddress@email.com"<mailto:send_email_to:myaddress@email.com> where the email address portion is variable, or something like "read:*" which stands in for any scopes starting with "read:" like "read:profile", "read:lists", etc. Precluding this behavior wasn't my intent, and a liberal interpretation of the text as-written would (I believe) lead to this being perfectly OK. Namely:

Client requests and is granted a service specific scope value like "send_email_to" in registration. At runtime, the client knows how to turn "send_email_to" into "send_email_to:myaddress@email.com"<mailto:send_email_to:myaddress@email.com>, and the AS knows that a client that's been granted "send_email_to" can ask for "send_email_to:myaddress@email.com"<mailto:send_email_to:myaddress@email.com>. The fact that "send_email_to" expands into an expression language is something specific to the service, and I personally think it's up to the service to document "register for this" and "ask for this at authn time" for clients, since this is all part of the API more than it is part of the underlying OAuth protocol. OAuth merely provides a handy place to communicate these values in an interoperable way, the values themselves aren't intended to be interoperable.


But my question to the group is simple: how can we rework the "scope" metadata claim such that it works in both the simple "bag of discreet strings" approach to scope as well as the "list of expressions" approach? Does the language need to change at all?

 -- Justin

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