This commit is contained in:
@@ -1,41 +1,53 @@
|
||||
# Public template. lab7.py injects cert/key into ignored secrets/grafana-datasources.
|
||||
apiVersion: 1
|
||||
datasources:
|
||||
- name: Prometheus
|
||||
uid: prometheus
|
||||
type: prometheus
|
||||
access: proxy
|
||||
url: http://prometheus:9090
|
||||
isDefault: true
|
||||
jsonData:
|
||||
timeInterval: 5s
|
||||
exemplarTraceIdDestinations:
|
||||
- name: trace_id
|
||||
datasourceUid: tempo
|
||||
- name: Loki
|
||||
uid: loki
|
||||
type: loki
|
||||
access: proxy
|
||||
url: http://loki:3100
|
||||
jsonData:
|
||||
derivedFields:
|
||||
- name: trace_id
|
||||
matcherType: label
|
||||
matcherRegex: trace_id
|
||||
datasourceUid: tempo
|
||||
url: '$${__value.raw}'
|
||||
urlDisplayLabel: View trace
|
||||
- name: Tempo
|
||||
uid: tempo
|
||||
type: tempo
|
||||
access: proxy
|
||||
url: http://tempo:3200
|
||||
jsonData:
|
||||
tracesToLogsV2:
|
||||
datasourceUid: loki
|
||||
spanStartTimeShift: '-5m'
|
||||
spanEndTimeShift: '5m'
|
||||
tags: [{key: service.name, value: service_name}]
|
||||
filterByTraceID: true
|
||||
filterBySpanID: false
|
||||
nodeGraph:
|
||||
enabled: true
|
||||
- name: Prometheus
|
||||
uid: prometheus
|
||||
type: prometheus
|
||||
access: proxy
|
||||
url: https://prometheus:19090
|
||||
isDefault: true
|
||||
jsonData:
|
||||
timeInterval: 5s
|
||||
exemplarTraceIdDestinations:
|
||||
- name: trace_id
|
||||
datasourceUid: tempo
|
||||
tlsAuth: true
|
||||
tlsAuthWithCACert: true
|
||||
serverName: prometheus
|
||||
- name: Loki
|
||||
uid: loki
|
||||
type: loki
|
||||
access: proxy
|
||||
url: https://loki:13100
|
||||
jsonData:
|
||||
derivedFields:
|
||||
- name: trace_id
|
||||
matcherType: label
|
||||
matcherRegex: trace_id
|
||||
datasourceUid: tempo
|
||||
url: $${__value.raw}
|
||||
urlDisplayLabel: View trace
|
||||
tlsAuth: true
|
||||
tlsAuthWithCACert: true
|
||||
serverName: loki
|
||||
- name: Tempo
|
||||
uid: tempo
|
||||
type: tempo
|
||||
access: proxy
|
||||
url: https://tempo:13200
|
||||
jsonData:
|
||||
tracesToLogsV2:
|
||||
datasourceUid: loki
|
||||
spanStartTimeShift: -5m
|
||||
spanEndTimeShift: 5m
|
||||
tags:
|
||||
- key: service.name
|
||||
value: service_name
|
||||
filterByTraceID: true
|
||||
filterBySpanID: false
|
||||
nodeGraph:
|
||||
enabled: true
|
||||
tlsAuth: true
|
||||
tlsAuthWithCACert: true
|
||||
serverName: tempo
|
||||
|
||||
@@ -1,38 +0,0 @@
|
||||
worker_processes 1;
|
||||
worker_shutdown_timeout 8s;
|
||||
events { worker_connections 1024; }
|
||||
http {
|
||||
upstream messenger {
|
||||
zone messenger 64k;
|
||||
include /etc/nginx/ready-backends.conf;
|
||||
}
|
||||
log_format upstream '$request_method $uri $status upstream=$upstream_addr '
|
||||
'upstream_status=$upstream_status time=$request_time';
|
||||
access_log /var/log/nginx/access.log upstream;
|
||||
server {
|
||||
listen 8080;
|
||||
# API enforces the byte limit and returns the contracted JSON error.
|
||||
client_max_body_size 0;
|
||||
client_body_timeout 5s;
|
||||
client_header_timeout 5s;
|
||||
keepalive_timeout 5s;
|
||||
location / {
|
||||
proxy_pass http://messenger;
|
||||
proxy_http_version 1.1;
|
||||
proxy_request_buffering off;
|
||||
proxy_buffering off;
|
||||
proxy_set_header Host $host;
|
||||
proxy_set_header Connection close;
|
||||
proxy_connect_timeout 1s;
|
||||
proxy_send_timeout 35s;
|
||||
proxy_read_timeout 120s;
|
||||
# A 503 is an API response (for example, S3 is unavailable), so
|
||||
# preserve it for the client instead of marking every replica down.
|
||||
proxy_next_upstream error timeout http_502 http_504;
|
||||
proxy_next_upstream_tries 2;
|
||||
proxy_next_upstream_timeout 8s;
|
||||
# Never transparently retry a POST already sent to an API.
|
||||
# A client retries messages using the original Idempotency-Key.
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,7 +1,5 @@
|
||||
# OpenBao — реализовать конфигурацию и политики
|
||||
# OpenBao
|
||||
|
||||
Добавьте non-dev конфигурацию listener/storage/TLS, API/worker policies, bootstrap и rotation scripts. Credentials и unseal material создаются локально; здесь нет готового root token или private key.
|
||||
|
||||
Решение должно показать реальную сервисную аутентификацию и получение нужного secret по ограниченной policy; просто работающий контейнер OpenBao не засчитывается. На 3 статический KV secret допустим. На 4 покажите expiry/renewal/rotation и allow/deny. Путь KV v2 data/metadata и ACL должен соответствовать фактическому mount; не копируйте широкое `path "*"` для приложения.
|
||||
|
||||
Документируйте шаги оператора init/unseal и восстановление после restart. Скрипт не должен печатать tokens/shares или хранить их в Git. См. contracts/trust-matrix.md и REPORT.md.
|
||||
Non-dev file storage и TLS: config.hcl. Scoped KV policies: api/worker/dispatcher/cleanup.hcl.
|
||||
Bootstrap, init/unseal и lifecycle: [инструкция оператора](../../security/OPERATIONS.md).
|
||||
Секреты и ключи генерируются локально; в этом каталоге их нет.
|
||||
|
||||
@@ -0,0 +1,2 @@
|
||||
path "secret/data/api" { capabilities = ["read"] }
|
||||
path "auth/token/revoke-self" { capabilities = ["update"] }
|
||||
@@ -0,0 +1,2 @@
|
||||
path "secret/data/cleanup" { capabilities = ["read"] }
|
||||
path "auth/token/revoke-self" { capabilities = ["update"] }
|
||||
@@ -0,0 +1,11 @@
|
||||
ui = false
|
||||
api_addr = "https://openbao:8200"
|
||||
storage "file" { path = "/bao/data" }
|
||||
listener "tcp" {
|
||||
address = "0.0.0.0:8200"
|
||||
tls_cert_file = "/run/identity/tls.crt"
|
||||
tls_key_file = "/run/identity/tls.key"
|
||||
tls_client_ca_file = "/run/identity/ca.crt"
|
||||
tls_min_version = "tls12"
|
||||
tls_max_version = "tls12"
|
||||
}
|
||||
@@ -0,0 +1,2 @@
|
||||
path "secret/data/dispatcher" { capabilities = ["read"] }
|
||||
path "auth/token/revoke-self" { capabilities = ["update"] }
|
||||
@@ -0,0 +1,2 @@
|
||||
path "secret/data/worker" { capabilities = ["read"] }
|
||||
path "auth/token/revoke-self" { capabilities = ["update"] }
|
||||
+38
-21
@@ -2,8 +2,7 @@ receivers:
|
||||
otlp:
|
||||
protocols:
|
||||
http:
|
||||
endpoint: 0.0.0.0:4318
|
||||
|
||||
endpoint: 127.0.0.1:4318
|
||||
processors:
|
||||
memory_limiter:
|
||||
check_interval: 1s
|
||||
@@ -13,17 +12,16 @@ processors:
|
||||
timeout: 1s
|
||||
send_batch_size: 128
|
||||
send_batch_max_size: 256
|
||||
|
||||
exporters:
|
||||
prometheus:
|
||||
endpoint: 0.0.0.0:8889
|
||||
endpoint: 127.0.0.1:8889
|
||||
resource_to_telemetry_conversion:
|
||||
enabled: true
|
||||
enable_open_metrics: true
|
||||
metric_expiration: 30s
|
||||
translation_strategy: UnderscoreEscapingWithSuffixes
|
||||
otlphttp/loki:
|
||||
endpoint: http://loki:3100/otlp
|
||||
endpoint: https://loki:13100/otlp
|
||||
timeout: 2s
|
||||
sending_queue:
|
||||
queue_size: 32
|
||||
@@ -33,8 +31,12 @@ exporters:
|
||||
initial_interval: 1s
|
||||
max_interval: 5s
|
||||
max_elapsed_time: 15s
|
||||
tls:
|
||||
ca_file: /run/identity/ca.crt
|
||||
cert_file: /run/identity/tls.crt
|
||||
key_file: /run/identity/tls.key
|
||||
otlphttp/tempo:
|
||||
endpoint: http://tempo:4318
|
||||
endpoint: https://tempo:14318
|
||||
timeout: 2s
|
||||
sending_queue:
|
||||
queue_size: 32
|
||||
@@ -44,26 +46,41 @@ exporters:
|
||||
initial_interval: 1s
|
||||
max_interval: 5s
|
||||
max_elapsed_time: 15s
|
||||
|
||||
tls:
|
||||
ca_file: /run/identity/ca.crt
|
||||
cert_file: /run/identity/tls.crt
|
||||
key_file: /run/identity/tls.key
|
||||
service:
|
||||
telemetry:
|
||||
metrics:
|
||||
readers:
|
||||
- pull:
|
||||
exporter:
|
||||
prometheus:
|
||||
host: 0.0.0.0
|
||||
port: 8888
|
||||
- pull:
|
||||
exporter:
|
||||
prometheus:
|
||||
host: 127.0.0.1
|
||||
port: 8888
|
||||
pipelines:
|
||||
metrics:
|
||||
receivers: [otlp]
|
||||
processors: [memory_limiter, batch]
|
||||
exporters: [prometheus]
|
||||
receivers:
|
||||
- otlp
|
||||
processors:
|
||||
- memory_limiter
|
||||
- batch
|
||||
exporters:
|
||||
- prometheus
|
||||
logs:
|
||||
receivers: [otlp]
|
||||
processors: [memory_limiter, batch]
|
||||
exporters: [otlphttp/loki]
|
||||
receivers:
|
||||
- otlp
|
||||
processors:
|
||||
- memory_limiter
|
||||
- batch
|
||||
exporters:
|
||||
- otlphttp/loki
|
||||
traces:
|
||||
receivers: [otlp]
|
||||
processors: [memory_limiter, batch]
|
||||
exporters: [otlphttp/tempo]
|
||||
receivers:
|
||||
- otlp
|
||||
processors:
|
||||
- memory_limiter
|
||||
- batch
|
||||
exporters:
|
||||
- otlphttp/tempo
|
||||
|
||||
+14
-9
@@ -1,7 +1,10 @@
|
||||
auth_enabled: false
|
||||
server:
|
||||
http_listen_port: 3100
|
||||
http_listen_address: 127.0.0.1
|
||||
grpc_listen_address: 127.0.0.1
|
||||
common:
|
||||
instance_addr: 127.0.0.1
|
||||
path_prefix: /loki
|
||||
replication_factor: 1
|
||||
ring:
|
||||
@@ -13,13 +16,13 @@ common:
|
||||
rules_directory: /loki/rules
|
||||
schema_config:
|
||||
configs:
|
||||
- from: 2024-01-01
|
||||
store: tsdb
|
||||
object_store: filesystem
|
||||
schema: v13
|
||||
index:
|
||||
prefix: index_
|
||||
period: 24h
|
||||
- from: 2024-01-01
|
||||
store: tsdb
|
||||
object_store: filesystem
|
||||
schema: v13
|
||||
index:
|
||||
prefix: index_
|
||||
period: 24h
|
||||
limits_config:
|
||||
allow_structured_metadata: true
|
||||
retention_period: 72h
|
||||
@@ -27,8 +30,10 @@ limits_config:
|
||||
resource_attributes:
|
||||
ignore_defaults: true
|
||||
attributes_config:
|
||||
- action: index_label
|
||||
attributes: [service.name, deployment.environment.name]
|
||||
- action: index_label
|
||||
attributes:
|
||||
- service.name
|
||||
- deployment.environment.name
|
||||
compactor:
|
||||
working_directory: /loki/compactor
|
||||
retention_enabled: true
|
||||
|
||||
@@ -2,11 +2,23 @@ global:
|
||||
scrape_interval: 5s
|
||||
evaluation_interval: 5s
|
||||
rule_files:
|
||||
- /etc/prometheus/alerts.yaml
|
||||
- /etc/prometheus/alerts.yaml
|
||||
scrape_configs:
|
||||
- job_name: messenger
|
||||
static_configs:
|
||||
- targets: ['otel-collector:8889']
|
||||
- job_name: collector
|
||||
static_configs:
|
||||
- targets: ['otel-collector:8888']
|
||||
- job_name: messenger
|
||||
static_configs:
|
||||
- targets:
|
||||
- otel-collector:18889
|
||||
scheme: https
|
||||
tls_config:
|
||||
ca_file: /run/identity/ca.crt
|
||||
cert_file: /run/identity/tls.crt
|
||||
key_file: /run/identity/tls.key
|
||||
- job_name: collector
|
||||
static_configs:
|
||||
- targets:
|
||||
- otel-collector:18888
|
||||
scheme: https
|
||||
tls_config:
|
||||
ca_file: /run/identity/ca.crt
|
||||
cert_file: /run/identity/tls.crt
|
||||
key_file: /run/identity/tls.key
|
||||
|
||||
@@ -1,12 +1,16 @@
|
||||
server:
|
||||
http_listen_port: 3200
|
||||
http_listen_address: 127.0.0.1
|
||||
grpc_listen_address: 127.0.0.1
|
||||
distributor:
|
||||
receivers:
|
||||
otlp:
|
||||
protocols:
|
||||
http:
|
||||
endpoint: 0.0.0.0:4318
|
||||
endpoint: 127.0.0.1:4318
|
||||
ingester:
|
||||
lifecycler:
|
||||
address: 127.0.0.1
|
||||
trace_idle_period: 10s
|
||||
max_block_duration: 5m
|
||||
compactor:
|
||||
|
||||
@@ -0,0 +1,3 @@
|
||||
local all all trust
|
||||
hostssl messenger all 0.0.0.0/0 scram-sha-256
|
||||
hostssl messenger all ::/0 scram-sha-256
|
||||
@@ -0,0 +1,6 @@
|
||||
#!/bin/sh
|
||||
set -eu
|
||||
cp /run/identity/tls.key /tmp/server.key
|
||||
chown postgres:postgres /tmp/server.key
|
||||
chmod 600 /tmp/server.key
|
||||
exec docker-entrypoint.sh postgres -c ssl=on -c ssl_cert_file=/run/identity/tls.crt -c ssl_key_file=/tmp/server.key -c hba_file=/etc/pg_hba.conf
|
||||
@@ -1,38 +0,0 @@
|
||||
#!/bin/sh
|
||||
# Only ready API addresses enter the upstream, including at nginx startup.
|
||||
update_backends() {
|
||||
next=/etc/nginx/ready-backends.conf.next
|
||||
: > "$next"
|
||||
for address in $(getent ahostsv4 api | awk '{print $1}' | sort -u); do
|
||||
if wget -q -T 1 -O /dev/null "http://$address:8080/health/ready"; then
|
||||
echo "server $address:8080;" >> "$next"
|
||||
fi
|
||||
done
|
||||
# If every running API temporarily loses a shared dependency (for example
|
||||
# S3), retain the last addresses. The API can then return the contracted
|
||||
# 503 instead of Nginx replacing it with a 502. At initial startup there
|
||||
# is no previous healthy set, so use an inert placeholder.
|
||||
if [ ! -s "$next" ]; then
|
||||
if [ -s /etc/nginx/ready-backends.conf ] && ! grep -q '127.0.0.1:9 down' /etc/nginx/ready-backends.conf; then
|
||||
rm -f "$next"
|
||||
return
|
||||
fi
|
||||
echo 'server 127.0.0.1:9 down;' > "$next"
|
||||
fi
|
||||
if ! cmp -s "$next" /etc/nginx/ready-backends.conf; then
|
||||
mv "$next" /etc/nginx/ready-backends.conf
|
||||
if [ "${1:-}" = reload ] && [ -f /var/run/nginx.pid ]; then
|
||||
nginx -s reload
|
||||
fi
|
||||
else
|
||||
rm -f "$next"
|
||||
fi
|
||||
}
|
||||
|
||||
update_backends
|
||||
(
|
||||
while sleep 2; do
|
||||
update_backends reload
|
||||
done
|
||||
) &
|
||||
exec nginx -g 'daemon off;'
|
||||
@@ -0,0 +1 @@
|
||||
{"Version": "2012-10-17", "Statement": [{"Effect": "Allow", "Action": ["s3:ListBucket", "s3:GetBucketLocation"], "Resource": ["arn:aws:s3:::messenger-attachments"]}, {"Effect": "Allow", "Action": ["s3:PutObject", "s3:DeleteObject"], "Resource": ["arn:aws:s3:::messenger-attachments/staging/*"]}, {"Effect": "Allow", "Action": ["s3:GetObject"], "Resource": ["arn:aws:s3:::messenger-attachments/originals/*"]}, {"Effect": "Allow", "Action": ["s3:GetObject"], "Resource": ["arn:aws:s3:::messenger-attachments/variants/*"]}]}
|
||||
@@ -1,9 +0,0 @@
|
||||
#!/bin/sh
|
||||
set -eu
|
||||
test "$MINIO_ROOT_USER" != "$S3_ACCESS_KEY_ID"
|
||||
mc alias set local http://s3:9000 "$MINIO_ROOT_USER" "$MINIO_ROOT_PASSWORD" >/dev/null
|
||||
mc mb --ignore-existing local/messenger-attachments
|
||||
mc anonymous set none local/messenger-attachments
|
||||
mc admin user add local "$S3_ACCESS_KEY_ID" "$S3_SECRET_ACCESS_KEY" >/dev/null
|
||||
mc admin policy info local attachments >/dev/null 2>&1 || mc admin policy create local attachments /policy.json
|
||||
mc admin policy attach local attachments --user "$S3_ACCESS_KEY_ID"
|
||||
@@ -0,0 +1 @@
|
||||
{"Version": "2012-10-17", "Statement": [{"Effect": "Allow", "Action": ["s3:ListBucket", "s3:GetBucketLocation"], "Resource": ["arn:aws:s3:::messenger-attachments"]}, {"Effect": "Allow", "Action": ["s3:GetObject", "s3:DeleteObject"], "Resource": ["arn:aws:s3:::messenger-attachments/staging/*"]}, {"Effect": "Allow", "Action": ["s3:GetObject", "s3:DeleteObject"], "Resource": ["arn:aws:s3:::messenger-attachments/originals/*"]}, {"Effect": "Allow", "Action": ["s3:GetObject", "s3:DeleteObject"], "Resource": ["arn:aws:s3:::messenger-attachments/variants/*"]}]}
|
||||
@@ -1,17 +0,0 @@
|
||||
{
|
||||
"Version": "2012-10-17",
|
||||
"Statement": [
|
||||
{
|
||||
"Effect": "Allow",
|
||||
"Action": ["s3:ListBucket", "s3:GetBucketLocation"],
|
||||
"Resource": ["arn:aws:s3:::messenger-attachments"]
|
||||
},
|
||||
{
|
||||
"Effect": "Allow",
|
||||
"Action": ["s3:GetObject", "s3:PutObject", "s3:DeleteObject"],
|
||||
"Resource": ["arn:aws:s3:::messenger-attachments/originals/*",
|
||||
"arn:aws:s3:::messenger-attachments/staging/*",
|
||||
"arn:aws:s3:::messenger-attachments/variants/*"]
|
||||
}
|
||||
]
|
||||
}
|
||||
@@ -0,0 +1 @@
|
||||
{"Version": "2012-10-17", "Statement": [{"Effect": "Allow", "Action": ["s3:ListBucket", "s3:GetBucketLocation"], "Resource": ["arn:aws:s3:::messenger-attachments"]}, {"Effect": "Allow", "Action": ["s3:GetObject"], "Resource": ["arn:aws:s3:::messenger-attachments/staging/*"]}, {"Effect": "Allow", "Action": ["s3:PutObject"], "Resource": ["arn:aws:s3:::messenger-attachments/originals/*"]}, {"Effect": "Allow", "Action": ["s3:PutObject"], "Resource": ["arn:aws:s3:::messenger-attachments/variants/*"]}]}
|
||||
@@ -0,0 +1,20 @@
|
||||
global
|
||||
maxconn 256
|
||||
ssl-default-bind-options ssl-min-ver TLSv1.2 no-tls-tickets
|
||||
ssl-default-server-options ssl-min-ver TLSv1.2
|
||||
defaults
|
||||
mode tcp
|
||||
timeout connect 2s
|
||||
timeout client 120s
|
||||
timeout server 120s
|
||||
resolvers docker
|
||||
nameserver dns 127.0.0.11:53
|
||||
resolve_retries 3
|
||||
timeout resolve 1s
|
||||
timeout retry 1s
|
||||
hold valid 5s
|
||||
|
||||
listen port8443
|
||||
bind :8443 ssl crt /run/identity/tls.pem ca-file /run/identity/ca.crt crl-file /run/identity/ca.crl verify required
|
||||
tcp-request content reject unless { ssl_c_s_dn(CN) -m str lb }
|
||||
server local 127.0.0.1:8080
|
||||
@@ -0,0 +1,20 @@
|
||||
global
|
||||
maxconn 256
|
||||
ssl-default-bind-options ssl-min-ver TLSv1.2 no-tls-tickets
|
||||
ssl-default-server-options ssl-min-ver TLSv1.2
|
||||
defaults
|
||||
mode tcp
|
||||
timeout connect 2s
|
||||
timeout client 120s
|
||||
timeout server 120s
|
||||
resolvers docker
|
||||
nameserver dns 127.0.0.11:53
|
||||
resolve_retries 3
|
||||
timeout resolve 1s
|
||||
timeout retry 1s
|
||||
hold valid 5s
|
||||
|
||||
listen port8443
|
||||
bind :8443 ssl crt /run/identity/tls.pem ca-file /run/identity/ca.crt crl-file /run/identity/ca.crl verify required
|
||||
tcp-request content reject unless { ssl_c_s_dn(CN) -m str lb }
|
||||
server local 127.0.0.1:8080
|
||||
@@ -0,0 +1,20 @@
|
||||
global
|
||||
maxconn 256
|
||||
ssl-default-bind-options ssl-min-ver TLSv1.2 no-tls-tickets
|
||||
ssl-default-server-options ssl-min-ver TLSv1.2
|
||||
defaults
|
||||
mode tcp
|
||||
timeout connect 2s
|
||||
timeout client 120s
|
||||
timeout server 120s
|
||||
resolvers docker
|
||||
nameserver dns 127.0.0.11:53
|
||||
resolve_retries 3
|
||||
timeout resolve 1s
|
||||
timeout retry 1s
|
||||
hold valid 5s
|
||||
|
||||
listen port6380
|
||||
bind :6380 ssl crt /run/identity/tls.pem ca-file /run/identity/ca.crt crl-file /run/identity/ca.crl verify required
|
||||
tcp-request content reject unless { ssl_c_s_dn(CN) -m str api dispatcher worker }
|
||||
server local 127.0.0.1:6379
|
||||
@@ -0,0 +1,19 @@
|
||||
global
|
||||
maxconn 256
|
||||
ssl-default-bind-options ssl-min-ver TLSv1.2 no-tls-tickets
|
||||
ssl-default-server-options ssl-min-ver TLSv1.2
|
||||
defaults
|
||||
mode tcp
|
||||
timeout connect 2s
|
||||
timeout client 120s
|
||||
timeout server 120s
|
||||
resolvers docker
|
||||
nameserver dns 127.0.0.11:53
|
||||
resolve_retries 3
|
||||
timeout resolve 1s
|
||||
timeout retry 1s
|
||||
hold valid 5s
|
||||
|
||||
listen port3443
|
||||
bind :3443 ssl crt /run/identity/tls.pem
|
||||
server local 127.0.0.1:3000
|
||||
@@ -0,0 +1,34 @@
|
||||
global
|
||||
maxconn 256
|
||||
ssl-default-bind-options ssl-min-ver TLSv1.2 no-tls-tickets
|
||||
ssl-default-server-options ssl-min-ver TLSv1.2
|
||||
defaults
|
||||
mode tcp
|
||||
timeout connect 2s
|
||||
timeout client 120s
|
||||
timeout server 120s
|
||||
resolvers docker
|
||||
nameserver dns 127.0.0.11:53
|
||||
resolve_retries 3
|
||||
timeout resolve 1s
|
||||
timeout retry 1s
|
||||
hold valid 5s
|
||||
|
||||
frontend ingress
|
||||
mode http
|
||||
bind :8443 ssl crt /run/identity/tls.pem
|
||||
http-request set-header X-Forwarded-Proto https
|
||||
http-response set-header Strict-Transport-Security max-age=31536000
|
||||
default_backend apis
|
||||
backend apis
|
||||
mode http
|
||||
balance roundrobin
|
||||
option redispatch 1
|
||||
retries 1
|
||||
timeout connect 1s
|
||||
option httpchk GET /health/ready
|
||||
timeout check 1s
|
||||
http-check expect status 200
|
||||
default-server inter 1s fall 1 rise 1 on-marked-down shutdown-sessions
|
||||
server api1 api1:8443 ssl verify required ca-file /run/identity/ca.crt crt /run/identity/tls.pem verifyhost api1 sni str(api1) check check-sni api1 resolvers docker init-addr libc,none
|
||||
server api2 api2:8443 ssl verify required ca-file /run/identity/ca.crt crt /run/identity/tls.pem verifyhost api2 sni str(api2) check check-sni api2 resolvers docker init-addr libc,none
|
||||
@@ -0,0 +1,24 @@
|
||||
global
|
||||
maxconn 256
|
||||
ssl-default-bind-options ssl-min-ver TLSv1.2 no-tls-tickets
|
||||
ssl-default-server-options ssl-min-ver TLSv1.2
|
||||
defaults
|
||||
mode tcp
|
||||
timeout connect 2s
|
||||
timeout client 120s
|
||||
timeout server 120s
|
||||
resolvers docker
|
||||
nameserver dns 127.0.0.11:53
|
||||
resolve_retries 3
|
||||
timeout resolve 1s
|
||||
timeout retry 1s
|
||||
hold valid 5s
|
||||
|
||||
listen port13100
|
||||
bind :13100 ssl crt /run/identity/tls.pem ca-file /run/identity/ca.crt crl-file /run/identity/ca.crl verify required
|
||||
tcp-request content reject unless { ssl_c_s_dn(CN) -m str otel-collector grafana operator }
|
||||
mode http
|
||||
http-request deny if { ssl_c_s_dn(CN) -m str grafana operator } !{ method GET HEAD }
|
||||
http-request deny if { ssl_c_s_dn(CN) -m str otel-collector } !{ path /otlp/v1/logs }
|
||||
http-request deny if { ssl_c_s_dn(CN) -m str otel-collector } !{ method POST }
|
||||
server local 127.0.0.1:3100
|
||||
@@ -0,0 +1,30 @@
|
||||
global
|
||||
maxconn 256
|
||||
ssl-default-bind-options ssl-min-ver TLSv1.2 no-tls-tickets
|
||||
ssl-default-server-options ssl-min-ver TLSv1.2
|
||||
defaults
|
||||
mode tcp
|
||||
timeout connect 2s
|
||||
timeout client 120s
|
||||
timeout server 120s
|
||||
resolvers docker
|
||||
nameserver dns 127.0.0.11:53
|
||||
resolve_retries 3
|
||||
timeout resolve 1s
|
||||
timeout retry 1s
|
||||
hold valid 5s
|
||||
|
||||
listen port44318
|
||||
bind :44318 ssl crt /run/identity/tls.pem ca-file /run/identity/ca.crt crl-file /run/identity/ca.crl verify required
|
||||
tcp-request content reject unless { ssl_c_s_dn(CN) -m str api worker dispatcher }
|
||||
server local 127.0.0.1:4318
|
||||
|
||||
listen port18889
|
||||
bind :18889 ssl crt /run/identity/tls.pem ca-file /run/identity/ca.crt crl-file /run/identity/ca.crl verify required
|
||||
tcp-request content reject unless { ssl_c_s_dn(CN) -m str prometheus }
|
||||
server local 127.0.0.1:8889
|
||||
|
||||
listen port18888
|
||||
bind :18888 ssl crt /run/identity/tls.pem ca-file /run/identity/ca.crt crl-file /run/identity/ca.crl verify required
|
||||
tcp-request content reject unless { ssl_c_s_dn(CN) -m str prometheus }
|
||||
server local 127.0.0.1:8888
|
||||
@@ -0,0 +1,24 @@
|
||||
global
|
||||
maxconn 256
|
||||
ssl-default-bind-options ssl-min-ver TLSv1.2 no-tls-tickets
|
||||
ssl-default-server-options ssl-min-ver TLSv1.2
|
||||
defaults
|
||||
mode tcp
|
||||
timeout connect 2s
|
||||
timeout client 120s
|
||||
timeout server 120s
|
||||
resolvers docker
|
||||
nameserver dns 127.0.0.11:53
|
||||
resolve_retries 3
|
||||
timeout resolve 1s
|
||||
timeout retry 1s
|
||||
hold valid 5s
|
||||
|
||||
listen port19090
|
||||
bind :19090 ssl crt /run/identity/tls.pem ca-file /run/identity/ca.crt crl-file /run/identity/ca.crl verify required
|
||||
tcp-request content reject unless { ssl_c_s_dn(CN) -m str grafana operator }
|
||||
mode http
|
||||
acl read_post method POST
|
||||
acl read_path path /api/v1/query /api/v1/query_range /api/v1/series
|
||||
http-request deny unless { method GET HEAD } or read_post read_path
|
||||
server local 127.0.0.1:9090
|
||||
@@ -0,0 +1,19 @@
|
||||
global
|
||||
maxconn 256
|
||||
ssl-default-bind-options ssl-min-ver TLSv1.2 no-tls-tickets
|
||||
ssl-default-server-options ssl-min-ver TLSv1.2
|
||||
defaults
|
||||
mode tcp
|
||||
timeout connect 2s
|
||||
timeout client 120s
|
||||
timeout server 120s
|
||||
resolvers docker
|
||||
nameserver dns 127.0.0.11:53
|
||||
resolve_retries 3
|
||||
timeout resolve 1s
|
||||
timeout retry 1s
|
||||
hold valid 5s
|
||||
|
||||
listen port6380
|
||||
bind :6380 ssl crt /run/identity/tls.pem
|
||||
server local 127.0.0.1:6379
|
||||
@@ -0,0 +1,19 @@
|
||||
global
|
||||
maxconn 256
|
||||
ssl-default-bind-options ssl-min-ver TLSv1.2 no-tls-tickets
|
||||
ssl-default-server-options ssl-min-ver TLSv1.2
|
||||
defaults
|
||||
mode tcp
|
||||
timeout connect 2s
|
||||
timeout client 120s
|
||||
timeout server 120s
|
||||
resolvers docker
|
||||
nameserver dns 127.0.0.11:53
|
||||
resolve_retries 3
|
||||
timeout resolve 1s
|
||||
timeout retry 1s
|
||||
hold valid 5s
|
||||
|
||||
listen port9443
|
||||
bind :9443 ssl crt /run/identity/tls.pem
|
||||
server local 127.0.0.1:9000
|
||||
@@ -0,0 +1,29 @@
|
||||
global
|
||||
maxconn 256
|
||||
ssl-default-bind-options ssl-min-ver TLSv1.2 no-tls-tickets
|
||||
ssl-default-server-options ssl-min-ver TLSv1.2
|
||||
defaults
|
||||
mode tcp
|
||||
timeout connect 2s
|
||||
timeout client 120s
|
||||
timeout server 120s
|
||||
resolvers docker
|
||||
nameserver dns 127.0.0.11:53
|
||||
resolve_retries 3
|
||||
timeout resolve 1s
|
||||
timeout retry 1s
|
||||
hold valid 5s
|
||||
|
||||
listen port13200
|
||||
bind :13200 ssl crt /run/identity/tls.pem ca-file /run/identity/ca.crt crl-file /run/identity/ca.crl verify required
|
||||
tcp-request content reject unless { ssl_c_s_dn(CN) -m str grafana operator }
|
||||
mode http
|
||||
http-request deny unless { method GET HEAD }
|
||||
server local 127.0.0.1:3200
|
||||
|
||||
listen port14318
|
||||
bind :14318 ssl crt /run/identity/tls.pem ca-file /run/identity/ca.crt crl-file /run/identity/ca.crl verify required
|
||||
tcp-request content reject unless { ssl_c_s_dn(CN) -m str otel-collector }
|
||||
mode http
|
||||
http-request deny unless { method POST } { path /v1/traces }
|
||||
server local 127.0.0.1:4318
|
||||
Reference in New Issue
Block a user