config: add metrics_basic_auth option (#1917)

* config: add metrics_basic_auth option

* remove println

* use constant time compare
This commit is contained in:
Caleb Doxsey 2021-02-22 13:37:18 -07:00 committed by GitHub
parent 03d8ffaee2
commit 8b42eb5ebd
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
8 changed files with 309 additions and 170 deletions

View file

@ -496,6 +496,20 @@ As of `v0.9`, Pomerium uses [envoy](https://www.envoyproxy.io/) for the data pla
All metrics coming from envoy will be labeled with `service="pomerium"` or `service="pomerium-proxy"`, depending if you're running all-in-one or distributed service mode.
### Metrics Basic Authentication
- Environmental Variable: `METRICS_BASIC_AUTH`
- Config File Key: `metrics_basic_auth`
- Type: base64 encoded `string` of `username:password`
- Example: `eDp5` (for username: x, and password: y)
- Default: ``
- Optional
Require [Basic HTTP Authentication](https://tools.ietf.org/html/rfc7617) to access the metrics endpoint.
To support this in Prometheus, consult the `basic_auth` option in the [`scrape_config`](https://prometheus.io/docs/prometheus/latest/configuration/configuration/#scrape_config)
documentation.
### Proxy Log Level
- Environmental Variable: `PROXY_LOG_LEVEL`
- Config File Key: `proxy_log_level`

View file

@ -562,6 +562,20 @@ settings:
All metrics coming from envoy will be labeled with `service="pomerium"` or `service="pomerium-proxy"`, depending if you're running all-in-one or distributed service mode.
shortdoc: |
Expose a prometheus format HTTP endpoint on the specified port.
- name: "Metrics Basic Authentication"
keys: ["metrics_basic_auth"]
attributes: |
- Environmental Variable: `METRICS_BASIC_AUTH`
- Config File Key: `metrics_basic_auth`
- Type: base64 encoded `string` of `username:password`
- Example: `eDp5` (for username: x, and password: y)
- Default: ``
- Optional
doc: |
Require [Basic HTTP Authentication](https://tools.ietf.org/html/rfc7617) to access the metrics endpoint.
To support this in Prometheus, consult the `basic_auth` option in the [`scrape_config`](https://prometheus.io/docs/prometheus/latest/configuration/configuration/#scrape_config)
documentation.
- name: "Proxy Log Level"
keys: ["proxy_log_level"]
attributes: |