Bug 18144 (broke, openidconnect, persona, removal)

Summary: Removal of persona broke Google OAuth2
Product: Koha Reporter: Mark Tompsett <mtompset>
Component: AuthenticationAssignee: Mark Tompsett <mtompset>
Status: CLOSED FIXED QA Contact: Testopia <testopia>
Severity: critical    
Priority: P5 - low CC: dpavlin, jonathan.druart, kyle, m.de.rooy, srdjan
Version: Main   
Hardware: All   
OS: All   
See Also: https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=17554
Change sponsored?: --- Patch complexity: ---
Documentation contact: Documentation submission:
Text to go in the release notes:
Version(s) released in:
Circulation function:
Bug Depends on: 10988, 17486    
Bug Blocks: 18118    
Attachments: Bug 18144: Restore pieces of C4/Auth to make Google OpenID Connect work
[SIGNED-OFF] Bug 18144: Restore pieces of C4/Auth to make Google OpenID Connect work
Bug 18144: Restore pieces of C4/Auth to make Google OpenID Connect work

Description Mark Tompsett 2017-02-20 06:20:29 UTC
Bug 17486 removed the fifth parameter in checkauth which was used as the email check in opac/svc/auth/googleopenidconnect

This should restore whatever is necessary to get Google OpenID connect to work.
Comment 1 Mark Tompsett 2017-02-20 06:48:25 UTC
Created attachment 60447 [details] [review]
Bug 18144: Restore pieces of C4/Auth to make Google OpenID Connect work

By restoring some pieces of logic, with the name changed from $persona
to $emailaddress, the openid will work again for OPAC logins.

See https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=10988#c68
for an excellent test plan.
Comment 2 Mark Tompsett 2017-03-01 12:05:07 UTC
Increasing priority, as a broken authentication method is kind of important to fix.
Comment 3 Srdjan Jankovic 2017-03-21 01:07:57 UTC
Should we perhaps use Koha::Patrons in preference to C4::Members?
Comment 4 Mark Tompsett 2017-03-21 03:14:19 UTC
(In reply to Srdjan Jankovic from comment #3)
> Should we perhaps use Koha::Patrons in preference to C4::Members?

While that may be a valid suggestion, the point was to paste back the code the way it was as much as possible.
Comment 5 Mark Tompsett 2017-03-21 03:16:32 UTC
Though admittedly, I renamed $persona to $emailaddress, to better represent what it is being used for now.
Comment 6 Josef Moravec 2017-03-23 09:10:47 UTC
Created attachment 61516 [details] [review]
[SIGNED-OFF] Bug 18144: Restore pieces of C4/Auth to make Google OpenID Connect work

By restoring some pieces of logic, with the name changed from $persona
to $emailaddress, the openid will work again for OPAC logins.

See https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=10988#c68
for an excellent test plan.

Signed-off-by: Josef Moravec <josef.moravec@gmail.com>
Comment 7 Jonathan Druart 2017-03-23 19:49:00 UTC
Created attachment 61589 [details] [review]
Bug 18144: Restore pieces of C4/Auth to make Google OpenID Connect work

By restoring some pieces of logic, with the name changed from $persona
to $emailaddress, the openid will work again for OPAC logins.

See https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=10988#c68
for an excellent test plan.

Signed-off-by: Josef Moravec <josef.moravec@gmail.com>

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Did not test it, but trust in author and signoffer
Comment 8 Jonathan Druart 2017-03-23 19:49:50 UTC
Oops, sorry about that.

The call is:
opac/svc/auth/googleopenidconnect:                  checkauth( $query, 1, {}, 'opac', $email );
Comment 9 Kyle M Hall (khall) 2017-03-29 13:10:04 UTC
Pushed to master for 17.05, thanks Mark!
Comment 10 Katrin Fischer 2017-04-02 15:51:53 UTC
bug 17586 is not in 18144, so this should not be needed. Please let me know, if I should be mistaken.