azure-activedirectory-identitymodel-extensions-for-dotnet: Resource parameter for OIDC/OAuth authorize request has wrong format
According to the resource indicator spec
https://www.rfc-editor.org/rfc/rfc8707.html#name-authorization-request
Multiple resource parameters are allowed.
OpenIdConnectMessage only allows for a single resource parameter - also the backing field is a dictionary. This needs some re-work to be spec compliant.
About this issue
- Original URL
- State: open
- Created 6 years ago
- Reactions: 1
- Comments: 16 (8 by maintainers)
This standard pattern will be used by many vendors in the Norwegian health care sector going forward. The national trust mechanism (HelseId) has adopted it for resource isolation between their different national APIs. With the amount of dotnet users in Norway i would expect a lot of people stumbling upon this hurdle, so it would be really nice if the oauth libraries became compliant here.
Any update? This is violating the spec and blocks people from using resource indicator enabled IdPs…
Resources and scopes are orthogonal - e.g. multiple resources could offer the same scopes but you still want to be able to restrict the access to a specific resource (a common scenario for e.g. in SMART on FHIR).
Also resources might live in different trust domains - e.g. resourceA should not be able to forward incoming tokens to resourceB - with the additional resource identifier, resourceB would not accept the token.
And lastly this is a way to prevent overly powerful access tokens by forcing the client to use per-resource access tokens (that can have per-resource configuration like claims or encryption keys/methods)
See here for details https://datatracker.ietf.org/doc/html/rfc8707
yes - and that turns into multiple
resourceparameters on the query string to the authorize endpoint.+1
Multi-resource scenarios are the bedrock of the authn/authz solution for our cloud platform. This limitation makes supporting dotnet client applications regrettably painful.
Props to @frodegil for the elegant work around 👏 but convincing software teams to adopt a solution like that can be rather troublesome when lack of official support implies that this is somehow wrong… which it isn’t.
For others reading this thread.
Duende IdentityModel (we’re using 7.0.0.0) and the PushedAuthorizationRequest class supports multiple resources. We have replaced the old form-post and query-string hacks, mentioned in this thread, with PAR. It works like a charm.
Seems this is still not fixed.
This seems to work;