Skip to content

Better method for making sure jsonschema logging does not dump PII into logs #912

@jeffbl

Description

@jeffbl

Right now, we do a fair amount of logging.debug. Specifically when validating schemas, if an error is found, this means that if the entire error object is logged, it will include the full text of the offending JSON tag(s). If this includes information taken from the user's uploaded data, this could be a privacy leak. However,

PROPOSED SOLUTION
After talking to @JRegimbal, it might make sense to create a new log level below debug, e.g. logging.pii(), that is only enabled on testing servers without end-user data, and disabled on production servers. This would entail:

  • create new logging.pii() log level below debug
  • log warning if logging at PII level
  • update preprocessors and handlers to take their log level from config file / docker-compose
  • update preprocessors and handlers to print a reduced/redacted error when in debug or higher log level

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions