kratos icon indicating copy to clipboard operation
kratos copied to clipboard

Add support for "groups" in OIDC claims

Open akshay196 opened this issue 2 years ago • 5 comments

Preflight checklist

Describe your problem

I was trying to store the "groups" information from claims received into user traits after OIDC login. Unfortunately claims variables in mapper Jsonnet only allowed specific standard claims defined here, that does not include groups attribute. I tried with GitLab and Okta OIDC login as for now. Both supports groups in its claims.

Describe your ideal solution

Claims variable should have groups attribute that is of type array of strings.

Workarounds or alternatives

I couldn't find alternative to fetch groups that OIDC user is part of after successful login.

Version

v0.9.0-alpha.3

Additional Context

No response

akshay196 avatar Jun 16 '22 05:06 akshay196

Makes sense to include all claims, maybe as another variable in the context like raw_claims or something like that - PRs welcomed :)

aeneasr avatar Jun 17 '22 08:06 aeneasr

Can I pick this up?

deepto98 avatar Jun 18 '22 08:06 deepto98

Sure!

aeneasr avatar Jun 18 '22 08:06 aeneasr

This would also require #1912 to make sure the groups stay up to date with the IdP.

fehrnah avatar Jul 04 '22 11:07 fehrnah

Hey @deepto98, Just checking if there is any progress on this. Thanks.

akshay196 avatar Jul 20 '22 17:07 akshay196