Closed kcranston closed 10 months ago
I think that all methods in otcetera do POST and OPTIONS but not GET. So tnrs, taxonomy, and conflict would also need POST permission.
Also maybe the part that redirects to ws_wrapper instead of taxomachine should be a separate commit. (Sorry if that is too nit-picky).
I'm going to spin up a new machine and test it!
Invalid command 'AllowMethods', perhaps misspelled or defined by a module not included in the server configuration
Action 'graceful' failed.
The Apache error log may have more information.
Maybe you need mod_allowmethods running in apache? https://httpd.apache.org/docs/2.4/mod/mod_allowmethods.html
See existing a2enmod commands here, probably can add this at the end.
EDIT to fix the link, durnit.
Requires installation of mod_allowmethods module, if not already installed.
Yup - module probably not installed by default.
Ah right! No points will be awarded on reading comprehension for meeee. I'll try with proper installs shortly!
Deployed on ot54 - does successfully prevent top level post, but restrictions cause a bunch of other tests to fail. Continuing to dig into it, but updating here:
Estudies.tree_get.test_get_tree.v3: . Wrong status code. Expected 200. Got 403.
Efrontend.top.test_about.v3: . Wrong status code. Expected 200. Got 403.
Efrontend.top.test_references.v3: . Wrong status code. Expected 200. Got 403.
Efrontend.top.test_top.v3: . Wrong status code. Expected 200. Got 403.
Efrontend.top.test_curator.v3: . Wrong status code. Expected 200. Got 403.
Estudies.properties.test_properties.v3: . Wrong status code. Expected 200. Got 405.
Estudies.find_studies.test_find_by_curator.v3: . Wrong status code. Expected 200. Got 405.
Estudies.study_list.test_study_list.v3: . Wrong status code. Expected 200. Got 403.
Estudies.find_trees.test_find_by_ott_id.v3: . Wrong status code. Expected 200. Got 405.
Estudies.study_get.test_get_oldversion_nexml2json.v3: . Wrong status code. Expected 200. Got 403.
EEstudies.file_get.test_file.v3: . Wrong status code. Expected 200. Got 403.
studies.find_studies.test_find_all.v3: . Wrong status code. Expected 200. Got 405.
Estudies.find_studies.test_find_by_doi.v3: . Wrong status code. Expected 200. Got 405.
Estudies.study_get.test_404.v3: . Wrong status code. Expected 404. Got 403.
Estudies.study_get.test_get.v3: . Wrong status code. Expected 200. Got 403.
closing because we moved to ansible https://github.com/OpenTreeOfLife/ot-ansible/issues/39
First pass at config changes to restrict http verbs. Also changes tnrs from neo4j to otcetera. Needs review to confirm 1) correct ports for otc and 2) which methods require opening up POST.
Requires installation of mod_allowmethods module, if note already installed.