Nick Clemens
16851a23aa
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: Jonathan Druart <jonathan.druart@bugs.koha-community.org> |
||
---|---|---|
.. | ||
admin | ||
bin | ||
cronjobs | ||
devel | ||
interface_customization | ||
load_testing | ||
maintenance | ||
migration_tools | ||
release_notes | ||
search_tools | ||
translator | ||
add_date_fields_to_marc_records.pl | ||
background_jobs_worker.pl | ||
batchCompareMARCvsFrameworks.pl | ||
batchdeletebiblios.pl | ||
batchDeleteUnusedSubfields.pl | ||
batchImportMARCWithBiblionumbers.pl | ||
batchRebuildBiblioTables.pl | ||
batchRebuildItemsTables.pl | ||
batchRepairMissingBiblionumbers.pl | ||
check_sysprefs.pl | ||
commit_file.pl | ||
export_borrowers.pl | ||
export_records.pl | ||
exportauth.pl | ||
import_patrons.pl | ||
koha-install-log | ||
kohalib.pl | ||
link_bibs_to_authorities.pl | ||
load_yaml.pl | ||
mod_zebraqueue.pl | ||
perlmodule_ls.pl | ||
perlmodule_rm.pl | ||
recreateIssueStatistics.pl | ||
sax_parser_print.pl | ||
sax_parser_test.pl | ||
sip_cli_emulator.pl | ||
stage_file.pl | ||
z3950_responder.pl |