Koha-clms/misc
Nick Clemens 7ff672e6dc Bug 15720: Add connexion user and password options to connexion daemon
Currently the connexion daemon does not utilize the user and password passed in the requests, it expects a
user and password to be defined in the config file and for that user to be a valid Koha user with
cataloging permissions.

With that user in place all requests to the daemon are authorized.

As the connections are over TCP we allow defining a new connexion user and password to protect Koha account information.

If not defined current behaviour is preserved. Connexion user and password must both be set it either is set.

Sample config file:
host:
port: 8888
koha:http://localhost:8081
log:/var/log/koha/kohadev/connexion.log
match:ISBN
user:kohauser
password:kohapass
overlay_action:replace
nomatch_action:create_new
item_action:always_add
import_mode:redirect
debug:1

To test:
 1 - Create connexion file and save on the Koha serve
 2 - perl misc/bin/connexion_import_daemon.pl -c /kohadevbox/koha/connexion.cnf
 3 - Ensure the user specified above (connexuser) exists and has edit catalogue permissions
 4 - In another terminal make a request to the server:
        echo -en 'U6turtleA9connexionP5shell00024    a62clear00024   4500' | nc -v localhost 8888
 5 - The request should succeed and record added to batch (probably the import fails, but not important)
 6 - Add to config file
        connexion_user:conuser
 7 - Stop and restart the daemon - it should fail on missing connexion_password
 8 - Comment out connexion_user and add
        connexion_password:conpass
 9 - Stop and restart daemon, it fails on missing connexion_user
10 - Uncomment the user and restart
11 - Make another request
        echo -en 'U6turtleA9connexionP5shell00024    a62clear00024   4500' | nc -v localhost 8888
12 - It fails 'Unauthorized request'
13 - Make another request
        echo -en 'U7conuserA9connexionP7conpass00024    a62clear00024   4500' | nc -v localhost 8888
14 - It succeeds!

Signed-off-by: Allison Blanning <ablanning@hotchkiss.org>

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Victor Grousset/tuxayo <victor@tuxayo.net>
2021-05-25 17:09:19 +02:00
..
admin Bug 23193: Make set_password.pl use Koha::Script 2019-06-28 14:34:13 +01:00
bin Bug 15720: Add connexion user and password options to connexion daemon 2021-05-25 17:09:19 +02:00
cronjobs Bug 11344: (QA follow-up) Fix empty section warning 2021-02-09 22:21:05 +01:00
devel Bug 25549: Remove plugin methods for broken plugins 2020-11-17 17:12:38 +13:00
interface_customization Bug 23903: Replace OPAC icons with Font Awesome 2019-10-31 15:40:25 +00:00
load_testing
…
maintenance Bug 24272: Correctly encode output to prevent 'Wide character in say' 2021-02-02 00:44:46 +01:00
migration_tools Bug 24564: Use the same tab as the other subfields within a field 2021-05-25 16:32:07 +02:00
release_notes Update release notes for 19.11.17 release 2021-04-26 20:09:19 +02:00
search_tools Bug 23137: Move cache flushing to the method 2020-05-08 22:35:34 +00:00
translator RMaint: remove .mo file added by mistake in the past 2021-04-26 17:20:12 +02:00
add_date_fields_to_marc_records.pl Bug 22509: (RM follow-up) Add use of Koha::Script base class 2019-06-24 15:08:33 +01:00
batchCompareMARCvsFrameworks.pl
…
batchDeleteUnusedSubfields.pl
…
batchImportMARCWithBiblionumbers.pl Bug 22721: Remove frameworkcode parameter in GetMarcFromKohaField calls 2019-07-15 11:28:08 +01:00
batchRebuildBiblioTables.pl Bug 24827: Standardise on 'UTF-8' as the encoding name 2020-04-03 18:13:57 +00:00
batchRebuildItemsTables.pl Bug 22721: Remove frameworkcode parameter in GetMarcFromKohaField calls 2019-07-15 11:28:08 +01:00
batchRepairMissingBiblionumbers.pl
…
batchdeletebiblios.pl
…
check_sysprefs.pl
…
commit_file.pl
…
export_borrowers.pl
…
export_records.pl
…
exportauth.pl
…
import_patrons.pl Bug 27586: Import patrons script has a confirm switch that doesn't nothing! 2021-02-21 16:18:24 +01:00
koha-install-log Bug 17851: Add Elasticsearch config to koha-conf.xml - Add missing entries to koha-install-log 2019-10-07 14:09:10 +01:00
kohalib.pl
…
link_bibs_to_authorities.pl
…
mod_zebraqueue.pl
…
perlmodule_ls.pl
…
perlmodule_rm.pl
…
recreateIssueStatistics.pl
…
sax_parser_print.pl
…
sax_parser_test.pl
…
sip_cli_emulator.pl Bug 22540: (QA follow-up) fixes 2019-10-08 14:33:34 +01:00
stage_file.pl
…
z3950_responder.pl Bug 13937: Add support for Z39.50 responder to the Debian scripts 2019-10-08 14:40:07 +01:00