Re: [OAUTH-WG] Tenancy in OAuth

Vladimir Dzhuvinov <vladimir@connect2id.com> Tue, 12 January 2021 22:10 UTC

Return-Path: <vladimir@connect2id.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 758843A12BC for <oauth@ietfa.amsl.com>; Tue, 12 Jan 2021 14:10:06 -0800 (PST)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -2.159
X-Spam-Level:
X-Spam-Status: No, score=-2.159 tagged_above=-999 required=5 tests=[BAYES_00=-1.9, HTML_MESSAGE=0.001, NICE_REPLY_A=-0.262, RCVD_IN_MSPIKE_H2=-0.001, SPF_HELO_NONE=0.001, SPF_NONE=0.001, URIBL_BLOCKED=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 mRexQXAa8h6t for <oauth@ietfa.amsl.com>; Tue, 12 Jan 2021 14:10:04 -0800 (PST)
Received: from p3plsmtpa11-09.prod.phx3.secureserver.net (p3plsmtpa11-09.prod.phx3.secureserver.net [68.178.252.110]) (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 624063A12BB for <oauth@ietf.org>; Tue, 12 Jan 2021 14:10:04 -0800 (PST)
Received: from [192.168.88.250] ([94.155.17.31]) by :SMTPAUTH: with ESMTPSA id zRrWkFchYq3RjzRrWkbVYL; Tue, 12 Jan 2021 15:10:03 -0700
X-CMAE-Analysis: v=2.4 cv=KJufsHJo c=1 sm=1 tr=0 ts=5ffe1e3b a=+I3yL00+yDwT8KNLgfs+4A==:117 a=+I3yL00+yDwT8KNLgfs+4A==:17 a=q0rX5H01Qin5IyBaTmIA:9 a=r77TgQKjGQsHNAKrUKIA:9 a=48vgC7mUAAAA:8 a=OPE_keaqAAAA:8 a=_hUQx-6YfCI2_Z5dKvIA:9 a=QEXdDO2ut3YA:10 a=LSZRARl4ZZNvyWOSxHQA:9 a=v5XpdSk_JC5CTb9n:21 a=_W_S_7VecoQA:10 a=D8lnhvtxf0AONpHuB7QA:9 a=ZVk8-NSrHBgA:10 a=30ssDGKg3p0A:10 a=w1C3t2QeGrPiZgrLijVG:22 a=L47nHB812nP-ulAiFgtB:22
X-SECURESERVER-ACCT: vladimir@connect2id.com
To: oauth@ietf.org
References: <A643E85A-B4B0-437B-AB76-80BF3F795983@mendix.com> <E3DE5ED2-7506-4090-A32A-F3D4AE797DF5@mit.edu>
From: Vladimir Dzhuvinov <vladimir@connect2id.com>
Autocrypt: addr=vladimir@connect2id.com; prefer-encrypt=mutual; keydata= mQENBFQZaoEBCACnP2YMDex9fnf+niLglTHGKuoypUSVKPQeKDHHeFQVzhRke+HBEZBwmA9T kZ+kEhyrNqibDPkPYVPmo23tM8mbNcTVQqpmN7NwgMpqkqcAqNsIyBtt09DjWOQVm57A3K+y uXI7SdNErdt79p2xQseOhqSC9+LgWuyh+mZsl2oFD4glFFfKSCMp2jATXrAMeGzigTnW+Xe0 tRzrwFN9zqykKxhUq9oHg1cNvoDtfxgsc9ysVHbxM/PM8o9lgj3YTQwKMBcCFclTqohji7ML fQ08eQo+acKTwC1WRzeLt9PknGt3C4TmvdCl0c1BQTTTNiF96Hu4kbaiBIbsfxJOR8+VABEB AAG0LFZsYWRpbWlyIER6aHV2aW5vdiA8dmxhZGltaXJAY29ubmVjdDJpZC5jb20+iQE+BBMB AgAoBQJUGWqBAhsjBQkJZgGABgsJCAcDAgYVCAIJCgsEFgIDAQIeAQIXgAAKCRAZ0vUyOqri Ql62B/wOO0s2JC/QvO6w9iSsRhCOa/JZi+wO+l01V7eGCQ1cYf1W26Y7iKiUlY4/Kz+cr69D pMtkv3UpDTGejKEfspLUxz5Vo3T4oAKbTtNtVIZL/XxH3/JhJ719Jj4eLoe9/djKkGYTX2O5 bMk8TpO1DDjbIw4r9XKI9ZIk96zlKnZvrg7Ho7oOl0ZIf8AzcvdqZEUogDwyr8uwOU+jIyux mOTthepBzXCNjjBjnc8I1//9YppAIaGJ5nnXelVVD1/dyOszogervzFNANEIOvNvCd9G5u4e s7qkDKWKY7/Lj1tF+tMrDTrOh6JqUKbGNeTUB8DlPvIoNyqHUYfBELdpw1Nd
X-Enigmail-Draft-Status: N11100
Organization: Connect2id Ltd.
Message-ID: <cc41517f-f732-0d6f-95f3-64bb7fcdf24e@connect2id.com>
Date: Wed, 13 Jan 2021 00:10:01 +0200
User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.10.0
MIME-Version: 1.0
In-Reply-To: <E3DE5ED2-7506-4090-A32A-F3D4AE797DF5@mit.edu>
Content-Type: multipart/signed; protocol="application/pkcs7-signature"; micalg="sha-256"; boundary="------------ms030404030505020500030307"
X-CMAE-Envelope: MS4xfFwkBHuq388EBNVZxsjsItQMgc/bOTaDEzlzY1EQKQoxJtVk8/GuesasHdPsxCnwNdkpS3+RLwQzGm/mBcKsIsaLHdhwMWFXpNtSUyTcgY98c9p/ap1U Geth+/FUees2Ij1/+86AhUHVrR5B0VXcNwRPGkljp2sDo8A5xEXypHPT0MFTYf56Uht6uXJ+BAgeoA==
Archived-At: <https://mailarchive.ietf.org/arch/msg/oauth/ciP0FbSjjeYgcew4FQY33qA4nb8>
Subject: Re: [OAUTH-WG] Tenancy in OAuth
X-BeenThere: oauth@ietf.org
X-Mailman-Version: 2.1.29
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, 12 Jan 2021 22:10:07 -0000

Hello Jaap,

Justin made a good overview of the available OAuth facilities when
dealing with multiple resource servers or resource server tenants.

If you have control over the resource server, i.e. the token validation
is going to happen in one place, then you have plenty of freedom to find
out what will work best for you, semantically and in terms of available
OAuth server.

In cases when the resources are left to implement the token validation
on their own my preferred approach is to encode the resource server
identity (tenant) into the scope values. Access is defined in one place
and I don't have to worry about the developer accidentally forgetting
the "resource" or "aud(ience)" check.

Vladimir


On 12/01/2021 23:13, Justin Richer wrote:
> Hi Jaap,
>
> There have been a number of efforts to address this kind of thing in
> the OAuth world. You can definitely use a special scope to encode this
> value, which has the benefit of fitting into the implementation
> limitations of nearly all OAuth systems out there. The “resource”
> parameter can also be used for the kind of thing, and it gives you a
> bucket that’s separate from “scope” so that you can keep the latter
> available for describing the API itself:
>
> https://tools.ietf.org/html/rfc8707
>
> There’s also the Rich Authorization Request (RAR) draft that this
> group is currently working on, which provides a multi-dimensional way
> to describe access. It’s more complex than scopes, but it boils down
> to having JSON objects describe the elements needed. In this case you
> might put the API bits into the “actions” and “datatypes” fields, and
> put the tenant information into the “locations” field. I believe there
> are people using it in exactly this way today:
>
> https://tools.ietf.org/html/draft-ietf-oauth-rar-03
>
> There are also some historical efforts to address this, including an
> “audience” and a (completely separate) “aud" parameter, but AFAIK
> neither of these have been raised to standard or even to common
> practice, and so I wouldn’t recommend it. I currently have a project
> to migrate a system that’s currently using one of these onto RAR.
>
>  — Justin
>
>> On Jan 12, 2021, at 11:20 AM, Jaap Francke
>> <Jaap.Francke=40mendix.com@dmarc.ietf.org
>> <mailto:Jaap.Francke=40mendix.com@dmarc.ietf.org>> wrote:
>>
>> Hi,
>>  
>> I’m looking into the topic of tenancy. A multi-tenant service can be
>> considered as an OAuth Resource Server managing resources of
>> different tenants.
>> An AS makes authorization decisions and communicates these using
>> scopes, so one way would be to ‘encode’ the tenant into the scope values.
>> Another line of thought is to somehow bind/restrict an acces-token to
>> a certain tenant, leaving the set of scopes being used more static.
>>  
>> My question is whether this has been a topic that has been addressed
>> in the OAuth working group? Any common practice or draft?
>> Thanks in advance for your replies.
>>  
>> Kind regards,
>> * *
>> *Jaap Francke*
>> Product Manager Identity
>> +31(0)641495324
>>
>> mendix.com <http://mendix.com/>
>>
>> *<image001.png>* <http://www.mendix.com/>
>> * *
>>  
>> _______________________________________________
>> OAuth mailing list
>> OAuth@ietf.org <mailto:OAuth@ietf.org>
>> https://www.ietf.org/mailman/listinfo/oauth
>
>
> _______________________________________________
> OAuth mailing list
> OAuth@ietf.org
> https://www.ietf.org/mailman/listinfo/oauth

-- 
Vladimir Dzhuvinov