AuthProxy support for barcode-based login

Bug #1203753 reported by Bill Erickson
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Evergreen
Fix Released
Medium
Unassigned
2.3
Fix Released
Undecided
Unassigned
2.4
Fix Released
Undecided
Unassigned

Bug Description

If a user attempts to log in the catalog with a barcode, any AuthProxy authenticators, except the "native" authenticator will fail, the assumption being that the remote authenticator knows nothing about barcodes. This isn't normally a problem, as logging in with remote credentials (e.g. LDAP) usually implies logging in with your username. This does become a problem, however, when usernames and barcodes are identical in a system (say, by policy) and the usernames start with a number, which is the default "i am a barcode" regex for TPAC/JSPAC. In this case, the catalog always attempts a barcode login and AuthProxy always ignores the remote authenticators.

Incidentally, if username == barcode, using a barcode regex will obviously not suffice to differentiate between the two.

My proposal: When a barcode-based login is attempted in open-ils.auth_proxy.login, grab the username from the database matching the barcode and use that instead for all AuthProxy-based logins. Since the login dance within AuthProxy is wholly self-contained, the user ultimately receives an authentication token or a failure event. In either case, the method used within AuthProxy to attempt the login should not concern the caller.

Tags: pullrequest
Revision history for this message
Bill Erickson (berick) wrote :

Since it only required a few lines of code, I've pushed an implementation for review to :

working/user/berick/lp1203753-authproxy-barcode-login

Changed in evergreen:
milestone: none → 2.5.0-alpha1
Bill Erickson (berick)
tags: added: pullrequest
Ben Shum (bshum)
Changed in evergreen:
status: New → Triaged
importance: Undecided → Medium
Revision history for this message
Dan Wells (dbw2) wrote :

The code makes sense and works fine for me; pushed to master. Also, while I think it could go either way, I am going to err on the side of goodness and backport as a bugfix. Thanks, Bill!

Changed in evergreen:
status: Triaged → Fix Committed
Ben Shum (bshum)
Changed in evergreen:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.