Files
mtusi2026lab7/infra/loki/loki.yaml
T
alenchha 861e7722b5 ЛР 7 — БВТ2301 — Курлова — на 4
Перенесён минимум lab6 (API без изменений), добавлена защита на границах доверия:
- внешний HTTPS; обязательный mTLS LB -> API с allowlist identity и отзывом по serial;
- TLS на всех связях: PostgreSQL verify-full, MinIO HTTPS, RabbitMQ AMQPS mTLS (EXTERNAL),
  Valkey TLS + ACL, Collector и хранилища телеметрии через mTLS с отдельными CA;
- OpenBao в server mode: cert auth, токены 15 мин, политики только на свой путь;
- роли БД, S3-политики и права брокера по принципу минимальных прав;
- Argon2id с замером, rehash, общий лимит входа, бюджет защиты от login DoS;
- hardening всех контейнеров, scan образов с разбором, модель угроз, матрица доверия;
- отрицательные тесты: TLS-аудит (135 проверок), ACL, ротации, sealed OpenBao.
2026-11-16 10:49:13 +03:00

49 lines
1.5 KiB
YAML

# Loki 3.4.2 single binary: log store. Logs arrive by OTLP (https://loki:3100/otlp, mTLS) from the Collector.
# service.name -> stream label service_name; log attributes (event, code.*) and trace_id/span_id -> structured metadata.
auth_enabled: false
server:
http_listen_port: 3100
# Internal gRPC of the single binary: loopback only (closed local hop, not reachable from the network).
grpc_listen_address: 127.0.0.1
grpc_listen_port: 9096
log_level: warn
# lab7: HTTPS with mandatory client certificates from the "Telemetry Clients CA" (collector-out pushes,
# grafana-out queries, operator evidence). No certificate / another CA -> TLS handshake refused.
http_tls_config:
cert_file: /run/secrets/server.crt
key_file: /run/secrets/server.key
client_auth_type: RequireAndVerifyClientCert
client_ca_file: /run/secrets/telemetry-ca.crt
common:
instance_addr: 127.0.0.1
path_prefix: /loki
storage:
filesystem:
chunks_directory: /loki/chunks
rules_directory: /loki/rules
replication_factor: 1
ring:
kvstore:
store: inmemory
schema_config:
configs:
- from: "2024-01-01"
store: tsdb
object_store: filesystem
schema: v13
index:
prefix: index_
period: 24h
limits_config:
allow_structured_metadata: true
retention_period: 168h
ingestion_rate_mb: 8
ingestion_burst_size_mb: 16
volume_enabled: true
compactor:
working_directory: /loki/compactor
retention_enabled: true
delete_request_store: filesystem
analytics:
reporting_enabled: false