Bug 18950 - Elasticsearch - Add password access for admin functions
Summary: Elasticsearch - Add password access for admin functions
Status: NEW
Alias: None
Product: Koha
Classification: Unclassified
Component: Searching - Elasticsearch (show other bugs)
Version: master
Hardware: All All
: P5 - low enhancement (vote)
Assignee: Bugs List
QA Contact:
URL:
Keywords:
Depends on: 18948
Blocks:
  Show dependency treegraph
 
Reported: 2017-07-18 12:07 UTC by Nick Clemens
Modified: 2022-01-28 14:52 UTC (History)
5 users (show)

See Also:
Change sponsored?: ---
Patch complexity: Trivial patch
Documentation contact:
Documentation submission:
Text to go in the release notes:
Version(s) released in:


Attachments
Bug 18950 - Elasticsearch - Add password access for admin functions (6.28 KB, patch)
2017-07-18 12:11 UTC, Nick Clemens
Details | Diff | Splinter Review
Bug 18950 - Elasticsearch - Add password access for admin functions (6.62 KB, patch)
2017-07-20 20:25 UTC, Nick Clemens
Details | Diff | Splinter Review

Note You need to log in before you can comment on or make changes to this bug.
Description Nick Clemens 2017-07-18 12:07:47 UTC
This patchset adds a parameter to the koha-conf.xml file:
<elasticsearch_admin_password>

When defined additional actions will be enabled on the Search engine configuration page

Password must be entered and action chosen, if password matches the action will be performed
Comment 1 Nick Clemens 2017-07-18 12:11:32 UTC
Created attachment 65088 [details] [review]
Bug 18950 - Elasticsearch - Add password access for admin functions

To test:
1 - Load 'Search engine configuration' from admin page
http://localhost:8081/cgi-bin/koha/admin/searchengine/elasticsearch/mappings.pl
2 - Verify this works as before the patch
3 - Add <elasticsearch_admin_password> to koha-conf.xml
4 - Reload search config page, note additional option to reset mappings
5 - Attempt reset with bad password
6 - Attempt reset with correct password

Note: the action is a drop down as reindexing will be added, however,
    code needs some refactoring before this option can be implemented
Comment 2 Nick Clemens 2017-07-20 20:25:06 UTC
Created attachment 65160 [details] [review]
Bug 18950 - Elasticsearch - Add password access for admin functions

To test:
1 - Load 'Search engine configuration' from admin page
http://localhost:8081/cgi-bin/koha/admin/searchengine/elasticsearch/mappings.pl
2 - Verify this works as before the patch
3 - Add <elasticsearch_admin_password> to koha-conf.xml
4 - Reload search config page, note additional option to reset mappings
5 - Attempt reset with bad password
6 - Attempt reset with correct password
7 - Attempt a reindex with bad password
8 - Attempt a reindex with correct password
Comment 3 David Bourgault 2017-11-03 20:29:44 UTC
Patch applies, and basic functionality is there, however:

- "Reindex" checked for password correctly but failed since 18948 does not apply for me (not an issue, just a note)

- The password input field is of type=text but should be of type=password
- The error message when you enter a wrong password should probably more obvious (like being red, or using the standard koha warning boxes)
- I'd suggest moving the <elasticsearch_admin_password> XML node inside the <elasticsearch> group, seems cleaner to me.
Comment 4 Nick Clemens 2019-03-26 15:23:57 UTC
Not working on this one