Skip to content
This repository has been archived by the owner on Apr 26, 2024. It is now read-only.

Sanitize logging #187

Merged
merged 11 commits into from
Jun 19, 2015
Merged

Sanitize logging #187

merged 11 commits into from
Jun 19, 2015

Conversation

erikjohnston
Copy link
Member

Related to: SYN-385 and SYN-388

  • Log outgoing requests that use synapse.http.client.SimpleHttpClient
  • Remove access_token's from logs:
    • synapse.http.server
    • SynapseSite's request's __repr__ and __str__
    • insert_client_ip (DEBUG logging) SQL logging is a generic problem here. See comments below
    • synapse.rest.client.v1.transactions {get,store}_response (DEBUG logging)
  • Log the authenticated entity if one is associated with a request, e.g. the server or user.
  • Improve request logging and remove twisted's logging:
    • IP modulo X-Forwarded-For
    • Query params (excluding access_token)
    • HTTP version
    • Response length

@erikjohnston erikjohnston self-assigned this Jun 15, 2015
@erikjohnston
Copy link
Member Author

This pulls in #185

@erikjohnston
Copy link
Member Author

DEBUG level logging includes personal information, like access_token's and message contents. Should these instead be logged in some sort of TRACE level, though python logging doesn't have such a concept.

@erikjohnston erikjohnston removed their assignment Jun 16, 2015
@erikjohnston
Copy link
Member Author

This is ready for review: @NegativeMjark ?

@NegativeMjark
Copy link
Contributor

LGTM

erikjohnston added a commit that referenced this pull request Jun 19, 2015
@erikjohnston erikjohnston merged commit 0e58d19 into develop Jun 19, 2015
@erikjohnston erikjohnston deleted the erikj/sanitize_logging branch July 21, 2015 08:55
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants