[Bug 34293] New: ILS-DI returns 200 instead of 403 for unauthorized requests
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=34293 Bug ID: 34293 Summary: ILS-DI returns 200 instead of 403 for unauthorized requests Change sponsored?: --- Product: Koha Version: master Hardware: All OS: All Status: NEW Severity: enhancement Priority: P5 - low Component: Web services Assignee: koha-bugs@lists.koha-community.org Reporter: dcook@prosentient.com.au QA Contact: testopia@bugs.koha-community.org We had a third-party hitting the ILS-DI API and in the logs it said 200, but they were actually getting the "Unauthorized IP address" message. It seems to me that we should have the ILS-DI API reply with 403 in that situation, so that Koha sysadmins can see that the requests are failing. This could also be useful for security monitoring. -- You are receiving this mail because: You are the assignee for the bug. You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=34293 --- Comment #1 from David Cook <dcook@prosentient.com.au> --- Ah right... we can't do that without changing Apache because otherwise it'll use the the generic Koha HTML 403 error document... -- You are receiving this mail because: You are the assignee for the bug. You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=34293 --- Comment #2 from David Cook <dcook@prosentient.com.au> --- (In reply to David Cook from comment #1)
Ah right... we can't do that without changing Apache because otherwise it'll use the the generic Koha HTML 403 error document...
This is something I bumped into at https://bugs.koha-community.org/bugzilla3/page.cgi?id=splinter.html&bug=31982&attachment=142662 -- You are receiving this mail because: You are the assignee for the bug. You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=34293 --- Comment #3 from David Cook <dcook@prosentient.com.au> --- Actually this one is harder because the error message is coming from the ErrorDocument Plack Middleware and not Apache... -- You are receiving this mail because: You are watching all bug changes. You are the assignee for the bug.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=34293 --- Comment #4 from David Cook <dcook@prosentient.com.au> --- So I think this might be impossible without removing Plack::Middleware::ErrorDocument or mounting ilsdi.pl as its own Plack app. The latter could be doable using the following: my $ilsdi_app = Plack::App::WrapCGI->new(script => "/path/to/script.pl")->to_app; mount '/opac/ilsdi.pl' => $ilsdi_app; Plack::App::WrapCGI is what's used under the hood by Plack::App::CGIBin. The path to script would depend on whether or not it's a DEV_INSTALL, but it would be doable. -- But it might not be worth it just to get better HTTP codes... -- You are receiving this mail because: You are watching all bug changes. You are the assignee for the bug.
participants (1)
-
bugzilla-daemon@bugs.koha-community.org