question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Multi-level OIDC_ROLE_CLAIM and OIDC_GROUP_CLAIM

See original GitHub issue

Is your feature request related to a problem? Please describe. I use Keycloak as OIDC provider and want to use OIDC_GROUP_CLAIM and OIDC_ROLE_CLAIM. But Keycloak reponds with a multi-level claim structure which is currently not possible to use.

{
  "name": "Me",
  "email": "me@example.com",
  "realm_access": {
    "roles": [
      "just_some_generic_roles"
    ]
  },
  "resource_access": {
    "RANDOM_OAUTH2_CLIENT_ID": {
      "roles": [
        "my_role_1",
        "my_role_2"
      ]
    }
  }
}

Describe the solution you’d like According to the data above I need something like resource_access/RANDOM_OAUTH2_CLIENT_ID/roles as OIDC_GROUP_CLAIM and OIDC_ROLE_CLAIM. This leads to data.get('resource_access').get('RANDOM_OAUTH2_CLIENT_ID').get('roles') at https://github.com/alerta/alerta/blob/master/alerta/auth/oidc.py#L123.

Describe alternatives you’ve considered I’m not the supporter of the Keycloak server so it’s impossible to have the alternative on the server side.

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Comments:24 (24 by maintainers)

github_iconTop GitHub Comments

1reaction
satterlycommented, Sep 10, 2019

You can find the JWT in any API XHR request. Using the javascript console go to the Network tab and filter on “XHR” requests. Choose Headers and then find the “Authorization” header. The bearer token is the JWT (highlighted in blue below).

Screenshot 2019-09-10 at 20 50 09

Copy and paste the token starting from “ey” into this website to decode the JWT… https://jwt.io and you should get something like this …

Screenshot 2019-09-10 at 20 54 06
0reactions
satterlycommented, Sep 13, 2019

Thanks for letting me know about the invalid scopes. #1075

Read more comments on GitHub >

github_iconTop Results From Across the Web

OpenID Connect Federation 1.0 - draft 25
This claim is only OPTIONAL for the Entity Statement returned from an OP when the client is doing Explicit Registration.
Read more >
OIDC Groups claim mapping #6595 - argoproj/argo-cd - GitHub
Summary. Allow a user to change the claim that contains ones groups. Motivation. We use AzureAD, and the groups claim for some users...
Read more >
Identity, Claims, & Tokens – An OpenID Connect Primer, Part ...
This blog series is a primer on OIDC. In this first post, we'll review some key concepts around OIDC and tokens, explained in...
Read more >
Customize tokens returned from Okta with a Groups claim
This guide explains how to add a Groups claim to ID tokens for any combination of App Groups and User Groups to perform...
Read more >
How do I add a roles claim to the OIDC Claims Script in AM ...
The following process describes how to add a roles claim to the OIDC Claims Script in order to return group membership details: Create...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found