You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Our REST API for list, accepts a string for offset as valid data when it should only accept a numeric value. When we run offset=somestring, we get the JSON data from the Conjur server without any constraints applied to it as if we were to run conjur list
For example, the returned data would resemble the following
A non-numeric value for offset should return a 500 internal server error like limit does
an invalid value for either offset or limit should result in 422 Unprocessable Entity. The description for this is:
The HyperText Transfer Protocol (HTTP) 422 Unprocessable Entity response status code indicates that the server understands the content type of the request entity, and the syntax of the request entity is correct, but it was unable to process the contained instructions.
A more generic alternative could be just 400 Bad Request. However, that is really intended for when something is wrong in the HTTP protocol itself, rather than in the application-level API expectations. So, I would lean against going that route.
Conjur should really only return a 500 internal server error if it encounters an error we haven't thought to handle yet (see ref), and not one we ever intentionally return.
Summary
Our REST API for list, accepts a string for
offset
as valid data when it should only accept a numeric value. When we runoffset=somestring
, we get the JSON data from the Conjur server without any constraints applied to it as if we were to runconjur list
For example, the returned data would resemble the following
Steps to Reproduce
Steps to reproduce the behavior:
Expected Results
A non-numeric value for
offset
should return a 500 internal server error likelimit
doesActual Results (including error logs, if applicable)
Reproducible
Version/Tag number
All versions
Environment setup
DAP server in AWS, Conjur CLI on my local machine
Additional Information
NA
The text was updated successfully, but these errors were encountered: