gravitee-io / issues

Gravitee.io - API Platform - Issues
64 stars 26 forks source link

[management] Mapping multi value fields in id_token in identity provider settings #3980

Open MikhailWork opened 4 years ago

MikhailWork commented 4 years ago

Hello

I have a question regarding how can I process multi value field in id_token, such as group field and assign role to users which are included in some groups?

For example, i created openid provider, and want to assign admin role to users that belong to "administrators" group. I got groups scope from my userinfo endpoint, but when I tried to map roles in IDP settings they doesn't`t work.

my id_token looks like: { "at_hash": "xxx", "sub": "xxx", "aud": "xxx", "groupIds": [ "cn=aaa", "cn=bbb", "cn=admin", "cn=ccc" ], "auth_time": 123456578, "iss": "xxx", "preferred_username": "qqq", "exp": 1234567, "iat": 1234567, "nonce": "qqqq" }

brasseld commented 4 years ago

Which expression were you using to use in your identity provider?

MikhailWork commented 4 years ago

Which expression were you using to use in your identity provider?

I tried to use expressions like these: groupIds=["cn=admin"] and groupIds="cn=admin"

on role mappers tab

MikhailWork commented 4 years ago

Hi @graviteeio team and @brasseld! Could you please provide any advice to my issue?

brasseld commented 4 years ago

Hi @MikhailWork

Is it about APIM? You're trying to manage group and / or role mappings, right?

MikhailWork commented 4 years ago

It's about Access management feature listed on User and Role mapping page section Role mapper and dynamic OAuth2 scopes in documentation. https://docs.gravitee.io/am/current/am_userguide_identity_provider_mapping.html

MikhailWork commented 4 years ago

Hi guys @graviteeio and @brasseld!

Do you have any updates or suggestions to my issue?

MikhailWork commented 3 years ago

Hi guys @graviteeio and @brasseld!

I still waiting about any updates regarding my issue.