Skip to content

BE: Make it possible to hide stacktraces in HTTP responses #536

@PhilGrayson-flutterint

Description

@PhilGrayson-flutterint

Issue submitter TODO list

  • I've searched for an already existing issues here
  • I'm running a supported version of the application which is listed here and the feature is not present there

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 a stackTrace 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

Metadata

Metadata

Assignees

Labels

good first issueUp for grabshacktoberfestIssues good for hacktoberfest goalscope/backendRelated to backend changesstatus/triage/completedAutomatic triage completedtype/enhancementEn enhancement/improvement to an already existing featuretype/securityPull requests that address a security vulnerability

Projects

Status

In Review

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions