Re: [OAUTH-WG] Auth Server / Resource Server Coordination

Ofer Nave <odigity@gmail.com> Tue, 13 October 2015 13:49 UTC

Return-Path: <odigity@gmail.com>
X-Original-To: oauth@ietfa.amsl.com
Delivered-To: oauth@ietfa.amsl.com
Received: from localhost (ietfa.amsl.com [127.0.0.1]) by ietfa.amsl.com (Postfix) with ESMTP id 058161B3F24 for <oauth@ietfa.amsl.com>; Tue, 13 Oct 2015 06:49:17 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -1.999
X-Spam-Level:
X-Spam-Status: No, score=-1.999 tagged_above=-999 required=5 tests=[BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, FREEMAIL_FROM=0.001, HTML_MESSAGE=0.001, SPF_PASS=-0.001] autolearn=ham
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 mUJlDVmCHuhE for <oauth@ietfa.amsl.com>; Tue, 13 Oct 2015 06:49:14 -0700 (PDT)
Received: from mail-wi0-x235.google.com (mail-wi0-x235.google.com [IPv6:2a00:1450:400c:c05::235]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by ietfa.amsl.com (Postfix) with ESMTPS id 2C9DC1B3F20 for <oauth@ietf.org>; Tue, 13 Oct 2015 06:49:14 -0700 (PDT)
Received: by wicgb1 with SMTP id gb1so189883825wic.1 for <oauth@ietf.org>; Tue, 13 Oct 2015 06:49:12 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type; bh=DleInM4GFw95MaWqa3yLkvI+ktdRBUUxv5guZqlPyco=; b=hhYYT/ZxxgS/NAQLm4nLHarupgtCzoB/4fFK97VhlAy7kj5/3bbYdULR3LFYp15HJq uWvS805Yiq34LYfWOK4qDdzmwKmZ8eDFERCMBD/PRM35fs7tXNwsl1dclmo9SqiO436I IbzuQEwF2gvnKJM/yZD9nLh01WSCfGt0FCBlIaRelIma0Ah3Czb9o6MUz1TE6pqH65wv 8FXk9LAY/aS0zJG6oPL6GFNeY8MvMA8U9/tCYsZGrh2Hh2naUNeBujgtPZCqOwPBpp5P bO2u3JlNJ/6Klj2XSkZqifKjlLcWS5B144NRmMvJANDO34nvN6GqtAb98xRNHVtxDCZa VlZw==
MIME-Version: 1.0
X-Received: by 10.194.2.243 with SMTP id 19mr35835361wjx.140.1444744126555; Tue, 13 Oct 2015 06:48:46 -0700 (PDT)
Received: by 10.27.125.70 with HTTP; Tue, 13 Oct 2015 06:48:46 -0700 (PDT)
In-Reply-To: <CAEayHEM=nHk9TbTFno+7otwNry++cYGcGcGuNM7mi19gE5KjcA@mail.gmail.com>
References: <CABPN19_wYVEvqEU85FDZMYe6k8E8qkL0gGDvFeQMXaaQt+yAbQ@mail.gmail.com> <CAEayHEM=nHk9TbTFno+7otwNry++cYGcGcGuNM7mi19gE5KjcA@mail.gmail.com>
Date: Tue, 13 Oct 2015 09:48:46 -0400
Message-ID: <CABPN199DNeE-wSx+0wqAALSRrxGDHOYH7QyHK+GzZ=kJ9UxbJQ@mail.gmail.com>
From: Ofer Nave <odigity@gmail.com>
To: Thomas Broyer <t.broyer@gmail.com>
Content-Type: multipart/alternative; boundary="047d7b3a86bc7475260521fcb462"
Archived-At: <http://mailarchive.ietf.org/arch/msg/oauth/1oodumcjecf7iWScC2Jp_iHZExs>
Cc: "<oauth@ietf.org>" <oauth@ietf.org>
Subject: Re: [OAUTH-WG] Auth Server / Resource Server Coordination
X-BeenThere: oauth@ietf.org
X-Mailman-Version: 2.1.15
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: Tue, 13 Oct 2015 13:49:17 -0000

> One advantage of requiring introspection is the easy support of
revocation without having to create a specific API to check whether a token
is revoked: you just introspect the token and directly know whether the
token is valid or not, and if it's valid you get its details (and have the
RS cache the response for a few seconds/minutes to avoid overloading the
introspection endpoint). That being said, RS knowing the tokens are JWTs
allows them to reject invalid tokens (expired, invalid signature,
unexpected issuer, etc.) without the need to check for revocation at the AS.

It did occur to me that if I make the AT self-contained, then RO-initiated
scope revocation wouldn't take affect until the next time a new AT is
requested using the RT (when the old AT expires), which I was going to set
to 30m to prevent swamping the token endpoint (which would happen if RS's
had to call me to validate the AT every time).

Now that I know about these extra specs, I'm tempted to implement both
(self-contained ATs *and* an introspection endpoint), and see what the
adopters decide to do.

> Either a Web UI, or an API <
https://tools.ietf.org/html/draft-hardjono-oauth-resource-reg-06> (I'm not
a fan of this draft, and it incidentally violates IETF's BCP190
https://tools.ietf.org/html/bcp190, but I think it's a good source of
inspiration)

What don't you like about it?  And can I mitigate the factors you're
concerned about in my decision-making process without violating the draft
spec?

-ofer

On Tue, Oct 13, 2015 at 5:10 AM, Thomas Broyer <t.broyer@gmail.com> wrote:

>
>
> On Tue, Oct 13, 2015 at 6:14 AM Ofer Nave <odigity@gmail.com> wrote:
>
>> I know the OAuth 2.0 RFC doesn't specify any standards for coordination
>> between the Authorization Server and the Resource Server, as it's generally
>> assumed that both will be owned or operated by the same entity.
>>
>> However, I'm building an OAuth 2.0 Auth Server, and I'd like to add a
>> feature to make it easy for other API developers to delegate to me the
>> responsibility of handling the auth grant process and issuing access tokens.
>>
>> It seems to me that a simple version of this could be easily done by:
>>
>> 1) Defining an Access Token format that contains within it everything a
>> Resource Server will need to validate it and determine the level of access
>> granted (list of scopes, expiration datetime, HMAC signature using a shared
>> secret).
>>
>
> Either that (and I'd use JWT then, as already proposed) or have resource
> servers introspect tokens <
> https://tools.ietf.org/html/draft-ietf-oauth-introspection-11> (the
> latter doesn't preclude the former, but the format of the token is then
> just an implementation detail of the AS that the RS doesn't need to know).
> One advantage of requiring introspection is the easy support of revocation
> without having to create a specific API to check whether a token is
> revoked: you just introspect the token and directly know whether the token
> is valid or not, and if it's valid you get its details (and have the RS
> cache the response for a few seconds/minutes to avoid overloading the
> introspection endpoint). That being said, RS knowing the tokens are JWTs
> allows them to reject invalid tokens (expired, invalid signature,
> unexpected issuer, etc.) without the need to check for revocation at the AS.
>
>
>> 2) Providing a means (basic web UI) for Resource Server owners to
>> register a set of scopes for their service, along with user-understandable
>> descriptions of each to display when they arrive at my Authorization
>> Endpoint.
>>
>
> Either a Web UI, or an API <
> https://tools.ietf.org/html/draft-hardjono-oauth-resource-reg-06> (I'm
> not a fan of this draft, and it incidentally violates IETF's BCP190
> https://tools.ietf.org/html/bcp190, but I think it's a good source of
> inspiration)
>