Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Alternate array syntax to resolve : issue in key names for RouteClaimsRequirement option in configuration #1308

Open
ghorsey opened this issue Aug 3, 2020 · 3 comments
Labels
waiting Waiting for answer to question or feedback from issue raiser

Comments

@ghorsey
Copy link

ghorsey commented Aug 3, 2020

New Feature

Add an alternate syntax to the RouteClaimsRequirement configuration. Instead of the current shorter (and nicer) current syntax of:

"RouteClaimsRequirement": {
  "{ClaimType}": "{ClaimValue}"
}

Support a more verbose array syntax as well:

"RouteClaimsRequirement": [
  {
    "type": "{ClaimType}",
    "value": "{ClaimValue}"
  }
]

Motivation for New Feature

Microsoft uses a : to signify hierarchy in configuration files.
See dotnet/extensions#782

There is a great workaround on issue 679 that would be unnecessary if an alternate syntax could be used without the : in a key value.

The most common/reported issue is with the default MS role claim type http://schemas.microsoft.com/ws/2008/06/identity/claims/role

Currently this does not work and requires a workaround:

"RouteClaimsRequirement": {
  "http://schemas.microsoft.com/ws/2008/06/identity/claims/role": "Administrator"
}

Having an alternate syntax would fix this and "just work":

"RouteClaimsRequirement": [
  {
    "type": "http://schemas.microsoft.com/ws/2008/06/identity/claims/role",
    "value": "Administrator"
  }
]
@ShvetsovAU
Copy link

Don't implemented?

@olssonp
Copy link

olssonp commented Jun 30, 2022

I'm having the same problem and was about to suggest the same feature.

@raman-m
Copy link
Member

raman-m commented Mar 27, 2024

@ghorsey
Hi Geoff!
Will you personally contribute and be responsible for feature delivery?

@raman-m raman-m added the waiting Waiting for answer to question or feedback from issue raiser label Mar 27, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
waiting Waiting for answer to question or feedback from issue raiser
Projects
None yet
Development

No branches or pull requests

4 participants