Depending on the content of the request body, the request should be accepted or rejected consistently.
Currently Cinder doesn’t have a consistent request validation layer.
(_stream_readable.js:3) at Cleartext as _read at Cleartext Stream.
(_stream_readable.js:3) at Encrypted Stream.write as _write at do Write (_stream_writable.js:2) at write Or Buffer (_stream_writable.js:216:5) at Encrypted Stream.
There is inherently no body and the error happens before the hook above runs.
Here is an example of the output error: DELETE /v1/core/Functional Test/dynamicagents/200 duration: 1241ms error: Error: Parse Error at Cleartext Stream.socket On Data (http.js:16) at Cleartext [as _read] (tls.js:5) at Cleartext Stream.
So if we add schema validation for v3 then we will have to remove the existing validation of parameters which is there inside of controller methods which will again break the v2 apis.
Solution: Tempest tests can be added as each resource is validated against its schema.
While updating service user can pass ‘host’ and ‘binary’ of more than 255 characters which obviously fails with 404 Service Not Found wasting a database call.
These tests should walk through invalid request types.
@netmilk I have attempted to use this and it still fails.
For this we can restrict the ‘host’ and ‘binary’ of maximum 255 characters only in schema definition of ‘services’.
If user passes more than 255 characters, he/she will get 400 Bad Request in response.