Bug 18507

Summary: Shibboleth auto-provisioning - Sync
Product: Koha Reporter: Martin Renvoize <martin.renvoize>
Component: AuthenticationAssignee: Martin Renvoize <martin.renvoize>
Status: CLOSED FIXED QA Contact: Marcel de Rooy <m.de.rooy>
Severity: new feature    
Priority: P5 - low CC: dpavlin, f.demians, francart, jonathan.druart, julian.maurice, katrin.fischer, kyle, m.de.rooy, martin.renvoize, matthias.meusburger, mirko, mtj, nick, olli-antti.kivilahti, pgsengstock, theod, tomascohen, veron, ztajoli
Version: Main   
Hardware: All   
OS: All   
Change sponsored?: --- Patch complexity: Small patch
Documentation contact: Documentation submission:
Text to go in the release notes:
Shibboleth authentication has the ability to send an arbitrary number of attributes to koha; These attributes can be used to dynamically create (bug 12026) and, now with this patchset, update user records in koha.
Version(s) released in:
Bug Depends on: 8446, 12026, 13114, 13569    
Bug Blocks: 12681, 22459    
Attachments: Bug 18507: Shibboleth auto-provisioning - Sync
Bug 18507: Shibboleth auto-provisioning - Sync
Bug 18507: Shibboleth auto-provisioning - Sync

Description Martin Renvoize 2017-04-28 08:54:37 UTC
Shibboleth authentication has the ability to send an arbitrary number of attributes to koha; These attributes can be used to dynamically create (bug 12026) and update user records in koha.  Our shibboleth patches should support the update/sync process as well as the create process.
Comment 1 Matthias Meusburger 2018-09-27 12:35:09 UTC
Created attachment 79491 [details] [review]
Bug 18507: Shibboleth auto-provisioning - Sync

This patch allows to update borrowers informations with Shibboleth attributes
upon login.

Test plan:
1. In $KOHA_CONF, check that //shibboleth/sync is set to 1
2. Find an existing user and change one of the values mapped with a Shibboleth attribute
3. Log in using Shibboleth
4. Check that the value has been updated with the Shibboleth attribute.
Comment 2 Julian Maurice 2018-09-27 13:17:06 UTC
Created attachment 79505 [details] [review]
Bug 18507: Shibboleth auto-provisioning - Sync

This patch allows to update borrowers informations with Shibboleth attributes
upon login.

Test plan:
1. In $KOHA_CONF, check that //shibboleth/sync is set to 1
2. Find an existing user and change one of the values mapped with a Shibboleth attribute
3. Log in using Shibboleth
4. Check that the value has been updated with the Shibboleth attribute.

Signed-off-by: Julian Maurice <julian.maurice@biblibre.com>
Comment 3 Julian Maurice 2018-09-27 13:18:26 UTC
Tested with starman and bug 17776. Works as expected.
Comment 4 Marcel de Rooy 2018-11-02 11:06:32 UTC
Created attachment 81883 [details] [review]
Bug 18507: Shibboleth auto-provisioning - Sync

This patch allows to update borrowers informations with Shibboleth attributes
upon login.

Test plan:
1. In $KOHA_CONF, check that //shibboleth/sync is set to 1
2. Find an existing user and change one of the values mapped with a Shibboleth attribute
3. Log in using Shibboleth
4. Check that the value has been updated with the Shibboleth attribute.

Signed-off-by: Julian Maurice <julian.maurice@biblibre.com>

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Comments posted on Bugzilla.
Comment 5 Marcel de Rooy 2018-11-02 11:07:10 UTC
Seems we have a bit of code duplication here between the add and modify case. Can we slide that into one routine ? No blocker on feature slush, open a new report please.
Do we need to check somewhere if the key is a valid patron column btw? Is not done on create, so no blocker too.
Looks good enough to go along now. Feature can simply be config disabled, so no harm. Only reviewed, not tested. But has been confirmed to work.
Comment 6 Nick Clemens 2018-11-08 21:09:49 UTC
Awesome work all!

Pushed to master for 18.11
Comment 7 Martin Renvoize 2018-11-16 13:58:39 UTC
Enhancement, will not be backported to 18.05.x series.