Skip to content

Stop printing API keys to the log when in debug mode #3328

@MoralCode

Description

@MoralCode

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)

Metadata

Metadata

Labels

good first issue​sGood issues for a newcomer to tacklesecurityRelated to keeping Augur secure

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions