iac/infrastructure/security-audit/base/processor-configmap.yaml
emelinda d0bed7033a security-audit: enable mesh-access pipeline, audit-processor pinned by digest
Config: pipelines security.k8s-audit (k8s_audit) + security.mesh-access
(mesh_access); kafka.topic kept for rollback (pre-pipelines image ignores
the pipelines key). Image pinned to digest sha256:56a23bec… (k8s-audit@05a186a,
pipelines support) per repo policy п.38. Kafka ACL and MinIO policy need no
changes (no ACLs; bucket user has s3:* on the whole bucket). Companion
terraform change: ILM rule expire-mesh-access-90d.
2026-11-07 20:12:54 +03:00

63 lines
2.6 KiB
YAML
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

# Конфиг audit-processor (образ k8s-audit-processor, CONFIG_PATH=/etc/k8s-audit/config.yaml).
# Контур-специфичные значения (contour, kafka.brokers, minio.endpoint, app.env, log.s3_echo)
# задаёт оверлей через env K8S_AUDIT_* — см. uralkal/kustomization.yaml.
apiVersion: v1
kind: ConfigMap
metadata:
name: audit-processor-config
labels:
app.kubernetes.io/name: audit-processor
data:
config.yaml: |
contour: "" # K8S_AUDIT_CONTOUR
app:
name: audit-processor
env: dev # K8S_AUDIT_APP_ENV
log:
level: info
output: stdout
add_source: false
access_log: true
audit_events: false # поток ИБ не идёт в прикладные логи (п.20)
s3_echo: false # K8S_AUDIT_LOG_S3_ECHO; только отладка (п.20)
kafka:
brokers: [] # K8S_AUDIT_KAFKA_BROKERS
# Пайплайны чтения: один consumer group вычитывает все топики списка.
# kafka.topic НЕ удалять — старый образ (без поддержки pipelines) читает его,
# это путь отката. Новый образ при наличии pipelines игнорирует kafka.topic.
pipelines:
- {topic: security.k8s-audit, kind: k8s_audit}
- {topic: security.mesh-access, kind: mesh_access}
topic: security.k8s-audit
group: security-audit-processor
start_from: earliest # latest перескочил бы события после разрыва offset'ов
session_timeout: 45s
rebalance_timeout: 60s
tls:
enabled: true
ca_file: /vault/secrets/kafka-ca.crt
sasl:
mechanism: SCRAM-SHA-512
username_file: /vault/secrets/kafka-username
password_file: /vault/secrets/kafka-password
minio:
endpoint: "" # K8S_AUDIT_MINIO_ENDPOINT
bucket: security-audit
secure: false # внешний MinIO контура — plain HTTP (ServiceEntry minio.uralkal.external)
access_key_file: /vault/secrets/minio-access-key
secret_key_file: /vault/secrets/minio-secret-key
http:
host: 0.0.0.0
port: 8000 # /healthz, /readyz, /metrics
stream:
flush_interval: 1m # как часто сбрасывать буфер в MinIO (и коммитить offset'ы)
flush_max_rows: 10000 # или раньше, при стольких строках
flush_timeout: 30s # меньше kafka.rebalance_timeout
max_flush_failures: 30