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

Jwt token has empty claim "groups" list when using DEX as OpenID provider. #545

Open
blutz1982 opened this issue Feb 2, 2023 · 0 comments

Comments

@blutz1982
Copy link

Issue Summary
When requesting, scope "groups" is not passed to OIDC_AUTH_URL. As a result, there is no information about groups in the jwt token. Judging by the source code, the list of scopes is hardcoded in src/services/auth.ts:

openid: {
    ...
    scope: 'openid+profile+email',
    ...
    }

Request URL look lile:

http://some-domain.local/dex/auth?response_type=code&client_id=alerta-client-id&redirect_uri=http://localhost:8080/&scope=openid+profile+email&display=popup&state=48kamg89ydd

For this reason, after authentication, there is no role mapping.
It would be nice to be able to parameterize this value via configuration, as is done, for example for OIDC_AUTH_URL

openid: {
    ...
    authorizationEndpoint: config.oidc_auth_url,
    scope: config.oidc_scopes,
    ...
    }

Definitely, an implementation of this on the API side will also be required.

alertad.conf

...
OIDC_SCOPES = 'openid+profile+email+groups'
...

Environment

  • OS: Linux

  • API version: 8.7.0

  • Deployment: Docker

  • Database: Postgres

  • Server config:
    Auth enabled? Yes
    Auth provider? OpenID (Dex)
    Customer views? No

  • web UI version: 8.7.0

  • CLI version: 8.5.1

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant