-
Notifications
You must be signed in to change notification settings - Fork 995
Description
augur/augur/tasks/util/random_key_auth.py
Line 36 in a632b04
| self.logger.debug(f'Key value used in request: {key_value}') |
This line prints a full API key to the log when in debug mode.
if we are going to be printing secrets in plain text, can we at LEAST pass it through a function to obfuscate the key somehow? (i.e. remove all but the first 6 and last 3 characters of the key, and replace the middle with 6 or so asterisks ******, or even better, find a really small one-way cryptographic hash algorithm to pass the key though)
Separate, but related: The only place I think we should be printing API keys is in the output of the augur github api-keys CLI and maybe the web UI (and even then it should be censored by default without an EXPLICIT opt-in CLI arg or button click)