Skip to content

Conversation

davidradl
Copy link
Collaborator

Description

Remove HTTP headers and responses from logs. I have left the lookup keys, uris and http status codes in the logging as these are very unlikely to be sensitive

Resolves HTTP-175

PR Checklist
  • [n/a logging] Tests added
  • [Y] Changelog updated


this.httpPostRequestCallback.call(response, request, "endpoint", Collections.emptyMap());

request.getHttpRequest().uri();
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The result of request.getHttpRequest().uri() is ignored. What is the purpose of this statement?

String requestBody = requestEntry.getElements().stream()
.map(element -> new String(element, StandardCharsets.UTF_8))
.collect(Collectors.joining());
// Uncomment if you want to see the requestBody in the log
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe we should define two Callbacks?

  • one implementation logs the entire request/response, including headers.
  • second implementation skips sensitive parts such as headers?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants