<div dir="ltr"><div>I'll jump in here and suggest that User Managed Access (UMA) might be an acceptable fit for you. The use case for UMA is more tailored to shifting the power of authorization to users, but the toolset offered in the spec might be something usable for your case. So, it's not exactly what you need. But to my knowledge, it's the only open specification that extends OAuth2 and OIDC with a goal of implementing access control. <br></div><div><br></div><div><a href="https://wso2.com/library/article/2018/12/a-quick-guide-to-user-managed-access-2-0/">https://wso2.com/library/article/2018/12/a-quick-guide-to-user-managed-access-2-0/</a></div><div><br></div><div><a href="https://kantarainitiative.org/confluence/display/uma/UMA+FAQ">https://kantarainitiative.org/confluence/display/uma/UMA+FAQ</a></div><div><br></div><div><a href="https://docs.kantarainitiative.org/uma/wg/rec-oauth-uma-grant-2.0.html">https://docs.kantarainitiative.org/uma/wg/rec-oauth-uma-grant-2.0.html</a></div><div><br></div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Wed, May 18, 2022 at 6:24 AM [Quipsy] Markus Karg <<a href="mailto:karg@quipsy.de">karg@quipsy.de</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
<div lang="DE">
<div class="gmail-m_4383317577331580906WordSection1">
<p class="MsoNormal"><span>Joseph,<u></u><u></u></span></p>
<p class="MsoNormal"><span><u></u> <u></u></span></p>
<p class="MsoNormal"><span>thanks a lot for your kind answer. We really appreciate all ideas!<u></u><u></u></span></p>
<p class="MsoNormal"><span><u></u> <u></u></span></p>
<p class="MsoNormal"><span>Actually we need to say that we are an ISV, so we are NOT in the position of selecting an IDP vendor. What we actually strive for is understanding the general OpenID / OAuth2 pattern, how we can
integrate into ANY existing company infra structure for SSO. Our customers all over the world already have chosen their IDPs to implement SSO, so there is NO SINGLE IDP and no choice BY US. They expect from us that our highly complex per-function-grants still
work well with their particular IDP OR that the IDP only does SSO but not authorization. In particular, they do NOT enforce to manage access rights within their IDP; i. e. it is OK for them to just create ID Token with their particular IDP, forward the ID
Token to us, and let us do authorization on our own in a custom way (if no better solution possible).<u></u><u></u></span></p>
<p class="MsoNormal"><span><u></u> <u></u></span></p>
<p class="MsoNormal"><span>Moreover, as we are dedicated open source committers, we strive for a free solution. So paying someone for answers on the OpenID / OAuth2 standards is out of scope for us. We do not have custom questions
or product specific question, we only ask about the standards themselves. So we like to abstain from project-specific consulting / vendor-specific solutions.<u></u><u></u></span></p>
<p class="MsoNormal"><span><u></u> <u></u></span></p>
<p class="MsoNormal"><span>Hence our questions more clearly actually are:<u></u><u></u></span></p>
<ul type="disc">
<li class="gmail-m_4383317577331580906MsoListParagraph"><span>Is there something in OpenID / OAuth2 that fulfils per-function-grants, or do these standards only define RBAC?<u></u><u></u></span></li><li class="gmail-m_4383317577331580906MsoListParagraph"><span>Does OpenID / OAuth2 allow the separation of the authorization endpoint vendor from the token endpoint vendor? If yes, we would implement our own token endpoint
producing our custom authorization tokens in exchange for a standardized ID Token obtained from the IDP.<u></u><u></u></span></li><li class="gmail-m_4383317577331580906MsoListParagraph"><span>Do OpenID / OAuth2 off-the-shelf products / services allow to create custom tokens? The question is not just if there is SOME product able to do that, but
if that is a standardized functionality of OpenID / OAuth2.<u></u><u></u></span></li></ul>
<p class="MsoNormal"><span>Thanks!<u></u><u></u></span></p>
<p class="MsoNormal"><span>-Markus<u></u><u></u></span></p>
<p class="MsoNormal"><span><u></u> <u></u></span></p>
<div>
<div style="border-color:rgb(225,225,225) currentcolor currentcolor;border-style:solid none none;border-width:1pt medium medium;padding:3pt 0cm 0cm">
<p class="MsoNormal"><b>Von:</b> Joseph Heenan <<a href="mailto:joseph@authlete.com" target="_blank">joseph@authlete.com</a>> <br>
<b>Gesendet:</b> Mittwoch, 18. Mai 2022 10:26<br>
<b>An:</b> [Quipsy] Markus Karg <<a href="mailto:karg@quipsy.de" target="_blank">karg@quipsy.de</a>><br>
<b>Cc:</b> <a href="mailto:general@lists.openid.net" target="_blank">general@lists.openid.net</a><br>
<b>Betreff:</b> Re: [OpenID] Beginner's Question: Per-Function-Access-Rights<u></u><u></u></p>
</div>
</div>
<p class="MsoNormal"><u></u> <u></u></p>
<p class="MsoNormal">Hi Markus<u></u><u></u></p>
<div>
<p class="MsoNormal"><u></u> <u></u></p>
</div>
<div>
<p class="MsoNormal">The question you ask is perhaps deceptively simple. I think probably most commercial iDPs should have a solution that fits your needs, but they won’t necessarily all have the same solution, depending on the exact performance / security
/ user experience needs. It’s probably a little hard to give much in the way of concrete advice without a lot more info about your goals.<u></u><u></u></p>
</div>
<div>
<p class="MsoNormal"><u></u> <u></u></p>
</div>
<div>
<p class="MsoNormal">The general starting position is normally that the OpenID Connect id_token contains the details of the authentication event, and the OAuth2 access token (generally issued as part of the same flow) represents the authorisation(s). (For various
reasons this distinction isn’t always that clear.) The ID Token is generally expected to be consumed by the client, whereas the access token is expected to be consumed by the resource server(s) / API endpoints.<u></u><u></u></p>
</div>
<div>
<p class="MsoNormal"><u></u> <u></u></p>
</div>
<div>
<p class="MsoNormal">The simple solution is likely that your authorization server directly issues an access token that is the ‘custom authorization token containing the roles AND the per-function-grants’ (this could be a JWT/similar access token that directly
contains all the details, or an opaque token that can be introspected to see what the user has access to - the latter is perhaps along the lines you describe in ‘C’, most API gateways should support token introspection as defined in
<a href="https://datatracker.ietf.org/doc/html/rfc7662" target="_blank">https://datatracker.ietf.org/doc/html/rfc7662</a> ).<u></u><u></u></p>
</div>
<div>
<p class="MsoNormal"><u></u> <u></u></p>
</div>
<div>
<p class="MsoNormal">There’s generally a lot to consider when picking your solution here, particularly as you’re likely to be stuck with whatever solution you implement for a long time - it’d probably be worthwhile to engage with the pre-sales process at a
particular vendor, who should be able to give you guidance on the best way to address your use cases with their solution, or to engage with a vendor neutral consultant that could help you select the best vendor - there’s a few on the OpenID Foundation members
list, <a href="https://openid.net/foundation/sponsoring-members/" target="_blank">https://openid.net/foundation/sponsoring-members/</a> <u></u><u></u></p>
<div>
<p class="MsoNormal"><u></u> <u></u></p>
</div>
<div>
<p class="MsoNormal">Cheers<u></u><u></u></p>
</div>
<div>
<p class="MsoNormal"><u></u> <u></u></p>
</div>
<div>
<p class="MsoNormal">Joseph<u></u><u></u></p>
</div>
<div>
<p class="MsoNormal"><br>
<br>
<u></u><u></u></p>
<blockquote style="margin-top:5pt;margin-bottom:5pt">
<div>
<p class="MsoNormal"> <u></u><u></u></p>
</div>
<div>
<div>
<p class="MsoNormal">I am new to OpenID and OAuth2 and read several tutorials and references but there is one problem left open I hope you can help with.<u></u><u></u></p>
</div>
<div>
<p class="MsoNormal"> <u></u><u></u></p>
</div>
<div>
<p class="MsoNormal">Our existing application does RBAC with the addition of a complex system of functionality-grained access rights. This means, an authentication token must contain not only roles a user has, but also additional functionalities he is allowed
to do. Example: A user that is in the role „Editor“ might have (or might not have) the additional right to execute a special function X. As our application is huge, besides lots of roles there are literally hundred of optional functionalities he could be granted
or not. To our knowledge, this is not covered by any of the existing authentication services / products.<u></u><u></u></p>
</div>
<div>
<p class="MsoNormal"> <u></u><u></u></p>
</div>
<div>
<p class="MsoNormal">We did not find a solution for this in „pure“ OpenID Connect / OAuth2, so currently we discuss the following attempts:<u></u><u></u></p>
</div>
<div>
<p class="MsoNormal"> <u></u><u></u></p>
</div>
<ol style="margin-top:0cm" type="A" start="1">
<li class="gmail-m_4383317577331580906MsoListParagraph" style="margin-top:0cm;margin-bottom:0.0001pt">
Let OpenID Connect do ONLY Authentication but not Authorization. This means, our client sends the obtained ID Token to our existing custom authorization service in exchange for a custom authorization token containing the roles AND the per-function-grants.<u></u><u></u></li></ol>
<div style="margin-left:36pt">
<p class="MsoNormal"> <u></u><u></u></p>
</div>
<ol style="margin-top:0cm" type="A" start="2">
<li class="gmail-m_4383317577331580906MsoListParagraph" style="margin-top:0cm;margin-bottom:0.0001pt">
Let OpenID Connect do BOTH Authentication and Authorization, but wrap each single function-based-grant as a role. In the end, this means a token needs to contain literally hundred of roles in turn, which makes it unmanageable in literally all OpenID Connect
services / products we evaluaged so far.<u></u><u></u></li></ol>
<div>
<p class="MsoNormal"> <u></u><u></u></p>
</div>
<ol style="margin-top:0cm" type="A" start="3">
<li class="gmail-m_4383317577331580906MsoListParagraph" style="margin-top:0cm;margin-bottom:0.0001pt">
Maybe there is a standardized flow that allows an authorization service dynamically lookup the function-based-grant from our custom authorization service?<u></u><u></u></li></ol>
<div>
<p class="MsoNormal"> <u></u><u></u></p>
</div>
<div>
<p class="MsoNormal">Maybe there are other solutions to that problem, but we could not image them.<u></u><u></u></p>
</div>
<div>
<p class="MsoNormal"> <u></u><u></u></p>
</div>
<div>
<p class="MsoNormal">Any comments welcome (besides: do not use per-function-access-rights as this is axiomatic for our product)!<span class="gmail-m_4383317577331580906apple-converted-space"> </span><span style="font-family:"Segoe UI Emoji",sans-serif">😊</span><u></u><u></u></p>
</div>
<div>
<p class="MsoNormal"> <u></u><u></u></p>
</div>
<div>
<p class="MsoNormal">-Markus<u></u><u></u></p>
</div>
<div>
<p class="MsoNormal"> <u></u><u></u></p>
</div>
<div>
<p class="MsoNormal"> <u></u><u></u></p>
</div>
<p class="MsoNormal"><span style="font-size:9pt;font-family:"Helvetica",sans-serif">_______________________________________________<br>
general mailing list<br>
</span><a href="mailto:general@lists.openid.net" target="_blank"><span style="font-size:9pt;font-family:"Helvetica",sans-serif">general@lists.openid.net</span></a><span style="font-size:9pt;font-family:"Helvetica",sans-serif"><br>
</span><a href="https://lists.openid.net/mailman/listinfo/openid-general" target="_blank"><span style="font-size:9pt;font-family:"Helvetica",sans-serif">https://lists.openid.net/mailman/listinfo/openid-general</span></a><u></u><u></u></p>
</div>
</blockquote>
</div>
<p class="MsoNormal"><u></u> <u></u></p>
</div>
</div>
</div>
_______________________________________________<br>
general mailing list<br>
<a href="mailto:general@lists.openid.net" target="_blank">general@lists.openid.net</a><br>
<a href="https://lists.openid.net/mailman/listinfo/openid-general" rel="noreferrer" target="_blank">https://lists.openid.net/mailman/listinfo/openid-general</a><br>
</blockquote></div>