Bug 18768 - Add the ability to authenticate patrons against other ILSs via SIP2
Summary: Add the ability to authenticate patrons against other ILSs via SIP2
Status: Patch doesn't apply
Alias: None
Product: Koha
Classification: Unclassified
Component: Architecture, internals, and plumbing (show other bugs)
Version: Main
Hardware: All All
: P5 - low enhancement (vote)
Assignee: Kyle M Hall
QA Contact: Testopia
URL: https://github.com/bywatersolutions/b...
Keywords:
Depends on:
Blocks:
 
Reported: 2017-06-09 15:06 UTC by Kyle M Hall
Modified: 2023-09-18 10:44 UTC (History)
3 users (show)

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


Attachments
Bug 18768 - Convert logic in sip_cli_emulator to a reusable library (39.05 KB, patch)
2017-06-09 15:38 UTC, Kyle M Hall
Details | Diff | Splinter Review
Bug 18768 - Add support for authenticating against external SIP servers ala LDAP and CAS (20.63 KB, patch)
2017-06-09 15:38 UTC, Kyle M Hall
Details | Diff | Splinter Review

Note You need to log in before you can comment on or make changes to this bug.
Description Kyle M Hall 2017-06-09 15:06:48 UTC
This feature allows Koha use to use other ILSs as an authenticate target in a manner someone similar to how we authenticate LDAP. It allows Koha to be configured with a list of external SIP2 servers to authenticate against. Koha will find the correct server to use based on the order and cardnumber prefix chosen, send a patron information request and handle the patron login based on the response.
Comment 1 Kyle M Hall 2017-06-09 15:38:03 UTC
Created attachment 64155 [details] [review]
Bug 18768 - Convert logic in sip_cli_emulator to a reusable library
Comment 2 Kyle M Hall 2017-06-09 15:38:10 UTC
Created attachment 64156 [details] [review]
Bug 18768 - Add support for authenticating against external SIP servers ala LDAP and CAS

This feature allows Koha use to use other ILSs as an authenticate target in a manner someone similar to how we authenticate LDAP. It allows Koha to be configured with a list of external SIP2 servers to authenticate against. Koha will find the correct server to use based on the order and cardnumber prefix chosen, send a patron information request and handle the patron login based on the response.

Test Plan:
1) Apply this patch set
2) Set up another Koha server as a SIP2 target
3) Follow the setup procedure detailed in the POD in Auth_with_sip.pm
4) Log in with a username/password that exists on the external server but not in this one
Comment 3 Alex Buckley 2018-10-29 22:37:58 UTC
Hi Kyle

Can you please rebase, as you can see the patches are not applying cleanly on master:

Apply? [(y)es, (n)o, (i)nteractive] y
Applying: Bug 18768 - Convert logic in sip_cli_emulator to a reusable library
Applying: Bug 18768 - Add support for authenticating against external SIP servers ala LDAP and CAS
/home/vagrant/kohaclone/.git/rebase-apply/patch:360: trailing whitespace.
  Make sure that ALL required fields are populated by your LDAP database (and mapped in KOHA_CONF).  
/home/vagrant/kohaclone/.git/rebase-apply/patch:401: trailing whitespace.
Once a user has been accepted by the LDAP server, there are several possibilities for how Koha will behave, depending on 
/home/vagrant/kohaclone/.git/rebase-apply/patch:417: trailing whitespace.
their SIP password OR their local one.  If this is a problem, then you should enable update and supply a mapping for 
warning: 3 lines add whitespace errors.
Using index info to reconstruct a base tree...
M	C4/Auth.pm
<stdin>:360: trailing whitespace.
  Make sure that ALL required fields are populated by your LDAP database (and mapped in KOHA_CONF).  
<stdin>:401: trailing whitespace.
Once a user has been accepted by the LDAP server, there are several possibilities for how Koha will behave, depending on 
<stdin>:417: trailing whitespace.
their SIP password OR their local one.  If this is a problem, then you should enable update and supply a mapping for 
warning: 3 lines applied after fixing whitespace errors.
Falling back to patching base and 3-way merge...
Auto-merging C4/Auth.pm
CONFLICT (content): Merge conflict in C4/Auth.pm
Failed to merge in the changes.
Patch failed at 0001 Bug 18768 - Add support for authenticating against external SIP servers ala LDAP and CAS
The copy of the patch that failed is found in:
   /home/vagrant/kohaclone/.git/rebase-apply/patch
When you have resolved this problem run "git bz apply --continue".
If you would prefer to skip this patch, instead run "git bz apply --skip".
To restore the original branch and stop patching run "git bz apply --abort".
Patch left in /tmp/Bug-18768---Add-support-for-authenticating-against-rU5kes.patch
Comment 4 Katrin Fischer 2023-09-15 21:56:27 UTC
Hi Kyle, is this still something you plan to work on? Could you explain the use case?
Comment 5 Kyle M Hall 2023-09-18 10:44:55 UTC
This feature was created for the PA Liberty ebook project ( https://www.paliberty.net/ ). It was basically an attempt to use Koha as an ebook platform in a manner similar to Overdrive. Libraries would join the PA Liberty group and patron's would be able to log in to the PA Liberty catalog in order to download and read ebooks. To do so, this patch would authenticate the patron against their home ILSs' SIP service.

It appears that the Liberty Project id dead. So the code isn't needed by anyone anymore. That being said, it certainly has merit and could be used for future projects of that ilk.

If anybody is interested in seeing this feature in Koha I'd be willing to try rebasing it. We've had some enhancements to the sip cli script that would require updating the code.