Thanks Justin and Vladimir for your guidance! The resource indicator approach seems to have the best fit for my use case. It addresses my coarse/mid-grained use case, without bringing the complexity of the fine-grained RAR approach. Encoding the tenant into scope values remains an option as well. Ensuring the token validation is implemented properly is indeed a point of attention.
Meanwhile I've been looking into OAuth/OIDC specs for client registration. It may also be useful to extend the client's metadata with 'resource' to bind the specific client to a specific tenant(s). Would that make sense to you as well? Great feedback, kind regards, Jaap On 12/01/2021, 23:10, "OAuth on behalf of oauth-requ...@ietf.org" <oauth-boun...@ietf.org on behalf of oauth-requ...@ietf.org> wrote: Send OAuth mailing list submissions to oauth@ietf.org To subscribe or unsubscribe via the World Wide Web, visit https://eur03.safelinks.protection.outlook.com/?url=https%3A%2F%2Fwww.ietf.org%2Fmailman%2Flistinfo%2Foauth&data=04%7C01%7Cjaap.francke%40mendix.com%7C93707202bd484789530008d8b746e1f4%7Cb4e3c78d8e3b46d8bc565540da23ba4d%7C0%7C0%7C637460862383168168%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C1000&sdata=zNVyuy2avEEWtIJ3eXZGEV9S0KLyYj27KiG2yOPtW9Q%3D&reserved=0 or, via email, send a message with subject or body 'help' to oauth-requ...@ietf.org You can reach the person managing the list at oauth-ow...@ietf.org When replying, please edit your Subject line so it is more specific than "Re: Contents of OAuth digest..." Today's Topics: 1. Re: Tenancy in OAuth (Justin Richer) 2. Re: Tenancy in OAuth (Vladimir Dzhuvinov) ---------------------------------------------------------------------- Message: 1 Date: Tue, 12 Jan 2021 16:13:26 -0500 From: Justin Richer <jric...@mit.edu> To: Jaap Francke <Jaap.Francke=40mendix....@dmarc.ietf.org> Cc: "oauth@ietf.org" <oauth@ietf.org> Subject: Re: [OAUTH-WG] Tenancy in OAuth Message-ID: <e3de5ed2-7506-4090-a32a-f3d4ae797...@mit.edu> Content-Type: text/plain; charset="utf-8" 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://eur03.safelinks.protection.outlook.com/?url=https%3A%2F%2Ftools.ietf.org%2Fhtml%2Frfc8707&data=04%7C01%7Cjaap.francke%40mendix.com%7C93707202bd484789530008d8b746e1f4%7Cb4e3c78d8e3b46d8bc565540da23ba4d%7C0%7C0%7C637460862383168168%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C1000&sdata=5clKn%2B8%2FCEiQindejfHncA670FWVoy%2BHDQ49JtOORjE%3D&reserved=0 <https://eur03.safelinks.protection.outlook.com/?url=https%3A%2F%2Ftools.ietf.org%2Fhtml%2Frfc8707&data=04%7C01%7Cjaap.francke%40mendix.com%7C93707202bd484789530008d8b746e1f4%7Cb4e3c78d8e3b46d8bc565540da23ba4d%7C0%7C0%7C637460862383168168%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C1000&sdata=5clKn%2B8%2FCEiQindejfHncA670FWVoy%2BHDQ49JtOORjE%3D&reserved=0> 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://eur03.safelinks.protection.outlook.com/?url=https%3A%2F%2Ftools.ietf.org%2Fhtml%2Fdraft-ietf-oauth-rar-03&data=04%7C01%7Cjaap.francke%40mendix.com%7C93707202bd484789530008d8b746e1f4%7Cb4e3c78d8e3b46d8bc565540da23ba4d%7C0%7C0%7C637460862383168168%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C1000&sdata=hxn2gFdUhhmWrf0ATaqUUUB9C62yh%2FY27aNOvR1hWbM%3D&reserved=0 <https://eur03.safelinks.protection.outlook.com/?url=https%3A%2F%2Ftools.ietf.org%2Fhtml%2Fdraft-ietf-oauth-rar-03&data=04%7C01%7Cjaap.francke%40mendix.com%7C93707202bd484789530008d8b746e1f4%7Cb4e3c78d8e3b46d8bc565540da23ba4d%7C0%7C0%7C637460862383168168%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C1000&sdata=hxn2gFdUhhmWrf0ATaqUUUB9C62yh%2FY27aNOvR1hWbM%3D&reserved=0> 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....@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 <https://eur03.safelinks.protection.outlook.com/?url=http%3A%2F%2Fmendix.com%2F&data=04%7C01%7Cjaap.francke%40mendix.com%7C93707202bd484789530008d8b746e1f4%7Cb4e3c78d8e3b46d8bc565540da23ba4d%7C0%7C0%7C637460862383168168%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C1000&sdata=nPKjePc%2B%2B8TuM4zuCG6ZU2XNsPmJxu5WidmCHz9E%2BSU%3D&reserved=0> > <image001.png> <https://eur03.safelinks.protection.outlook.com/?url=http%3A%2F%2Fwww.mendix.com%2F&data=04%7C01%7Cjaap.francke%40mendix.com%7C93707202bd484789530008d8b746e1f4%7Cb4e3c78d8e3b46d8bc565540da23ba4d%7C0%7C0%7C637460862383168168%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C1000&sdata=7HQ1qe32Hc9QcYNVY8667ufxmLz7DDWCYA8mhsKSHVo%3D&reserved=0> > > > _______________________________________________ > OAuth mailing list > OAuth@ietf.org <mailto:OAuth@ietf.org> > https://eur03.safelinks.protection.outlook.com/?url=https%3A%2F%2Fwww.ietf.org%2Fmailman%2Flistinfo%2Foauth&data=04%7C01%7Cjaap.francke%40mendix.com%7C93707202bd484789530008d8b746e1f4%7Cb4e3c78d8e3b46d8bc565540da23ba4d%7C0%7C0%7C637460862383168168%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C1000&sdata=zNVyuy2avEEWtIJ3eXZGEV9S0KLyYj27KiG2yOPtW9Q%3D&reserved=0 <https://eur03.safelinks.protection.outlook.com/?url=https%3A%2F%2Fwww.ietf.org%2Fmailman%2Flistinfo%2Foauth&data=04%7C01%7Cjaap.francke%40mendix.com%7C93707202bd484789530008d8b746e1f4%7Cb4e3c78d8e3b46d8bc565540da23ba4d%7C0%7C0%7C637460862383168168%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C1000&sdata=zNVyuy2avEEWtIJ3eXZGEV9S0KLyYj27KiG2yOPtW9Q%3D&reserved=0> -------------- next part -------------- An HTML attachment was scrubbed... URL: <https://eur03.safelinks.protection.outlook.com/?url=https%3A%2F%2Fmailarchive.ietf.org%2Farch%2Fbrowse%2Foauth%2Fattachments%2F20210112%2F19aa55e2%2Fattachment.htm&data=04%7C01%7Cjaap.francke%40mendix.com%7C93707202bd484789530008d8b746e1f4%7Cb4e3c78d8e3b46d8bc565540da23ba4d%7C0%7C0%7C637460862383168168%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C1000&sdata=1QzWSxQ4esCxjTI6f5mb7CPFxiYs9aCdVcHIyEnuwMk%3D&reserved=0> ------------------------------ Message: 2 Date: Wed, 13 Jan 2021 00:10:01 +0200 From: Vladimir Dzhuvinov <vladi...@connect2id.com> To: oauth@ietf.org Subject: Re: [OAUTH-WG] Tenancy in OAuth Message-ID: <cc41517f-f732-0d6f-95f3-64bb7fcdf...@connect2id.com> Content-Type: text/plain; charset="utf-8" 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://eur03.safelinks.protection.outlook.com/?url=https%3A%2F%2Ftools.ietf.org%2Fhtml%2Frfc8707&data=04%7C01%7Cjaap.francke%40mendix.com%7C93707202bd484789530008d8b746e1f4%7Cb4e3c78d8e3b46d8bc565540da23ba4d%7C0%7C0%7C637460862383168168%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C1000&sdata=5clKn%2B8%2FCEiQindejfHncA670FWVoy%2BHDQ49JtOORjE%3D&reserved=0 > > 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://eur03.safelinks.protection.outlook.com/?url=https%3A%2F%2Ftools.ietf.org%2Fhtml%2Fdraft-ietf-oauth-rar-03&data=04%7C01%7Cjaap.francke%40mendix.com%7C93707202bd484789530008d8b746e1f4%7Cb4e3c78d8e3b46d8bc565540da23ba4d%7C0%7C0%7C637460862383168168%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C1000&sdata=hxn2gFdUhhmWrf0ATaqUUUB9C62yh%2FY27aNOvR1hWbM%3D&reserved=0 > > 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....@dmarc.ietf.org >> <mailto:Jaap.Francke=40mendix....@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 <https://eur03.safelinks.protection.outlook.com/?url=http%3A%2F%2Fmendix.com%2F&data=04%7C01%7Cjaap.francke%40mendix.com%7C93707202bd484789530008d8b746e1f4%7Cb4e3c78d8e3b46d8bc565540da23ba4d%7C0%7C0%7C637460862383178166%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C1000&sdata=%2FAM7a7iH5y8E6ETAg%2BAmrNh3WnAuBiOZ%2FEBhikqOFxI%3D&reserved=0> >> >> *<image001.png>* <https://eur03.safelinks.protection.outlook.com/?url=http%3A%2F%2Fwww.mendix.com%2F&data=04%7C01%7Cjaap.francke%40mendix.com%7C93707202bd484789530008d8b746e1f4%7Cb4e3c78d8e3b46d8bc565540da23ba4d%7C0%7C0%7C637460862383178166%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C1000&sdata=MaqH3Kv4ob56Lp28m9g2idLEXiLlpkkwt4QctYTAiqg%3D&reserved=0> >> *?* >> ? >> _______________________________________________ >> OAuth mailing list >> OAuth@ietf.org <mailto:OAuth@ietf.org> >> https://eur03.safelinks.protection.outlook.com/?url=https%3A%2F%2Fwww.ietf.org%2Fmailman%2Flistinfo%2Foauth&data=04%7C01%7Cjaap.francke%40mendix.com%7C93707202bd484789530008d8b746e1f4%7Cb4e3c78d8e3b46d8bc565540da23ba4d%7C0%7C0%7C637460862383178166%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C1000&sdata=8%2Fk%2BVZS9e%2B%2FCwEwSVo7nqivuwjdg3Jy48x6awkBTxV0%3D&reserved=0 > > > _______________________________________________ > OAuth mailing list > OAuth@ietf.org > https://eur03.safelinks.protection.outlook.com/?url=https%3A%2F%2Fwww.ietf.org%2Fmailman%2Flistinfo%2Foauth&data=04%7C01%7Cjaap.francke%40mendix.com%7C93707202bd484789530008d8b746e1f4%7Cb4e3c78d8e3b46d8bc565540da23ba4d%7C0%7C0%7C637460862383178166%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C1000&sdata=8%2Fk%2BVZS9e%2B%2FCwEwSVo7nqivuwjdg3Jy48x6awkBTxV0%3D&reserved=0 -- Vladimir Dzhuvinov -------------- next part -------------- An HTML attachment was scrubbed... URL: <https://eur03.safelinks.protection.outlook.com/?url=https%3A%2F%2Fmailarchive.ietf.org%2Farch%2Fbrowse%2Foauth%2Fattachments%2F20210113%2F136b5985%2Fattachment.htm&data=04%7C01%7Cjaap.francke%40mendix.com%7C93707202bd484789530008d8b746e1f4%7Cb4e3c78d8e3b46d8bc565540da23ba4d%7C0%7C0%7C637460862383178166%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C1000&sdata=0dJ3kYyigdBtbUDNhwRipAzwj5urzkKKLCzquGTy7vY%3D&reserved=0> -------------- next part -------------- A non-text attachment was scrubbed... Name: smime.p7s Type: application/pkcs7-signature Size: 4007 bytes Desc: S/MIME Cryptographic Signature URL: <https://eur03.safelinks.protection.outlook.com/?url=https%3A%2F%2Fmailarchive.ietf.org%2Farch%2Fbrowse%2Foauth%2Fattachments%2F20210113%2F136b5985%2Fattachment.p7s&data=04%7C01%7Cjaap.francke%40mendix.com%7C93707202bd484789530008d8b746e1f4%7Cb4e3c78d8e3b46d8bc565540da23ba4d%7C0%7C0%7C637460862383178166%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C1000&sdata=%2BqMHy4Z%2FkjRCeyE8UHgUuqtm8D%2FLwPd2HffEmhiVfcs%3D&reserved=0> ------------------------------ Subject: Digest Footer _______________________________________________ OAuth mailing list OAuth@ietf.org https://eur03.safelinks.protection.outlook.com/?url=https%3A%2F%2Fwww.ietf.org%2Fmailman%2Flistinfo%2Foauth&data=04%7C01%7Cjaap.francke%40mendix.com%7C93707202bd484789530008d8b746e1f4%7Cb4e3c78d8e3b46d8bc565540da23ba4d%7C0%7C0%7C637460862383178166%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C1000&sdata=8%2Fk%2BVZS9e%2B%2FCwEwSVo7nqivuwjdg3Jy48x6awkBTxV0%3D&reserved=0 ------------------------------ End of OAuth Digest, Vol 147, Issue 6 ************************************* _______________________________________________ OAuth mailing list OAuth@ietf.org https://www.ietf.org/mailman/listinfo/oauth