ubccr / mokey

FreeIPA self-service account management portal
BSD 3-Clause "New" or "Revised" License
189 stars 45 forks source link

FreeIPA to OpenID fields mapping #68

Closed jvinolas closed 3 years ago

jvinolas commented 3 years ago

Hi,

According to https://openid.net/specs/openid-connect-basic-1_0.html#Scopes the profile should provide name, family_name fields but instead we see from client app this fields: ["first"]=> string(4) "John" ["last"]=> string(3) "Doe".

As the client apps expects name and family_name fields I'm wondering if it's mokey that it is not translating them correctly from freeipa to openid standard or hydra, but we see that hydra uses those fieldnames also (https://www.ory.sh/hydra/docs/reference/api/#openid-connect-userinfo).

Is this a missing field translation in mokey to openid standard?

Thanks

aebruno commented 3 years ago

mokey currently maps the FreeIPA field givenname to the first field in the ID Token and maps the FreeIPA field sn to the last field in the ID token.

jvinolas commented 3 years ago

If I'm not wrong, the freeipa user profile is this one: imatge And this is the OpenID standard: openid_profile

We connected moodle and nextcloud with hydra and mokey and we see non-standard fields on response: ["first"]=> string(4) ["last"]=> string(3)

when those fields should be given_name and family_name as stated in OpenID standard. Is this correct?

jvinolas commented 3 years ago

I've done https://github.com/ubccr/mokey/pull/69 with the changes and are working with moodle and nextcloud.