Bug 32138 - OIDC client uses backwards default mapping
Summary: OIDC client uses backwards default mapping
Status: CLOSED FIXED
Alias: None
Product: Koha
Classification: Unclassified
Component: Authentication (show other bugs)
Version: Main
Hardware: All All
: P5 - low normal (vote)
Assignee: David Cook
QA Contact: Testopia
URL:
Keywords:
Depends on: 31378
Blocks:
  Show dependency treegraph
 
Reported: 2022-11-08 23:56 UTC by David Cook
Modified: 2023-06-08 22:28 UTC (History)
2 users (show)

See Also:
Change sponsored?: ---
Patch complexity: ---
Documentation contact:
Documentation submission:
Text to go in the release notes:
Version(s) released in:
22.11.00


Attachments
Bug 32138: Fix OIDC default mapping (1.46 KB, patch)
2022-11-09 00:45 UTC, David Cook
Details | Diff | Splinter Review
Bug 32138: Fix OIDC default mapping (1.52 KB, patch)
2022-11-09 16:42 UTC, Tomás Cohen Arazi
Details | Diff | Splinter Review

Note You need to log in before you can comment on or make changes to this bug.
Description David Cook 2022-11-08 23:56:53 UTC
The OAuth2 client has a good default mapping, but the OIDC client has the first name and last name mappings backwards. Must be a mistake from an earlier iteration.
Comment 1 David Cook 2022-11-09 00:45:45 UTC
Created attachment 143451 [details] [review]
Bug 32138: Fix OIDC default mapping

This patch fixes the OIDC default mapping to have the Koha fields on
the left (ie key) and the OIDC standard claim fields on the right (ie value).

1. Apply the patch
2. Go to http://localhost:8081/cgi-bin/koha/admin/identity_providers.pl?op=add_form
3. Choose "OIDC" for "Protocol"
4. Click "Add default OIDC mapping"
5. Note the following is displayed:
{
  "email": "email",
  "firstname": "given_name",
  "surname": "family_name"
}
Comment 2 Tomás Cohen Arazi 2022-11-09 16:42:30 UTC
Created attachment 143528 [details] [review]
Bug 32138: Fix OIDC default mapping

This patch fixes the OIDC default mapping to have the Koha fields on
the left (ie key) and the OIDC standard claim fields on the right (ie value).

1. Apply the patch
2. Go to http://localhost:8081/cgi-bin/koha/admin/identity_providers.pl?op=add_form
3. Choose "OIDC" for "Protocol"
4. Click "Add default OIDC mapping"
5. Note the following is displayed:
{
  "email": "email",
  "firstname": "given_name",
  "surname": "family_name"
}

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Comment 3 Tomás Cohen Arazi 2022-11-09 17:40:24 UTC
Pushed to master for 22.11.

Nice work everyone, thanks!