Skip to content

Add ability to pass TLS certs and keys inline#294

Open
fayzal-g wants to merge 5 commits intoweaveworks:masterfrom
fayzal-g:pass-tls-config-inline
Open

Add ability to pass TLS certs and keys inline#294
fayzal-g wants to merge 5 commits intoweaveworks:masterfrom
fayzal-g:pass-tls-config-inline

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