Libki / libki-server

Libki Server
Other
55 stars 28 forks source link

Users can login to a Libki session on the PC without inputting their PIN (SIP2) #351

Closed Phodrum closed 4 months ago

Phodrum commented 4 months ago

Users can login to a Libki session on the PC without inputting their PIN. (Authentication from user’s borrower account on Civica Spydus via SIP2) • When user signs in with Borrower number only and no PIN - they gain access into PC. • When user signs in with Borrower number and wrong PIN – they do not get access PC. (As expected.) • When user signs in with Borrower number and correct PIN – they gain access to PC. (As expected.)

To Reproduce Login to PC via Libki client using only the borrower number and no PIN.

Expected behavior Users to be blocked from entering a session on the PC if they do not input their PIN.

Libki Vesion Libki Install: 20.05 (Server – Ubuntu 20.4.6 LTS Client install: 20.11 installed on PCs running Windows 11

Additional context Configured Libki to authenticate users in Civica Spydus via SIP2.

Have tried adding the “deny_on_field AD:Your PIN is incorrect” line into the libki_local.conf file but this prevents all users from logging in regardless of whether or not they input a PIN.

enable 1 host xxx.xxx.xxx.xxx location xxx username xx password xx terminator CR require_sip_auth 1 enable_split_messages 0 no_password_check 0 deny_on_field AD:Your PIN is incorrect category_field AD pattern_personal_name ,

Has anyone seen this issue previously? Any help or advice would be greatly appreciated – Thank you

kylemhall commented 4 months ago

This sounds like your ILS SIP service response is out of spec. Can you post some of the Libki server logs from when you authenticate? The logs should contain the SIP request and response.

On Wed, Apr 10, 2024 at 9:33 AM Phodrum @.***> wrote:

Users can login to a Libki session on the PC without inputting their PIN. (Authentication from user’s borrower account on Civica Spydus via SIP2) • When user signs in with Borrower number only and no PIN - they gain access into PC. • When user signs in with Borrower number and wrong PIN – they do not get access PC. (As expected.) • When user signs in with Borrower number and correct PIN – they gain access to PC. (As expected.)

To Reproduce Login to PC via Libki client using only the borrower number and no PIN.

Expected behavior Users to be blocked from entering a session on the PC if they do not input their PIN.

Libki Vesion Libki Install: 20.05 (Server – Ubuntu 20.4.6 LTS Client install: 20.11 installed on PCs running Windows 11

Additional context Configured Libki to authenticate users in Civica Spydus via SIP2.

Have tried adding the “deny_on_field AD:Your PIN is incorrect” line into the libki_local.conf file but this prevents all users from logging in regardless of whether or not they input a PIN. enable 1 host xxx.xxx.xxx.xxx location xxx username xx password xx terminator CR require_sip_auth 1 enable_split_messages 0 no_password_check 0 deny_on_field AD:Your PIN is incorrect category_field AD pattern_personal_name ,

Has anyone seen this issue previously? Any help or advice would be greatly appreciated – Thank you

— Reply to this email directly, view it on GitHub https://github.com/Libki/libki-server/issues/351, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAAMK2ILLFWNFFUPHKLDUK3Y4U5TDAVCNFSM6AAAAABGAO3BVGVHI2DSMVQWIX3LMV43ASLTON2WKOZSGIZTKNRRGQ2TMMY . You are receiving this because you are subscribed to this thread.Message ID: @.***>

-- Kyle M. Hall Loose Cannon, ByWater Solutions @.** https://bywatersolutions.com http://bywatersolutions.com/ What is Koha? http://bywatersolutions.com/what-is-koha/*

Phodrum commented 4 months ago

Thanks for your help Kyle.

Here's an extract from our libki_server.log

2024/04/09-08:43:23 Server closing! worker 462177 died, status:0 exiting starting new worker 1686 Setting gid to "0 0" WARNING: MYSQL_OPT_RECONNECT is deprecated and will be removed in a future version. WARNING: MYSQL_OPT_RECONNECT is deprecated and will be removed in a future version. Use of uninitialized value in string eq at /home/libki/libki-server/lib/Libki/Controller/API/Client/v1_0.pm line 249.

Use of uninitialized value in string eq at /home/libki/libki-server/lib/Catalyst/Plugin/LibkiSetting.pm line 329.

Use of uninitialized value in string eq at /home/libki/libki-server/lib/Catalyst/Plugin/LibkiSetting.pm line 339.

Use of uninitialized value in string eq at /home/libki/libki-server/lib/Catalyst/Plugin/LibkiSetting.pm line 329.

Use of uninitialized value in string eq at /home/libki/libki-server/lib/Catalyst/Plugin/LibkiSetting.pm line 339.

Use of uninitialized value in string eq at /home/libki/libki-server/lib/Libki/Controller/API/Client/v1_0.pm line 249.

Use of uninitialized value in string eq at /home/libki/libki-server/lib/Catalyst/Plugin/LibkiSetting.pm line 329.

Use of uninitialized value in string eq at /home/libki/libki-server/lib/Catalyst/Plugin/LibkiSetting.pm line 339.

Use of uninitialized value in string eq at /home/libki/libki-server/lib/Catalyst/Plugin/Use of uninitialized value in string eq at /home/libki/libki-server/lib/Libki/Controller/API/Client/v1_0.pm line 249.

Use of uninitialized value in string eq at /home/libki/libki-server/lib/Catalyst/Plugin/LibkiSetting.pm line 329.

Use of uninitialized value in string eq at /home/libki/libki-server/lib/Catalyst/Plugin/LibkiSetting.pm line 339.

Use of uninitialized value in string eq at /home/libki/libki-server/lib/Catalyst/Plugin/LibkiSetting.pm line 329.

Use of uninitialized value in string eq at /home/libki/libki-server/lib/Catalyst/Plugin/LibkiSetting.pm line 339.

Use of uninitialized value in string eq at /home/libki/libki-server/lib/Libki/Controller/API/Client/v1_0.pm line 249.

Use of uninitialized value in string eq at /home/libki/libki-server/lib/Catalyst/Plugin/LibkiSetting.pm line 329.

Use of uninitialized value in string eq at /home/libki/libki-server/lib/Catalyst/Plugin/LibkiSetting.pm line 339.

Use of uninitialized value in string eq at /home/libki/libki-server/lib/Catalyst/Plugin/LibkiSetting.pm line 329.

Use of uninitialized value in string eq at /home/libki/libki-server/lib/Catalyst/Plugin/LibkiSetting.pm line 339.

Use of uninitialized value in string eq at /home/libki/libki-server/lib/Libki/Controller/API/Client/v1_0.pm line 249.

Use of uninitialized value in string eq at /home/libki/libki-server/lib/Catalyst/Plugin/LibkiSetting.pm line 329.

Use of uninitialized value in string eq at /home/libki/libki-server/lib/Catalyst/Plugin/LibkiSetting.pm line 339.

Use of uninitialized value in string eq at /home/libki/libki-server/lib/Catalyst/Plugin/LibkiSetting.pm line 329.

Use of uninitialized value in string eq at /home/libki/libki-server/lib/Catalyst/Plugin/LibkiSetting.pm line 339.

WARNING: MYSQL_OPT_RECONNECT is deprecated and will be removed in a future version. LibkiSetting.pm line 329.

Use of uninitialized value in string eq at /home/libki/libki-server/lib/Catalyst/Plugin/LibkiSetting.pm line 339.

Use of uninitialized value in string eq at /home/libki/libki-server/lib/Libki/Controller/API/Client/v1_0.pm line 249.

Use of uninitialized value in string eq at /home/libki/libki-server/lib/Catalyst/Plugin/LibkiSetting.pm line 329.

Use of uninitialized value in string eq at /home/libki/libki-server/lib/Catalyst/Plugin/LibkiSetting.pm line 339.

Use of uninitialized value in string eq at /home/libki/libki-server/lib/Catalyst/Plugin/LibkiSetting.pm line 329.

Use of uninitialized value in string eq at /home/libki/libki-server/lib/Catalyst/Plugin/LibkiSetting.pm line 339.

WARNING: MYSQL_OPT_RECONNECT is deprecated and will be removed in a future version. Use of uninitialized value in string eq at /home/libki/libki-server/lib/Libki/Controller/API/Client/v1_0.pm line 249.

Use of uninitialized value in string eq at /home/libki/libki-server/lib/Catalyst/Plugin/LibkiSetting.pm line 329.

Use of uninitialized value in string eq at /home/libki/libki-server/lib/Catalyst/Plugin/LibkiSetting.pm line 339.

Use of uninitialized value in string eq at /home/libki/libki-server/lib/Catalyst/Plugin/LibkiSetting.pm line 329.

Use of uninitialized value in string eq at /home/libki/libki-server/lib/Catalyst/Plugin/LibkiSetting.pm line 339.

DBIx::Class::Storage::DBI::_dbh_execute(): DBI Exception: DBD::mysql::st execute failed: Duplicate entry '172' for key 'sessions.c lient_id' [for Statement "INSERT INTO sessions ( client_id, instance, minutes, session_id, status, user_id) VALUES ( ?, ?, ?, ?, ?, ? )" with ParamValues: 0=172, 1='', 2=60, 3='5980a83ee6edc41e5b1d04c262846eac2360714f', 4='active', 5=4644] at /ho me/libki/libki-server/lib/Libki/Controller/API/CliUse of uninitialized value in string eq at /home/libki/libki-server/lib/Libki/Co ntroller/API/Client/v1_0.pm line 249.

Use of uninitialized value in string eq at /home/libki/libki-server/lib/Catalyst/Plugin/LibkiSetting.pm line 329.

Use of uninitialized value in string eq at /home/libki/libki-server/lib/Catalyst/Plugin/LibkiSetting.pm line 339.

Use of uninitialized value in string eq at /home/libki/libki-server/lib/Catalyst/Plugin/LibkiSetting.pm line 329.

Use of uninitialized value in string eq at /home/libki/libki-server/lib/Catalyst/Plugin/LibkiSetting.pm line 339.

DBIx::Class::Storage::DBI::_dbh_execute(): DBI Exception: DBD::mysql::st execute failed: Duplicate entry '172' for key 'sessions.c lient_id' [for Statement "INSERT INTO sessions ( client_id, instance, minutes, session_id, status, user_id) VALUES ( ?, ?, ?, ?, ?, ? )" with ParamValues: 0=172, 1='', 2=60, 3='252acac3cbd8c59e9e200269d7f3e0c2a5040399', 4='active', 5=4644] at /ho me/libki/libki-server/lib/Libki/Controller/API/Client/v1_0.pm line 361

DBIx::Class::Storage::DBI::_dbh_execute(): DBI Exception: DBD::mysql::st execute failed: Duplicate entry '172' for key 'sessions.c lient_id' [for Statement "INSERT INTO sessions ( client_id, instance, minutes, session_id, status, user_id) VALUES ( ?, ?, ?, ?, ?, ? )" with ParamValues: 0=172, 1='', 2=60, 3='d90a934ff6431827204c4c050fe66d78f2fd1e9c', 4='active', 5=4644] at /ho me/libki/libki-server/lib/Libki/Controller/API/Client/v1_0.pm line 361

DBIx::Class::Storage::DBI::_dbh_execute(): DBI Exception: DBD::mysql::st execute failed: Duplicate entry '172' for key 'sessions.c lient_id' [for Statement "INSERT INTO sessions ( client_id, instance, minutes, session_id, status, user_id) VALUES ( ?, ?, ?, ?, ?, ? )" with ParamValues: 0=172, 1='', 2=60, 3='2f08dd4b4493a5f3cbf5e312f4f8f476d8f747f2', 4='active', 5=4644] at /ho me/libki/libki-server/lib/Libki/Controller/API/Client/v1_0.pm line 361

DBIx::Class::Storage::DBI::_dbh_execute(): DBI Exception: DBD::mysql::st exent/v1_0.pm line 361

DBIx::Class::Storage::DBI::_dbh_execute(): DBI Exception: DBD::mysql::st execute failed: Duplicate entry '172' for key 'sessions.c lient_id' [for Statement "INSERT INTO sessions ( client_id, instance, minutes, session_id, status, user_id) VALUES ( ?, ?, ?, ?, ?, ? )" with ParamValues: 0=172, 1='', 2=60, 3='2038d60454a796edf0bb69222cd4299c93692673', 4='active', 5=4644] at /ho me/libki/libki-server/lib/Libki/Controller/API/Client/v1_0.pm line 361

DBIx::Class::Storage::DBI::_dbh_execute(): DBI Exception: DBD::mysql::st execute failed: Duplicate entry '172' for key 'sessions.c lient_id' [for Statement "INSERT INTO sessions ( client_id, instance, minutes, session_id, status, user_id) VALUES ( ?, ?, ?, ?, ?, ? )" with ParamValues: 0=172, 1='', 2=60, 3='6d8c3837b7b162dab731b01a0d44bfd76198d045', 4='active', 5=4644] at /ho me/libki/libki-server/lib/Libki/Controller/API/Client/v1_0.pm line 361

DBIx::Class::Storage::DBI::_dbh_execute(): DBI Exception: DBD::mysql::st execute failed: Duplicate entry '172' for key 'sessions.c lient_id' [for Statement "INSERT INTO sessions ( client_id, instance, minutes, session_id, status, user_id) VALUES ( ?, ?, ?, ?, ?, ? )" with ParamValues: 0=172, 1='', 2=60, 3='0347dbe82731dfab156d6216015eaa4cf0ec9073', 4='active', 5=4644] at /ho me/libki/libki-server/lib/Libki/Controller/API/Client/v1_0.pm line 361

DBIx::Class::Storage::DBI::_dbh_execute(): DBI Exception: DBD::mysql::st execute failed: Duplicate entry '172' for key 'sessions.c lient_id' [for Statement "INSERT INTO sessions ( client_id, instance, minutes, session_id, status, user_id) VALUES ( ?, ?, ?, ?, ?, ? )" with ParamValues: 0=172, 1='', 2=60, 3='e3f9c1a0742867670ce306b61a84c6701be7dded', 4='active', 5=4644] at /ho me/libki/libki-server/lib/Libki/Controller/API/Client/v1_0.pm line 361

DBIx::Class::Storage::DBI::_dbh_execute(): DBI Exception: DBD::mysql::st execute failed: Duplicate entry '172' for key 'sessions.c lient_id' [for Statement "INSERT INTO sessecute failed: Duplicate entry '172' for key 'sessions.client_id' [for Statement "INSERT INTOsessions(client_id,instance,minutes,session_id,status,user_id`) VALUES ( ?, ?, ?, ?, ?, ? )" with ParamV alues: 0=172, 1='', 2=60, 3='c073997787c4f56521fbf30694c239728a6393c7', 4='active', 5=4644] at /home/libki/libki-server/lib/Libki/ Controller/API/Client/v1_0.pm line 361

DBIx::Class::Storage::DBI::_dbh_execute(): DBI Exception: DBD::mysql::st execute failed: Duplicate entry '172' for key 'sessions.c lient_id' [for Statement "INSERT INTO sessions ( client_id, instance, minutes, session_id, status, user_id) VALUES ( ?, ?, ?, ?, ?, ? )" with ParamValues: 0=172, 1='', 2=60, 3='01dd7d654be812c19eb1e3dfa8be87c5e1902cae', 4='active', 5=4644] at /ho me/libki/libki-server/lib/Libki/Controller/API/Client/v1_0.pm line 361

DBIx::Class::Storage::DBI::_dbh_execute(): DBI Exception: DBD::mysql::st execute failed: Duplicate entry '172' for key 'sessions.c lient_id' [for Statement "INSERT INTO sessions ( client_id, instance, minutes, session_id, status, user_id) VALUES ( ?, ?, ?, ?, ?, ? )" with ParamValues: 0=172, 1='', 2=60, 3='dce1787fee724d90031475a51ad1cd29139d36c9', 4='active', 5=4644] at /ho me/libki/libki-server/lib/Libki/Controller/API/Client/v1_0.pm line 361

DBIx::Class::Storage::DBI::_dbh_execute(): DBI Exception: DBD::mysql::st execute failed: Duplicate entry '172' for key 'sessions.c lient_id' [for Statement "INSERT INTO sessions ( client_id, instance, minutes, session_id, status, user_id) VALUES ( ?, ?, ?, ?, ?, ? )" with ParamValues: 0=172, 1='', 2=60, 3='231791b71bdd438084516a37400969433bc05ab9', 4='active', 5=4644] at /ho me/libki/libki-server/lib/Libki/Controller/API/Client/v1_0.pm line 361

DBIx::Class::Storage::DBI::_dbh_execute(): DBI Exception: DBD::mysql::st execute failed: Duplicate entry '172' for key 'sessions.c lient_id' [for Statement "INSERT INTO sessions ( client_id, instance, minutes, session_id, status, user_id) VALUES ( ?, ?, ?, ?, ?, ? )" with ParamValues: 0=172, 1='', 2=60, 3='e7733e69752ca99f83d95f0ff1dc2189d5089d54', 4='active', 5=4644] at /ho me/libki/libki-server/lib/Libki/Controller/API/Client/v1_0.pm line 361

DBIx::Class::Storage::DBI::_dbh_execute(): DBI Exception: DBD::mysql::st execute failed: Duplicate entry '172' for key 'sessions.c lient_id' [for Statement "INSERT INTO sessions ( client_id, instance, minutes, session_id, status, user_id) VALUES ( ?, ?, ?, ?, ?, ? )" with ParamValues: 0=172, 1='', 2=60, 3='6dd47f3ab8b3c95f7a461ee9f9743ab678f62022', 4='active', 5=4644] at /ho me/libki/libki-server/lib/Libki/Controller/API/Client/v1_0.pm line 361

DBIx::Class::Storage::DBI::_dbh_execute(): DBI Exception: DBD::mysql::st execute failed: Duplicate entry '172' for key 'sessions.c lient_id' [for Statement "INSERT INTO sessions ( client_id, instance, minutes, session_id, status, user_id) VALUES ( ?, ?, ?, ?, ?, ? )" with ParamValues: 0=172, 1='', 2=60, 3='2550aa49386d39307d04cb2cf187235958fdd3ae', 4='acions(client_id,instance,minutes,session_id,status,user_id`) VALUES ( ?, ?, ?, ?, ?, ? )" with ParamValues: 0=172, 1='', 2=60, 3='c96 e95d3cafa8ae8dcddb42e4f53a52501fba9f4', 4='active', 5=4644] at /home/libki/libki-server/lib/Libki/Controller/API/Client/v1_0.pm li ne 361

DBIx::Class::Storage::DBI::_dbh_execute(): DBI Exception: DBD::mysql::st execute failed: Duplicate entry '172' for key 'sessions.c lient_id' [for Statement "INSERT INTO sessions ( client_id, instance, minutes, session_id, status, user_id) VALUES ( ?, ?, ?, ?, ?, ? )" with ParamValues: 0=172, 1='', 2=60, 3='1671dd2a7a04b7c6e2354375711db20e97ce7aa1', 4='active', 5=4644] at /ho me/libki/libki-server/lib/Libki/Controller/API/Client/v1_0.pm line 361

DBIx::Class::Storage::DBI::_dbh_execute(): DBI Exception: DBD::mysql::st execute failed: Duplicate entry '172' for key 'sessions.c lient_id' [for Statement "INSERT INTO sessions ( client_id, instance, minutes, session_id, status, user_id) VALUES ( ?, ?, ?, ?received TERM, sending TERM to all workers:1686 2024/04/10-08:32:57 Server closing! , ?, ? )" with ParamValues: 0=172, 1='', 2=60, 3='322d56aacb7baec580aebe75383ce3c8d25bdac0', 4='active', 5=4644] at /home/libki/li bki-server/lib/Libki/Controller/API/Client/v1_0.pm line 361

tive', 5=4644] at /home/libki/libki-server/lib/Libki/Controller/API/Client/v1_0.pm line 361

DBIx::Class::Storage::DBI::_dbh_execute(): DBI Exception: DBD::mysql::st execute failed: Duplicate entry '172' for key 'sessions.c lient_id' [for Statement "INSERT INTO sessions ( client_id, instance, minutes, session_id, status, user_id) VALUES ( ?, ?, ?, ?, ?, ? )" with ParamValues: 0=172, 1='', 2=60, 3='30cbd30c2d180d6bea77415f8f7851489006e5f1', 4='active', 5=4644] at /ho me/libki/libki-server/lib/Libki/Controller/API/Client/v1_0.pm line 361

DBIx::Class::Storage::DBI::_dbh_execute(): DBI Exception: DBD::mysql::st execute failed: Duplicate entry '172' for key 'sessions.c lient_id' [for Statement "INSERT INTO sessions ( client_id, instance, minutes, session_id, status, user_id) VALUES ( ?, ?, ?, ?, ?, ? )" with ParamValues: 0=172, 1='', 2=60, 3='9c4c18845c0161983eb3afbbf49c4ce06a0be762', 4='active', 5=4644] at /ho me/libki/libki-server/lib/Libki/Controller/API/Client/v1_0.pm line 361

worker 1686 died, status:0 exiting starting new worker 407598 Setting gid to "0 0" WARNING: MYSQL_OPT_RECONNECT is deprecated and will be removed in a future version. WARNING: MYSQL_OPT_RECONNECT is deprecated and will be removed in a future version. received TERM, sending TERM to all workers:407598 2024/04/10-08:36:37 Server closing! worker 407598 died, status:0 exiting starting new worker 408734 Setting gid to "0 0" WARNING: MYSQL_OPT_RECONNECT is deprecated and will be removed in a future version. WARNING: MYSQL_OPT_RECONNECT is deprecated and will be removed in a future version. received TERM, sending TERM to all workers:408734 2024/04/10-08:38:19 Server closing! worker 408734 died, status:0 exiting starting new worker 409255 Setting gid to "0 0" WARNING: MYSQL_OPT_RECONNECT is deprecated and will be removed in a future version. WARNING: MYSQL_OPT_RECONNECT is deprecated and will be removed in a future version. DBIx::Class::Storage::DBI::_dbh_execute(): DBI Exception: DBD::mysql::st execute failed: Duplicate entry '186' for key 'sessions.c lient_id' [for Statement "INSERT INTO sessions ( client_id, instance, minutes, session_id, status, user_id) VALUES ( ?, ?, ?, ?, ?, ? )" with ParamValues: 0=186, 1='', 2=60, 3='209d2246bc078014752f768ad3acc0d3cbc1d35e', 4='active', 5=422] at /hom e/libki/libki-server/lib/Libki/Controller/API/Client/v1_0.pm line 361

DBIx::Class::Storage::DBI::_dbh_execute(): DBI Exception: DBD::mysql::st execute failed: Duplicate entry '186' for key 'sessions.c lient_id' [for Statement "INSERT INTO sessions ( client_id, instance, minutes, session_id, status, user_id) VALUES ( ?, ?, ?, ?, ?, ? )" with ParamValues: 0=186, 1='', 2=60, 3='e7a0b9d941a2552caff47399968261472ac7b7e0', 4='active', 5=2937] at /ho me/libki/libki-server/lib/Libki/Controller/API/Client/v1_0.pm line 361

DBIx::Class::Storage::DBI::_dbh_execute(): DBI Exception: DBD::mysql::st execute failed: Duplicate Use of uninitialized value in s tring eq at /home/libki/libki-server/lib/Libki/Controller/API/Client/v1_0.pm line 249.

Use of uninitialized value in string eq at /home/libki/libki-server/lib/Catalyst/Plugin/LibkiSetting.pm line 329.

Use of uninitialized value in string eq at /home/libki/libki-server/lib/Catalyst/Plugin/LibkiSetting.pm line 339.

Use of uninitialized value in string eq at /home/libki/libki-server/lib/Catalyst/Plugin/LibkiSetting.pm line 329.

Use of uninitialized value in string eq at /home/libki/libki-server/lib/Catalyst/Plugin/LibkiSetting.pm line 339.

Use of uninitialized value in string eq at /home/libki/libki-server/lib/Libki/Controller/API/Client/v1_0.pm line 249.

Use of uninitialized value in string eq at /home/libki/libki-server/lib/Catalyst/Plugin/LibkiSetting.pm line 329.

Use of uninitialized value in string eq at /home/libki/libki-server/lib/Catalyst/Plugin/LibkiSetting.pm line 339.

Use of uninitialized value in string eq at /home/libki/libki-server/lib/Catalyst/Plugin/LibkiSetting.pm line 329.

Use of uninitialized value in string eq at /home/libki/libki-server/lib/Catalyst/Plugin/LibkiSetting.pm line 339.

DBIx::Class::Storage::DBI::_dbh_execute(): DBI Exception: DBD::mysql::st execute failed: Duplicate entry '168' for key 'sessions.c lient_id' [for Statement "INSERT INTO sessions ( client_id, instance, minutes, session_id, status, user_id) VALUES ( ?, ?, ?, ?, ?, ? )" with ParamValues: 0=168, 1='', 2=60, 3='1d6094fcb42d21d77edbe6b9b84f018ab9cc19b4', 4='active', 5=2137] at /ho me/libki/libki-server/lib/Libki/Controller/API/Client/v1_0.pm line 361

DBIx::Class::Storage::DBI::_dbh_execute(): DBI Exception: DBD::mysql::st execute failed: Duplicate entry '168' for key 'sessions.c lient_id' [for Statement "INSERT INTO sessions ( client_id, instance, minutes, session_id, status, user_id) VALUES ( ?, ?, ?, ?, ?, ? )" with ParamValues: 0=168, 1='', 2=60, 3='33bf3177693a818dc00175bba50868f5f7e18d04', 4='active', 5=2137] at /ho me/libki/libki-server/lib/LWARNING: MYSQL_OPT_RECONNECT is deprecated and will be removed in a future version. WARNING: MYSQL_OPT_RECONNECT is deprecated and will be removed in a future version. ibki/Controller/API/Client/v1_0.pm line 361

DBIx::Class::Storage::DBI::_dbh_execute(): DBI Exception: DBD::mysql::st execute failed: Duplicate entry '168' for key 'sessions.c lient_id' [for Statement "INSERT INTO sessions ( client_id, instance, minutes, session_id, status, user_id) VALUES ( ?, ?, ?, ?, ?, ? )" with ParamValues: 0=168, 1='', 2=60, 3='4bce84f54026175488eb30ced5674f8ecce5ae4f', 4='active', 5=2137] at /ho me/libki/libki-server/lib/Libki/Controller/API/Client/v1_0.pm line 361

Use of uninitialized value in string eq at /home/libki/libki-server/lib/Libki/Controller/API/Client/v1_0.pm line 249.

Use of uninitialized value in string eq at /home/libki/libki-server/lib/Catalyst/Plugin/LibkiSetting.pm line 329.

Use of uninitialized value in string eq at /home/libki/libki-server/lib/Catalyst/Plugin/LibkiSetting.pm line 339.

Use of uninitialized value in string eq at /home/libki/libki-server/lib/Catalyst/Plugin/LibkiSetting.pm line 329.

Use of uninitialized value in string eq at /homentry '186' for key 'sessions.client_id' [for Statement "INSERT INTO sessions ( client_id, instance, minutes, session_id, status, user_id) VALUES ( ?, ?, ?, ?, ?, ? )" with ParamValues: 0=186, 1='', 2=60, 3='8297cb9dfd8592fc1e3401924157e04a0f745482', 4='active', 5=2937] at /home/libki/libki-server/lib/Libki/Controller/API/Clien t/v1_0.pm line 361

Argument "" isn't numeric in subtraction (-) at /home/libki/libki-server/lib/Catalyst/Plugin/LibkiSetting.pm line 317.

Use of uninitialized value in string eq at /home/libki/libki-server/lib/Libki/Controller/API/Client/v1_0.pm line 249.

Use of uninitialized value in string eq at /home/libki/libki-server/lib/Catalyst/Plugin/LibkiSetting.pm line 329.

Use of uninitialized value in string eq at /home/libki/libki-server/lib/Catalyst/Plugin/LibkiSetting.pm line 339.

Use of uninitialized value in string eq at /home/libki/libki-server/lib/Catalyst/Plugin/LibkiSetting.pm line 329.

Use of uninitialized value in string eq at /home/libki/libki-server/libe/libki/libki-server/lib/Catalyst/Plugin/LibkiSetting.pm li ne 339.

WARNING: MYSQL_OPT_RECONNECT is deprecated and will be removed in a future version. /Catalyst/Plugin/LibkiSetting.pm line 339.

WARNING: MYSQL_OPT_RECONNECT is deprecated and will be removed in a future version.

kylemhall commented 4 months ago

Can you confirm to me that you are not using SIP?

Phodrum commented 4 months ago

I can confirm I have been been using SIP to authenticate Libki users against their borrower account for three years with over 3000 unique users. (ILS - Spydus)

Libki Sip Authentication

I can see SIP noted in the "Creation source" column in the "users" tab as well as their names and borrower numbers. (All pulled down from Spydus)

kylemhall commented 4 months ago

Can you find any lines in your logs with READ or SEND? This would have the SIP messages in them.

Phodrum commented 4 months ago

Hi Kyle, no sign of READ or SEND in 3000 lines taken from the libki_server.log this afternoon directly after logging in new user into Libki. (Authenticating credentials via SIP)

kylemhall commented 4 months ago

What version of the Libki server are you running?

Phodrum commented 4 months ago

Libki r20.11 - Libki Server v4.2.4

kylemhall commented 4 months ago

That is quite old, nearly 4 years old! Have you tried a newer version? I'd recommend making a backup of your database and upgrading to r24.01. It should be cross-compatible with your currently clients, the clients just won't support any new client side features that show up in the server settings.

kylemhall commented 4 months ago

I did confirm that even on 20.11 Libki is logging SIP messages. What are the contents of your log4perl conf? Are you running Libki server in docker or on a host os?

Phodrum commented 4 months ago

Running Libki on Ubuntu 20.4.6 LTS

I'm pretty sure I have a newer version running on a test server - I'll get SIP setup and try authenticating some users and let you know how I get on - Thank you Kyle.

Contents of log4perl.conf

log4perl.rootLogger = INFO, LOGFILE, SCREEN

log4perl.appender.LOGFILE = Log::Log4perl::Appender::File log4perl.appender.LOGFILE.filename = /var/log/libki/libki.log log4perl.appender.LOGFILE.mode = append log4perl.appender.LOGFILE.layout = PatternLayout log4perl.appender.LOGFILE.layout.ConversionPattern=[%d] [libki] [%p] %m%n

log4perl.appender.SCREEN = Log::Log4perl::Appender::Screen log4perl.appender.SCREEN.stderr = 1 log4perl.appender.SCREEN.layout = Log::Log4perl::Layout::PatternLayout log4perl.appender.SCREEN.layout.ConversionPattern = %m %n

kylemhall commented 4 months ago

I think if you change INFO to DEBUG in your log4perl conf and restart your server those logs will show up!

Phodrum commented 4 months ago

Thank you Kyle, that's the SIP messages appearing in the log file now. I've copied over one such message - see below (I've x'd out the sip server address and my PIN but otherwise everything else is untouched) I've also copied over our SIP configuration - ( see below SIP message)

I'd be grateful if you could have a look at both and maybe assess why a blank PIN filed on the client is allowing users to log in?

Libki::Controller::API::Client::v1_0 - username: B220010, client_name: Test PC1 SIP SERVER: xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx require_sip_auth: 1 TERMINATOR: CR END: 9300CNOV|COOV|CPWES|AY1AZF86B EAD: 941AY1AZFDFC END: 9900302.00AY2AZFCA4 READ: 98YYYYNY99999920240417 0830582.00AF|AG|AM|AN|AO25404|BXYYYYYYYYNYYNNNYY AY2AZEA1A END: 6300120240417 083058 AOWES|AAB220010|AC|ADXXXX|AY3AZF1E2 READ: 64YY Y 00120240417 083058000000000000000200000000AAB220010|AELeggat, Gavin|AF£7.00 outstanding charges|AOWES|BCST|BEgavinleggat@gmail.com|BLYBV7.00|CQY|PCN|AY3AZCD86 ILS verifies B220010 exists ILS verfies that password for user B220010 matches SIP FIELDS: $VAR1 = { 'hold_items_count' => '0000', 'patron_status' => { 'recall_overdue' => ' ', 'too_many_items_charged' => ' ', 'too_many_claims_of_items_returned' => ' ', 'too_many_items_overdue' => ' ', 'card_reported_lost' => ' ', 'excessive_outstanding_fees' => ' ', 'too_many_items_billed' => ' ', 'excessive_outstanding_fines' => ' ', 'charge_privileges_denied' => 'Y', 'recall_privileges_denied' => ' ', 'hold_privileges_denied' => 'Y',

SIP CONFIG

enable 1 host [xxxxxxxxxxxxxxxxxxxxxxxxxx](http://xxxxxxxxxxxxxxxxxxxx/) port 6418 location xxx username xx password xx terminator CR require_sip_auth 1 enable_split_messages 0 no_password_check 0 # If enabled, Libki won't validate the password given against the SIP server, any password will work. fee_limit # Can be either a fee amount, or a SIP2 field that defines the fee limit ( e.g. CC ), delete for no fee limit # You can set SIP2 patron status flags which will deny patrons the ability to log in # You can set as many or as few as you want. Delete these if you don't want to deny patrons. # The full listing is defined in the SIP2 protocol specification # You can require arbitrary SIP fields to have a value of Y for patrons to be allowed to log in. # The format of the setting is Field:Message # Handling of card expiration cases # You can change the field that contains the expiration information (AF in my case) # Change the value that indicates that the card has expired according to the SIP response, in my case, the response contains EXPIRED # Leave EXPIRED_CARD unchanged category_field AC # Category field in SIP response pattern_personal_name , # Pattern for spliting lastname et firstname in personal name field(AE) in SIP response
kylemhall commented 4 months ago

@Phodrum thanks! The reason Libki is allowing the user in is because your ILS is telling Libki the empty password is valid. You should look to find a setting in ILS to disable this behavior. For example, in the Koha ILS there is a SIP config option allow_empty_passwords that determines if an empty password returns a CQ field value of "Y" or not.

Phodrum commented 4 months ago

Thank you so much for your help @kylemhall I'll contact our ILS provider and ask them to make the necessary changes to the behavior as suggested. In the meantime I'll close this thread but will let you know how I get on.