Bug 12682

Summary: Shibboleth attribute manipulation
Product: Koha Reporter: Martin Renvoize <martin.renvoize>
Component: AuthenticationAssignee: Martin Renvoize <martin.renvoize>
Status: NEW --- QA Contact: Testopia <testopia>
Severity: enhancement    
Priority: P5 - low CC: andreas.jonsson, dpavlin, katrin.fischer, ztajoli
Version: master   
Hardware: All   
OS: All   
Change sponsored?: --- Patch complexity: ---
Documentation contact: Documentation submission:
Text to go in the release notes:
Version(s) released in:
Bug Depends on: 8446, 13114, 13569    
Bug Blocks:    

Description Martin Renvoize 2014-07-31 07:07:29 UTC
As koha administrators, we are often not in control of the form in which we will receive an attribute from a shibboleth identity provider.

This envisaged enhancement would add the ability to define very simple string manipulations to an attribute in the koha config file.

Example of enhanced config:

<usesshibboleth>1</usesshibboleth>
<shibboleth>
  <matchpoint>userid</matchpoint>
  <mapping>
    <userid is="email" regex="s/@student.university.ac.uk//g"></userid>
  </mapping>
</shibboleth>

In the above example, we want to match koha userid to the 'stuff before the @' in the users email attribute.
Comment 1 Zeno Tajoli 2016-05-04 15:06:04 UTC
Hi Martin,

do you have any code about this topic ?
I'm tring to do a similar development.
Comment 2 Martin Renvoize 2016-05-26 21:06:37 UTC
I'm afraid I never got to this one,  I had too many other outstanding shibboleth via awaiting signoff and qa to devote time to this.

In another ago I wrote shibboleth interactions for however,  we use perl config files.  It was very easy there to just replace the simple mapping with more complex control statements anonymous subroutine references..  That's likely how I would attempt to impliment such a piece these days