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

TLS: only support TLS 1.2 / 1.3 #1687

Merged
merged 2 commits into from
Apr 27, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 5 additions & 2 deletions https/README.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,10 @@
# HTTPS Package for Prometheus

The `https` directory contains a Go package and a sample configuration file for running `node_exporter` with HTTPS instead of HTTP.
When running a server with TLS use the flag `--web.config`
The `https` directory contains a Go package and a sample configuration file for
running `node_exporter` with HTTPS instead of HTTP. We currently support TLS 1.3
and TLS 1.2.

To run a server with TLS, use the flag `--web.config`.

e.g. `./node_exporter --web.config="web-config.yml"`
If the config is kept within the https directory.
Expand Down
4 changes: 3 additions & 1 deletion https/tls_config.go
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,9 @@ func getTLSConfig(configPath string) (*tls.Config, error) {

// ConfigToTLSConfig generates the golang tls.Config from the TLSStruct config.
func ConfigToTLSConfig(c *TLSStruct) (*tls.Config, error) {
cfg := &tls.Config{}
cfg := &tls.Config{
MinVersion: tls.VersionTLS12,
}
if len(c.TLSCertPath) == 0 {
return nil, errors.New("missing TLSCertPath")
}
Expand Down