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

Add ability to pass TLS certs and keys inline #294

Open
wants to merge 5 commits into
base: master
Choose a base branch
from

Conversation

fayzal-g
Copy link

With prometheus/exporter-toolkit#158, it is now possible pass forward TLS certificates and keys inline as part of the TLSConfig for the Server.

This PR also extends the TLSConfig within Server.go to allow the TLS certificate, private key and client CAs to be passed inline as a string. The content of this string is expected to be exactly the as a file, a PEM-encoded sequence of bytes. All parameters are then passed forward to web.TLSConfig within prometheus/exporter-toolkit as before.

server/server.go Outdated
ClientAuth string `yaml:"client_auth_type"`
ClientCAs string `yaml:"client_ca_file"`
TLSCert string `yaml:"cert"`
TLSKey string `yaml:"key"`
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Would we want to make this a config.Secret to avoid printing the value ?

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good point. Updated.

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

Successfully merging this pull request may close these issues.

2 participants