From 08c259cda6f7da460d944947811a5677fc8a0053 Mon Sep 17 00:00:00 2001 From: Julien Pivotto Date: Tue, 29 Dec 2020 21:14:45 +0100 Subject: [PATCH] https: Add example configuration file Signed-off-by: Julien Pivotto --- docs/configuration/https.md | 2 ++ documentation/examples/web-config.yml | 12 ++++++++++++ 2 files changed, 14 insertions(+) create mode 100644 documentation/examples/web-config.yml diff --git a/docs/configuration/https.md b/docs/configuration/https.md index 157df84d83..380f9d6426 100644 --- a/docs/configuration/https.md +++ b/docs/configuration/https.md @@ -20,6 +20,8 @@ Generic placeholders are defined as follows: * ``: a regular string that is a secret, such as a password * ``: a regular string +A valid example file can be found [here](/documentation/examples/web-config.yml). + ``` tls_server_config: # Certificate and key files for server to use to authenticate to client. diff --git a/documentation/examples/web-config.yml b/documentation/examples/web-config.yml new file mode 100644 index 0000000000..84e5070612 --- /dev/null +++ b/documentation/examples/web-config.yml @@ -0,0 +1,12 @@ +# TLS and basic authentication configuration example. +# +# Additionally, a certificate and a key file are needed. +tls_server_config: + cert_file: server.crt + key_file: server.key + +# Usernames and passwords required to connect to Prometheus. +# Passwords are hashed with bcrypt: https://github.com/prometheus/exporter-toolkit/blob/master/https/README.md#about-bcrypt +basic_auth_users: + alice: $2y$10$mDwo.lAisC94iLAyP81MCesa29IzH37oigHC/42V2pdJlUprsJPze + bob: $2y$10$hLqFl9jSjoAAy95Z/zw8Ye8wkdMBM8c5Bn1ptYqP/AXyV0.oy0S8m