Skip to content

Commit

Permalink
Remove session key from datadog logs
Browse files Browse the repository at this point in the history
Otherwise, anyone accessing datadog can impersonate any user.
  • Loading branch information
francoisfreitag committed Apr 29, 2024
1 parent ec770fa commit b5c0795
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion itou/utils/logging.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@

class ItouDataDogJSONFormatter(datadog.DataDogJSONFormatter):
# We don't want those information in our logs
LOG_KEYS_TO_REMOVE = ["usr.name", "usr.email"]
LOG_KEYS_TO_REMOVE = ["usr.name", "usr.email", "usr.session_key"]

def json_record(self, message, extra, record):
log_entry_dict = super().json_record(message, extra, record)
Expand Down

0 comments on commit b5c0795

Please sign in to comment.