Wrong response code returned for Okapi module

Description

Tested with the folio-testing Vagrant box (2019-02-05 with Okapi v2.24.0).

Send a DELETE request to API for example:
http://localhost:9130/_/deployment/modules/5b1662f3-13dd-408c-86c0-b27e08658bac
Got response code: 200, which should be 204. The 200 is likely from the auth filters.
HTTP/1.1 200
status: 200
X-Okapi-Trace: DELETE mod-authtoken-2.0.5-SNAPSHOT.41 http://10.0.2.15:9131/_/deployment/modules/5b1662f3-13dd-408c-86c0-b27e08658bac : 202

CSP Request Details

None

CSP Rejection Details

None

Potential Workaround

None

Checklist

hide

TestRail: Results

Activity

Show:

Adam DickmeissFebruary 7, 2019 at 1:33 PM

Yep.. The bug appear to be old.. You'll probably laugh at the fix slightly smiling face

Hongwei JiFebruary 6, 2019 at 3:17 PM

, in your case the auth filter did not kick in because there was no token passed in. Here is how you can reproduce it.

lpmc-hji:testing hji$ vagrant box list bento/ubuntu-16.04 (virtualbox, 201808.24.0) folio/testing (virtualbox, 5.0.0-20190206.1587) lpmc-hji:testing hji$ curl -H "x-okapi-token:eyJhbGciOiJIUzI1NiJ9.eyJzdWIiOiJkaWt1X2FkbWluIiwidXNlcl9pZCI6ImYzYjEzYzUxLTJhODMtNWM0Yy1hMzFjLTU1NTI1OGY2OGM0OSIsImNhY2hlX2tleSI6ImYyMzJkMWNiLWRhMGUtNDRkOC1hY2JiLWExODAyMjdmNjcxNyIsImlhdCI6MTU0OTQ2NTg0NCwidGVuYW50IjoiZGlrdSJ9.04vnq-G4keZNNvLMvYjkMbhOOnDKrbJ60YIerETy5MU" -D- -XDELETE http://localhost:9130/_/deployment/modules/e4d352cb-2a01-4327-93f2-141c0d52f7f3 HTTP/1.1 200 OK X-Okapi-Trace: DELETE mod-authtoken-2.0.5-SNAPSHOT.41 http://10.0.2.15:9131/_/deployment/modules/e4d352cb-2a01-4327-93f2-141c0d52f7f3 : 202 1325719us Content-Type: application/json Transfer-Encoding: chunked

Adam DickmeissFebruary 6, 2019 at 9:21 AM

Can not reproduce:

adam@bagel:~/folio/okapi$ curl -D- -XDELETE http://localhost:9130/_/deployment/modules/c907bd18-e1cc-4469-96dd-71fb3e491b1a HTTP/1.1 204 No Content Content-Type: application/json X-Okapi-Trace: DELETE okapi-2.24.0 /_/deployment/modules/c907bd18-e1cc-4469-96dd-71fb3e491b1a : 204 1011174us adam@bagel:~/folio/okapi$ curl http://localhost:9130/_/version 2.24.0
Done

Details

Assignee

Reporter

Priority

Development Team

Core: Platform

Fix versions

TestRail: Cases

Open TestRail: Cases

TestRail: Runs

Open TestRail: Runs

Created February 5, 2019 at 5:28 PM
Updated January 3, 2020 at 2:26 PM
Resolved February 7, 2019 at 1:09 PM
TestRail: Cases
TestRail: Runs

Flag notifications