lab 7 openbao

This commit is contained in:
2026-11-23 14:39:13 +03:00
parent 20afc2c790
commit 912a874f00
118 changed files with 12464 additions and 5108 deletions
+7 -7
View File
@@ -1,7 +1,7 @@
# Конфигурация наблюдаемости — реализовать
Добавьте `collector.yaml` с OTLP receivers, processors и exporters выбранной версии Collector. Укажите явные bind endpoints, внутренние сети, memory limits/batch и поведение при backpressure по уровню. Сопоставьте все три pipeline с реально развёрнутыми backend.
Добавьте конфигурации storage, Grafana provisioning/datasources, provisioning/dashboards и импортируемые dashboard JSON. На 4 — alert rules и runbooks. Пустой dashboard или debug exporter, который только печатает данные в stdout, не заменяют хранилища/доказательства из `contracts/observability.md`.
Не публикуйте OTLP/metrics/административные ports в общую сеть без необходимости. В lab7 реализуйте TLS/mTLS по trust matrix; экспорт Authorization и message bodies запрещён.
# Конфигурация наблюдаемости — реализовать
Добавьте `collector.yaml` с OTLP receivers, processors и exporters выбранной версии Collector. Укажите явные bind endpoints, внутренние сети, memory limits/batch и поведение при backpressure по уровню. Сопоставьте все три pipeline с реально развёрнутыми backend.
Добавьте конфигурации storage, Grafana provisioning/datasources, provisioning/dashboards и импортируемые dashboard JSON. На 4 — alert rules и runbooks. Пустой dashboard или debug exporter, который только печатает данные в stdout, не заменяют хранилища/доказательства из `contracts/observability.md`.
Не публикуйте OTLP/metrics/административные ports в общую сеть без необходимости. В lab7 реализуйте TLS/mTLS по trust matrix; экспорт Authorization и message bodies запрещён.
+62
View File
@@ -0,0 +1,62 @@
# OpenTelemetry Collector (contrib 0.131.0), lab 7: OTLP/HTTP is mTLS-only and accepts ONLY identities issued by the "workload CA"
# (api, worker, dispatcher). A certificate signed by the root CA with another identity (grafana, lb, outsider) has no chain to that
# trust anchor and is rejected in the handshake. Exporters to the backends use TLS with server verification + the collector client cert.
extensions:
health_check:
endpoint: 0.0.0.0:13133 # liveness only, no telemetry data; inside the internal backend network, never published
receivers:
otlp:
protocols:
http:
endpoint: 0.0.0.0:4318
tls:
cert_file: /pki/tls.crt
key_file: /pki/tls.key
client_ca_file: /ca/workload-ca.crt # trust anchor = workload CA only (not the root CA)
min_version: "1.2"
processors:
memory_limiter: {check_interval: 1s, limit_mib: 192, spike_limit_mib: 48}
batch: {timeout: 2s, send_batch_size: 512, send_batch_max_size: 1024}
attributes/no_secrets: # defence in depth: never forward credentials even if an SDK attached them
actions:
- {key: http.request.header.authorization, action: delete}
- {key: http.request.header.cookie, action: delete}
- {key: password, action: delete}
exporters:
prometheusremotewrite:
endpoint: https://prometheus:9090/api/v1/write
timeout: 5s
tls: {ca_file: /pki/ca.crt, cert_file: /pki/tls.crt, key_file: /pki/tls.key}
resource_to_telemetry_conversion: {enabled: true}
retry_on_failure: {enabled: true, initial_interval: 1s, max_interval: 10s, max_elapsed_time: 30s}
remote_write_queue: {enabled: true, queue_size: 200, num_consumers: 2}
otlphttp/loki:
endpoint: https://loki:3100/otlp
timeout: 5s
tls: {ca_file: /pki/ca.crt, cert_file: /pki/tls.crt, key_file: /pki/tls.key}
retry_on_failure: {enabled: true, initial_interval: 1s, max_interval: 10s, max_elapsed_time: 30s}
sending_queue: {enabled: true, num_consumers: 2, queue_size: 200}
otlp/tempo:
endpoint: tempo:4317
timeout: 5s
tls: {ca_file: /pki/ca.crt, cert_file: /pki/tls.crt, key_file: /pki/tls.key}
retry_on_failure: {enabled: true, initial_interval: 1s, max_interval: 10s, max_elapsed_time: 30s}
sending_queue: {enabled: true, num_consumers: 2, queue_size: 200}
service:
extensions: [health_check]
pipelines:
metrics: {receivers: [otlp], processors: [memory_limiter, attributes/no_secrets, batch], exporters: [prometheusremotewrite]}
logs: {receivers: [otlp], processors: [memory_limiter, attributes/no_secrets, batch], exporters: [otlphttp/loki]}
traces: {receivers: [otlp], processors: [memory_limiter, attributes/no_secrets, batch], exporters: [otlp/tempo]}
telemetry:
logs: {level: info}
metrics:
level: normal
readers:
- pull:
exporter:
prometheus: {host: 0.0.0.0, port: 8888} # Collector self-metrics only; plain HTTP, internal network, no credentials/data