Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Config option not to log secrets #1256

Closed
nguilford opened this issue May 26, 2016 · 3 comments
Closed

Config option not to log secrets #1256

nguilford opened this issue May 26, 2016 · 3 comments

Comments

@nguilford
Copy link

Right now when kong starts, it logs the attempt to login to its database with full credentials:

[INFO] database...........postgres host=db.host.com database=kong user=user password=password port=5432

It would be nice to have an option not to log the credentials (user, pw at the very least). This is important for various reasons.

  • developers often need access to logs, but should not have access to db secrets
  • bad developers cut and paste logs into Internet forums, and if those logs contain secrets, that's bad times; developers shouldn't do this, of course, but I should be able to completely mitigate the risk

Suggested fix:
Add an option to /etc/kong/kong.yml to log secrets and default to false:

## PostgreSQL configuration
# postgres:
#   log_secrets: false

## Cassandra configuration
# cassandra:
#   log_secrets: false

This could also be a global config option that applies to all secrets kong may ever use.

@thibaultcha
Copy link
Member

+1. I would actually be in favor of keeping the config simple and simply not print those values at all.

@nguilford
Copy link
Author

Sounds good to me.

@thibaultcha
Copy link
Member

This has been taken care of in the new CLI implementation incoming in 0.9 this month.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants