[Bug 34313] New: Make password validation endpoint return patron ids
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=34313 Bug ID: 34313 Summary: Make password validation endpoint return patron ids Change sponsored?: --- Product: Koha Version: master Hardware: All OS: All Status: NEW Severity: enhancement Priority: P5 - low Component: REST API Assignee: koha-bugs@lists.koha-community.org Reporter: tomascohen@gmail.com CC: tomascohen@gmail.com With the `identifier` parameter passed for validating a password, as introduced by bug 32739, the identifier will be matched against `userid` and `cardnumber`. It would be useful to return both the userid and cardnumber of the patron if validation is correct. -- You are receiving this mail because: You are watching all bug changes. You are the assignee for the bug.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=34313 Tomás Cohen Arazi <tomascohen@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Assignee|koha-bugs@lists.koha-commun |tomascohen@gmail.com |ity.org | Depends on| |32739 Referenced Bugs: https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=32739 [Bug 32739] REST API: Extend endpoint /auth/password/validation for cardnumber -- You are receiving this mail because: You are the assignee for the bug. You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=34313 Tomás Cohen Arazi <tomascohen@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Patch complexity|--- |Trivial patch Status|NEW |Needs Signoff -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=34313 --- Comment #1 from Tomás Cohen Arazi <tomascohen@gmail.com> --- Created attachment 153685 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=153685&action=edit Bug 34313: Unit tests -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=34313 --- Comment #2 from Tomás Cohen Arazi <tomascohen@gmail.com> --- Created attachment 153686 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=153686&action=edit Bug 34313: Add patron information in pass validation response This patch makes the password validation response return the following patron attributes to the API consumer: * cardnumber * userid This will give hints on what was used to validate in the fallback bahvior the endpoint has. To test: 1. Apply the unit tests patch 2. Run: $ ktd --shell k$ prove t/db_dependent/api/v1/password_validation.t => FAIL: The endpoint doesn't return this valuable data 3. Apply this patch 4. Repeat 2 => SUCESS: Tests pass! We got the cardnumber and the userid! 5. Sign off :-D -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=34313 Tomás Cohen Arazi <tomascohen@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #153685|0 |1 is obsolete| | Attachment #153686|0 |1 is obsolete| | --- Comment #3 from Tomás Cohen Arazi <tomascohen@gmail.com> --- Created attachment 153690 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=153690&action=edit Bug 34313: Unit tests -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=34313 --- Comment #4 from Tomás Cohen Arazi <tomascohen@gmail.com> --- Created attachment 153691 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=153691&action=edit Bug 34313: Add patron information in pass validation response This patch makes the password validation response return the following patron attributes to the API consumer: * cardnumber * userid This will give hints on what was used to validate in the fallback bahvior the endpoint has. To test: 1. Apply the unit tests patch 2. Run: $ ktd --shell k$ prove t/db_dependent/api/v1/password_validation.t => FAIL: The endpoint doesn't return this valuable data 3. Apply this patch 4. Repeat 2 => SUCESS: Tests pass! We got the cardnumber and the userid! 5. Sign off :-D -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=34313 David Cook <dcook@prosentient.com.au> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |dcook@prosentient.com.au --- Comment #5 from David Cook <dcook@prosentient.com.au> --- This will have some potential consequences for users of the existing API but they should be manageable. I think this sounds like a reasonable change. At a minimum, getting the patron_id back is useful. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=34313 Katrin Fischer <katrin.fischer@bsz-bw.de> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Needs Signoff |Signed Off -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=34313 Katrin Fischer <katrin.fischer@bsz-bw.de> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #153690|0 |1 is obsolete| | --- Comment #6 from Katrin Fischer <katrin.fischer@bsz-bw.de> --- Created attachment 153787 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=153787&action=edit Bug 34313: Unit tests Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=34313 Katrin Fischer <katrin.fischer@bsz-bw.de> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #153691|0 |1 is obsolete| | --- Comment #7 from Katrin Fischer <katrin.fischer@bsz-bw.de> --- Created attachment 153788 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=153788&action=edit Bug 34313: Add patron information in pass validation response This patch makes the password validation response return the following patron attributes to the API consumer: * cardnumber * userid This will give hints on what was used to validate in the fallback bahvior the endpoint has. To test: 1. Apply the unit tests patch 2. Run: $ ktd --shell k$ prove t/db_dependent/api/v1/password_validation.t => FAIL: The endpoint doesn't return this valuable data 3. Apply this patch 4. Repeat 2 => SUCESS: Tests pass! We got the cardnumber and the userid! 5. Sign off :-D Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=34313 --- Comment #8 from Tomás Cohen Arazi <tomascohen@gmail.com> --- (In reply to David Cook from comment #5)
This will have some potential consequences for users of the existing API but they should be manageable.
You mean the change of the returned status code? It will still mean success for all libraries I know about, and people are not using the response body so there will be no surprise, I hope :-D -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=34313 --- Comment #9 from David Cook <dcook@prosentient.com.au> --- (In reply to Tomás Cohen Arazi from comment #8)
(In reply to David Cook from comment #5)
This will have some potential consequences for users of the existing API but they should be manageable.
You mean the change of the returned status code? It will still mean success for all libraries I know about, and people are not using the response body so there will be no surprise, I hope :-D
I have some code that checks for 204 specifically. I should've just had it check for a success. Not a big deal to fix that one though. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=34313 Katrin Fischer <katrin.fischer@bsz-bw.de> changed: What |Removed |Added ---------------------------------------------------------------------------- Summary|Make password validation |Make password validation |endpoint return patron ids |endpoint return patron IDs -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=34313 Nick Clemens <nick@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Signed Off |Passed QA -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=34313 Nick Clemens <nick@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #153787|0 |1 is obsolete| | --- Comment #10 from Nick Clemens <nick@bywatersolutions.com> --- Created attachment 154462 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=154462&action=edit Bug 34313: Unit tests Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de> Signed-off-by: Nick Clemens <nick@bywatersolutions.com> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=34313 Nick Clemens <nick@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #153788|0 |1 is obsolete| | --- Comment #11 from Nick Clemens <nick@bywatersolutions.com> --- Created attachment 154463 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=154463&action=edit Bug 34313: Add patron information in pass validation response This patch makes the password validation response return the following patron attributes to the API consumer: * cardnumber * userid This will give hints on what was used to validate in the fallback bahvior the endpoint has. To test: 1. Apply the unit tests patch 2. Run: $ ktd --shell k$ prove t/db_dependent/api/v1/password_validation.t => FAIL: The endpoint doesn't return this valuable data 3. Apply this patch 4. Repeat 2 => SUCESS: Tests pass! We got the cardnumber and the userid! 5. Sign off :-D Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de> Signed-off-by: Nick Clemens <nick@bywatersolutions.com> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=34313 Tomás Cohen Arazi <tomascohen@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Passed QA |Pushed to master Version(s)| |23.11.00 released in| | -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=34313 --- Comment #12 from Tomás Cohen Arazi <tomascohen@gmail.com> --- Pushed to master for 23.11. Nice work everyone, thanks! -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=34313 Fridolin Somers <fridolin.somers@biblibre.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Pushed to master |Pushed to stable CC| |fridolin.somers@biblibre.co | |m Version(s)|23.11.00 |23.11.00,23.05.04 released in| | --- Comment #13 from Fridolin Somers <fridolin.somers@biblibre.com> --- Pushed to 23.05.x for 23.05.04 -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=34313 Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |matt.blenkinsop@ptfs-europe | |.com Status|Pushed to stable |RESOLVED Resolution|--- |FIXED --- Comment #14 from Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com> --- Enhancement - not backporting to 22.11.x Nice work everyone! -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=34313 --- Comment #15 from Tomás Cohen Arazi <tomascohen@gmail.com> --- (In reply to Matt Blenkinsop from comment #14)
Enhancement - not backporting to 22.11.x
Nice work everyone!
Van you reconsider for the LTS release? It could be used by external systems to avoid using ILS-DI for validating users. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=34313 --- Comment #16 from Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com> --- VAR: Decision overturned Tomas' point makes sense, will reset the bug and backport to 22.11.x -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=34313 Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|RESOLVED |REOPENED Resolution|FIXED |--- -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=34313 Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|REOPENED |Needs Signoff -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=34313 Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Needs Signoff |Signed Off -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=34313 Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Signed Off |Passed QA -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=34313 Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Passed QA |Pushed to stable -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=34313 Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Version(s)|23.11.00,23.05.04 |23.11.00,23.05.04,22.11.10 released in| | Status|Pushed to stable |Pushed to oldstable -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=34313 --- Comment #17 from Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com> --- Nice work everyone! Pushed to oldstable for 22.11.x -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=34313 --- Comment #18 from David Cook <dcook@prosentient.com.au> --- Note: If the user has a userid but no cardnumber, they will fail to authenticate. (One day, we'll return borrowernumber when we authenticate...) -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=34313 --- Comment #19 from Tomás Cohen Arazi (tcohen) <tomascohen@gmail.com> --- (In reply to Matt Blenkinsop from comment #16)
VAR: Decision overturned
:sweat_smile: just noted -- You are receiving this mail because: You are watching all bug changes. You are the assignee for the bug.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=34313 --- Comment #20 from David Cook <dcook@prosentient.com.au> --- (In reply to Matt Blenkinsop from comment #16)
VAR: Decision overturned
Just noticed this comment. It made me chuckle first thing Monday morning ^_^. -- You are receiving this mail because: You are the assignee for the bug. You are watching all bug changes.
participants (1)
-
bugzilla-daemon@bugs.koha-community.org