Repository navigation
Conversation
…ption if `druid.server.http.showDetailedJettyError` is configured as `false`
…tailedJettyErrors` for the json mapping errors. Updated docs Addressed review comments
|
Current error response looks something like this: We added the flag because we may need to view detailed errors for debugging or other purposes. Initially, we used |
Thanks for the info. |
|
But if the http response is like: I think such information is clear for the users for troubleshooting and there's no need to add stack trace to logs. |
Removed flag Updated docs and unit tests.
Done, thanks |
|
Hi @FrankChen021 / @cryptoe , Just checking in—could you please review the changes once more and let me know if anything is still pending? |
|
@vivek807 Thank you for the patience. The change LGTM. |
…ption (apache#16821) Added flag druid.server.http.showDetailedJsonMappingError similar druid.server.http.showDetailedJettyError to configure error message detail.
Updated error response to hide error stack in case of JsonMappingException if
druid.server.http.showDetailedJsonMappingErroris configured asfalseDescription
Currently when Jackson failed to map request payload either due to required fields or invalid types, it end up exposing too much details about the internal model with 400 response. This can be concerning from security point of view.
It is likely that an attacker may be able to exploit this indeterminate state to access unauthorized functionality, or worse, create, modify or destroy data. Error messages may also aid in the identification of other attacks such as buffer overflows and SQL injection, and can generally contribute to an overall weaker security posture.
The same physical paths, versioning information, stack traces' content, and other data can be gathered and used to help further an attack.
Fixed the bug
Added flag
druid.server.http.showDetailedJsonMappingErrorsimilardruid.server.http.showDetailedJettyErrorto configure error message detail.This PR has: