Closed timmc-edx closed 2 years ago
Note for reviewers: Probably best reviewed commit-by-commit:
Ah right, I remember now that I had a question about that: If I just move this into internal and expose encrypt_for_log
, then the CLI commands will have to call edx_django_utils.logging.internal.log_sensitive
or something. But the CLI isn't internal... Thoughts on that?
Hmm, maybe I can make it a command/entry-point/whatever it's called, in setup.py.
Description:
This is copied from edx-platform, and was introduced there in https://github.com/openedx/edx-platform/pull/29682. Bringing it out into this library will allow it to be used across IDAs, and in particular in the cookie monitoring middleware.
Introduces
log_sensitive
module for public-key encryption of sensitive debug information in log messages, including CLI commands for generating keys and decrypting log output. Exposeslog_sensitive
in logging module.Changes from original:
[encrypted: ...]
wrapper, since I've made that mistake myself a few times. (Not sure if it's worth automating removal, since there are probably a few variations on it.)gen-keys
language that I felt was a little confusingAlso:
log-sensitive
in CLI, since the code is now in aninternal
module.ref: ARCHBOM-2082
JIRA:
ARCHBOM-2082
Merge checklist:
Post merge: