Защитить мессенджер TLS и OpenBao и проверить отзыв прав worker
This commit is contained in:
@@ -0,0 +1,7 @@
|
||||
listen broker
|
||||
mode tcp
|
||||
bind :6380 ssl crt /run/tls/server/service.pem verify required ca-file /run/tls/trust/ca.crt crl-file /run/tls/trust/revoked.crl
|
||||
acl allowed_identity ssl_c_s_dn(CN) -m str api-client relay-client worker-client
|
||||
tcp-request inspect-delay 1s
|
||||
tcp-request content reject unless allowed_identity
|
||||
server local 127.0.0.1:6379
|
||||
@@ -0,0 +1,13 @@
|
||||
listen loki
|
||||
mode http
|
||||
bind :3100 ssl crt /run/tls/server/service.pem verify required ca-file /run/tls/trust/ca.crt crl-file /run/tls/trust/revoked.crl
|
||||
acl allowed_identity ssl_c_s_dn(CN) -m str collector-client grafana-client
|
||||
http-request deny unless allowed_identity
|
||||
acl ingestion path /otlp/v1/logs
|
||||
acl collector ssl_c_s_dn(CN) -m str collector-client
|
||||
http-request deny if ingestion !collector
|
||||
http-request deny if collector !ingestion
|
||||
http-request deny if !collector !{ method GET POST }
|
||||
http-request deny if !collector !{ path_beg /loki/api/v1/ /ready }
|
||||
http-request deny if !collector { path_beg /loki/api/v1/delete }
|
||||
server local 127.0.0.1:13100
|
||||
@@ -0,0 +1,23 @@
|
||||
listen ingest
|
||||
mode http
|
||||
bind :4319 ssl crt /run/tls/server/service.pem verify required ca-file /run/tls/trust/ca.crt crl-file /run/tls/trust/revoked.crl
|
||||
acl allowed_identity ssl_c_s_dn(CN) -m str api-client worker-client relay-client
|
||||
http-request deny unless allowed_identity
|
||||
http-request deny unless { method POST } { path_beg /v1/ }
|
||||
server local 127.0.0.1:4318
|
||||
|
||||
listen scrape
|
||||
mode http
|
||||
bind :8889 ssl crt /run/tls/server/service.pem verify required ca-file /run/tls/trust/ca.crt crl-file /run/tls/trust/revoked.crl
|
||||
acl allowed_identity ssl_c_s_dn(CN) -m str prometheus-client
|
||||
http-request deny unless allowed_identity
|
||||
http-request deny unless { path /metrics }
|
||||
server local 127.0.0.1:18889
|
||||
|
||||
listen self_metrics
|
||||
mode http
|
||||
bind :8888 ssl crt /run/tls/server/service.pem verify required ca-file /run/tls/trust/ca.crt crl-file /run/tls/trust/revoked.crl
|
||||
acl allowed_identity ssl_c_s_dn(CN) -m str prometheus-client
|
||||
http-request deny unless allowed_identity
|
||||
http-request deny unless { path /metrics }
|
||||
server local 127.0.0.1:18888
|
||||
@@ -0,0 +1,3 @@
|
||||
local all all trust
|
||||
hostssl all all all scram-sha-256
|
||||
hostnossl all all all reject
|
||||
Executable
+6
@@ -0,0 +1,6 @@
|
||||
#!/bin/sh
|
||||
set -eu
|
||||
install -d -m 0700 -o postgres /tmp/postgres-tls
|
||||
install -m 0600 -o postgres /run/tls/server/service.key /tmp/postgres-tls/server.key
|
||||
install -m 0644 -o postgres /run/tls/server/service.crt /tmp/postgres-tls/server.crt
|
||||
exec /usr/local/bin/docker-entrypoint.sh "$@"
|
||||
@@ -0,0 +1,8 @@
|
||||
listen prometheus
|
||||
mode http
|
||||
bind :9090 ssl crt /run/tls/server/service.pem verify required ca-file /run/tls/trust/ca.crt crl-file /run/tls/trust/revoked.crl
|
||||
acl allowed_identity ssl_c_s_dn(CN) -m str grafana-client
|
||||
http-request deny unless allowed_identity
|
||||
http-request deny unless { path_beg /api/v1/ /-/ready }
|
||||
http-request deny if { path_beg /api/v1/admin/ }
|
||||
server local 127.0.0.1:19090
|
||||
@@ -0,0 +1,11 @@
|
||||
global
|
||||
log stdout format raw local0
|
||||
maxconn 256
|
||||
ssl-default-bind-options ssl-min-ver TLSv1.2 no-tls-tickets
|
||||
|
||||
defaults
|
||||
log global
|
||||
timeout connect 2s
|
||||
timeout client 30s
|
||||
timeout server 30s
|
||||
retries 0
|
||||
@@ -0,0 +1,15 @@
|
||||
listen otlp
|
||||
mode http
|
||||
bind :4318 ssl crt /run/tls/server/service.pem verify required ca-file /run/tls/trust/ca.crt crl-file /run/tls/trust/revoked.crl
|
||||
acl allowed_identity ssl_c_s_dn(CN) -m str collector-client
|
||||
http-request deny unless allowed_identity
|
||||
http-request deny unless { method POST } { path /v1/traces }
|
||||
server local 127.0.0.1:14318
|
||||
|
||||
listen query
|
||||
mode http
|
||||
bind :3200 ssl crt /run/tls/server/service.pem verify required ca-file /run/tls/trust/ca.crt crl-file /run/tls/trust/revoked.crl
|
||||
acl allowed_identity ssl_c_s_dn(CN) -m str grafana-client
|
||||
http-request deny unless allowed_identity
|
||||
http-request deny unless { method GET } { path_beg /api/ /ready }
|
||||
server local 127.0.0.1:13200
|
||||
Reference in New Issue
Block a user