Summary: | Elasticsearch authentication using userinfo parameter crashes about.pl | ||
---|---|---|---|
Product: | Koha | Reporter: | Lari Taskula <lari.taskula> |
Component: | About | Assignee: | Lari Taskula <lari.taskula> |
Status: | Pushed to oldstable --- | QA Contact: | Testopia <testopia> |
Severity: | minor | ||
Priority: | P5 - low | CC: | aleisha, dcook, fridolin.somers, julian.maurice, lucas |
Version: | unspecified | ||
Hardware: | All | ||
OS: | All | ||
Change sponsored?: | --- | Patch complexity: | --- |
Documentation contact: | Documentation submission: | ||
Text to go in the release notes: | Version(s) released in: |
24.05.00,23.11.04,23.05.10
|
|
Circulation function: | |||
Bug Depends on: | 33563 | ||
Bug Blocks: | |||
Attachments: |
Bug 36134: Read complete Elasticsearch configuration in about.pl
Bug 36134: Read complete Elasticsearch configuration in about.pl Bug 36134: Read complete Elasticsearch configuration in about.pl |
Description
Lari Taskula
2024-02-20 01:41:15 UTC
Created attachment 162286 [details] [review] Bug 36134: Read complete Elasticsearch configuration in about.pl When enabling Elasticsearch authentication in Koha using userinfo parameter of Search::Elasticsearch, about.pl breaks and gives an internal server error. This patch reads the complete Elasticsearch configuration for about.pl including userinfo causing about.pl to recover. To test: 1. In Elasticsearch 7 settings, set "xpack.security.enabled: true" 2. Add <userinfo>elastic:password</userinfo> to KOHA_CONF elasticsearch settings 3. Restart plack and navigate to about.pl 4. Observe internal server error 5. Apply patch 6. Refresh about.pl 7. Observe it working again Above patch should not change about.pl behavior for Kohas using Basic authentication or no authentication at all for Elasticsearch, but helps those using the "userinfo" setting. Above patch should not change about.pl behavior for Kohas using Basic authentication within "server" setting or no authentication at all for Elasticsearch, but helps those using the "userinfo" setting. The test plan needs some modifications for koha-testing-docker: 1. In the docker-compose.yml file, change xpack.security.enabled=false to xpack.security.enabled=true 2. In the docker-compose.yml file, add another environment variable for the "es" container like the following: ELASTIC_PASSWORD=awesomepassword You'll end up with a koha-conf.xml element like the following then: <userinfo>elastic:awesomepassword</userinfo> Good catch, Lari. Thanks for taking the time to do this. QA tools look good too. Created attachment 162287 [details] [review] Bug 36134: Read complete Elasticsearch configuration in about.pl When enabling Elasticsearch authentication in Koha using userinfo parameter of Search::Elasticsearch, about.pl breaks and gives an internal server error. This patch reads the complete Elasticsearch configuration for about.pl including userinfo causing about.pl to recover. To test: 1. In Elasticsearch 7 settings, set "xpack.security.enabled: true" 2. Add <userinfo>elastic:password</userinfo> to KOHA_CONF elasticsearch settings 3. Restart plack and navigate to about.pl 4. Observe internal server error 5. Apply patch 6. Refresh about.pl 7. Observe it working again Signed-off-by: David Cook <dcook@prosentient.com.au> Created attachment 162366 [details] [review] Bug 36134: Read complete Elasticsearch configuration in about.pl When enabling Elasticsearch authentication in Koha using userinfo parameter of Search::Elasticsearch, about.pl breaks and gives an internal server error. This patch reads the complete Elasticsearch configuration for about.pl including userinfo causing about.pl to recover. To test: 1. In Elasticsearch 7 settings, set "xpack.security.enabled: true" 2. Add <userinfo>elastic:password</userinfo> to KOHA_CONF elasticsearch settings 3. Restart plack and navigate to about.pl 4. Observe internal server error 5. Apply patch 6. Refresh about.pl 7. Observe it working again Signed-off-by: David Cook <dcook@prosentient.com.au> Signed-off-by: Julian Maurice <julian.maurice@biblibre.com> Pushed for 24.05! Well done everyone, thank you! Pushed to 23.11.x for 23.11.04 Backported to 23.05.x for upcoming 23.05.10 |