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

Prometheus doesn't elide all secrets in config #2722

Closed
brian-brazil opened this Issue May 15, 2017 · 5 comments

Comments

Projects
None yet
3 participants
@brian-brazil
Copy link
Member

brian-brazil commented May 15, 2017

The way we're hiding secrets in configs is based on a regex that hides the secret as long as it's on the same line as the field name.

This breaks if the secret is spread across multiple lines, such as is common with SSL certs.

We should either hide secrets in all cases, or in no cases to avoid giving a false sense of security.

The proper way to do this would be to re-marshall the YAML with secrets elided. This will however lose all comments, as there doesn't appear to be a Go YAML library that preserves comments.
On the minor plus side we'd be more likely to notice certain rare YAML formatting mistakes.

@fabxc

This comment has been minimized.

Copy link
Member

fabxc commented May 15, 2017

@brian-brazil

This comment has been minimized.

Copy link
Member Author

brian-brazil commented May 15, 2017

I don't think we can do much more with regexes, as we're getting into writing our own parser at that stage.

@mxinden

This comment has been minimized.

Copy link
Member

mxinden commented May 16, 2017

👍 for using dedicated Secret type. Let me know if I can help here and implement it, as it is blocking #2711 a little as well.

@brian-brazil

This comment has been minimized.

Copy link
Member Author

brian-brazil commented May 23, 2017

Okay, lacking a better alternative it looks like we'll be offering up a re-marshalled config without comments.

I suggest keeping the docs around this broad enough that they'll cover a future switch to something with comments.

@lock

This comment has been minimized.

Copy link

lock bot commented Mar 23, 2019

This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.

@lock lock bot locked and limited conversation to collaborators Mar 23, 2019

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
You can’t perform that action at this time.