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

Log config to console for debugging purposes #235

Open
lannonbr opened this issue Jun 8, 2021 · 0 comments
Open

Log config to console for debugging purposes #235

lannonbr opened this issue Jun 8, 2021 · 0 comments
Assignees
Labels
enhancement Planned feature

Comments

@lannonbr
Copy link
Member

lannonbr commented Jun 8, 2021

It was brought up that printing out the resolved config would be useful to verify that a config was properly configured. This could be a console.log call in a node app using source-configs, but given many use cases include secrets like database passwords, it could be fine when working locally but dangerous if this is running in a production environment where someone who has access to the logs can view all of the credentials.

Instead, I suggest two features:

  1. The ability to declare a config setting as a secret from a config schema.
  2. A print function that prints out the resolved config in a formatted fashion. If it sees a config field that was set in the schema as a secret, it could mask it out like **** so one knows it was set but not defined.

As well it was mentioned the masking of a setting could be dependent on the environment it is in, so in dev / staging you could let the secrets be printed out, but not for production. We could either have a toggle for this within the print function or set it based upon the NODE_ENV environment variable.

@lannonbr lannonbr added the enhancement Planned feature label Jun 8, 2021
@kethinov kethinov self-assigned this Jun 26, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement Planned feature
Development

No branches or pull requests

2 participants