lab7: безопасность, mTLS, OpenBao и PKI lifecycle
This commit is contained in:
@@ -0,0 +1,46 @@
|
||||
# HAProxy 3.2; Prometheus must listen only on 127.0.0.1:19090.
|
||||
global
|
||||
log stdout format raw local0
|
||||
maxconn 512
|
||||
hard-stop-after 30s
|
||||
tune.ssl.cachesize 0
|
||||
ssl-default-bind-options ssl-min-ver TLSv1.2 no-tls-tickets
|
||||
|
||||
defaults
|
||||
mode http
|
||||
log global
|
||||
log-format "%ST %Tt %b"
|
||||
option dontlognull
|
||||
option http-server-close
|
||||
timeout connect 2s
|
||||
timeout client 30s
|
||||
timeout server 30s
|
||||
timeout http-request 5s
|
||||
timeout http-keep-alive 2s
|
||||
|
||||
frontend prometheus_https
|
||||
bind :9090 ssl crt /run/identity/current/tls.pem ca-file /run/identity/current/ca.crt crl-file /run/identity/current/ca.crl verify required
|
||||
acl grafana ssl_c_s_dn(CN) -m str grafana
|
||||
acl prometheus ssl_c_s_dn(CN) -m str prometheus
|
||||
acl operator ssl_c_s_dn(CN) -m str operator
|
||||
acl read_method method GET
|
||||
acl query_method method GET POST
|
||||
acl query_path path -m str /api/v1/query /api/v1/query_range /api/v1/labels /api/v1/series /api/v1/metadata
|
||||
acl label_values path -m reg ^/api/v1/label/[A-Za-z_][A-Za-z0-9_]*/values$
|
||||
acl buildinfo_path path -m str /api/v1/status/buildinfo
|
||||
acl health_path path -m str /metrics /-/healthy /-/ready
|
||||
acl status_path path -m str /api/v1/status/buildinfo /api/v1/status/runtimeinfo /api/v1/status/flags /api/v1/status/config /api/v1/status/tsdb /api/v1/targets /api/v1/rules /api/v1/alerts
|
||||
http-request allow if grafana query_method query_path
|
||||
http-request allow if grafana read_method label_values
|
||||
http-request allow if grafana read_method buildinfo_path
|
||||
http-request allow if prometheus read_method health_path
|
||||
http-request allow if operator query_method query_path
|
||||
http-request allow if operator read_method label_values
|
||||
http-request allow if operator read_method health_path
|
||||
http-request allow if operator read_method status_path
|
||||
# No role gets reload, quit, admin, federation, remote-write or OTLP writes.
|
||||
http-request deny deny_status 403
|
||||
default_backend prometheus_private
|
||||
|
||||
backend prometheus_private
|
||||
server local 127.0.0.1:19090
|
||||
Reference in New Issue
Block a user