BE: Make it possible to hide stacktraces in HTTP responses #536
Labels
good first issue
Up for grabs
hacktoberfest
Issues good for hacktoberfest goal
scope/backend
Related to backend changes
status/triage/completed
Automatic triage completed
type/enhancement
En enhancement/improvement to an already existing feature
type/security
Pull requests that address a security vulnerability
Issue submitter TODO list
Is your proposal related to a problem?
No response
Describe the feature you're interested in
When you visit an API path that does not exist like
/api/foobar
, Kafka-UI prints a JSON response containing astackTrace
field.I'd like to be able to prevent the stacktrace from being printed as a defence in depth strategy to limit exposing implementation detail that could be used to scan for known vulnerabilities. This is to address https://owasp.org/www-community/Improper_Error_Handling.
I appreciate that Kafka-UI displays the currently-deployed git commit short hash in the header, and since Kafka-UI is open-source, that can also be used to discover the library dependency tree. However, I think addressing that is outside the scope of this request.
Describe alternatives you've considered
I tried to use Spring web native property server.error.include-stacktrace to prevent this, but that didn't work.
I see the stacktrace is always being added in GlobalErrorWebExceptionHandler.java class.
Version you're running
8c70126
Additional context
No response
The text was updated successfully, but these errors were encountered: