Commit Graph

1702 Commits

Author SHA1 Message Date
emelinda
f6b8a20880 istio-config/uralkal: drop unconfirmed Identity header from audit-jwt fromHeaders (breaks zitadel console) 2026-11-09 01:39:37 +03:00
emelinda
7548569329 fix jwks 2026-11-09 01:20:56 +03:00
emelinda
793d1e8eed change audit-processor image 2026-11-09 01:06:34 +03:00
emelinda
27cd73d3a3 security-audit: enable idp-actions-bootstrap (Zitadel events), PAT from dedicated security-audit-zitadel secret 2026-11-09 00:47:56 +03:00
emelinda
a0899630ca uralkal: postpone vault audit journal (overlay and vault_audit pipeline) — rollout planned separately 2026-11-09 00:23:26 +03:00
emelinda
f4c136c39e change audit-processor image 2026-11-09 00:14:09 +03:00
emelinda
e5092ff66b uralkal: enable vault audit journal (vault/uralkal-audit overlay, vault_audit pipeline in audit-processor) 2026-11-08 23:52:03 +03:00
emelinda
1864c0f587 istio-config/uralkal: temporarily drop metadata user_id/company_ids mappings (503 invalid header value) until the claim format is confirmed 2026-11-08 23:25:15 +03:00
emelinda
d49f178603 istio-config/uralkal: harden decode-zitadel-headers — replace only with numeric ids, drop the header otherwise 2026-11-08 22:54:49 +03:00
emelinda
4ca206722b istio-config/uralkal: map zitadel metadata user_id/company_ids to headers (as prod),
add decode-zitadel-headers Lua filter, switch audit-jwt to outputClaims (chart 0.1.1
drops outputClaimToHeaders silently)
2026-11-08 22:39:02 +03:00
emelinda
f00238b9c9 change transform/mask 2026-11-08 22:18:29 +03:00
emelinda
1190e8283c change audit-processor image 2026-11-08 21:59:30 +03:00
emelinda
d66d0e9662 security-audit: audit-processor image 2b4fc5d7 (kind traces), enable telemetry.traces pipeline 2026-11-08 21:32:36 +03:00
emelinda
33c3f91df3 opentelemetry-collector/uralkal: set overlay namespace so the NetworkPolicy lands in opentelemetry-collector 2026-11-08 20:12:37 +03:00
emelinda
14d3cf0ca3 - istio-config/uralkal: RequestAuthentication audit-jwt (zitadel + camunda-keycloak
issuers; claims to x-sarex-audit-sub/org and x-user-id), zitadel-jwks ServiceEntry;
  istio-pilot/uralkal: PILOT_JWT_ENABLE_REMOTE_JWKS=envoy
- opentelemetry-collector/uralkal: transform/mask strips tokens and JWTs from span
  URL attributes before export (same rules as access-collector)
- security-audit: access journal is mesh-wide now (Telemetry mesh-audit-access,
  access-collector NetworkPolicy/AuthorizationPolicy allow all mesh sources on 4317)
2026-11-08 19:29:15 +03:00
emelinda
5ba7149e20 uralkal: route traces through Kafka into audit-processor instead of direct S3
- opentelemetry-collector/uralkal: kafka exporter (telemetry.traces, otlp_proto,
  SASL_SSL, creds from otel-collector-kafka + kafka-ca), NetworkPolicy egress to kafka ns
- security-audit: add {topic: telemetry.traces, kind: traces} pipeline to
  audit-processor config (requires k8s-audit-processor image with traces support —
  update the pinned digest after CI build)
2026-11-08 18:56:13 +03:00
emelinda
338e98ad2f uralkal: export istio and app traces to S3 via opentelemetry-collector
- add opentelemetry-collector/uralkal overlay: otlp + zipkin receivers,
  awss3 exporter to the contour MinIO (10.133.0.245:9000, bucket "security-audit",
  prefix traces/, hourly partitions, gzip, otlp_proto), credentials from
  otel-collector-minio secret (same keys as security-audit-minio)
- harden per security-audit conventions: NetworkPolicy (ingest ports + MinIO
  egress only), PDB, pod anti-affinity, non-root, no sidecar (HTTP ServiceEntry
  on :9000 would shadow direct-IP egress to MinIO)
- istio-pilot/uralkal: enable mesh tracing (zipkin to otel-collector), sampling 100
- istio-config/uralkal: add-traceparent EnvoyFilter for all app namespaces
- clusters/uralkal: wire the collector overlay

Rollout order: apply the iac overlay first (creates the namespace), then
terragrunt apply in infra/terraform (branch contour, env uralkal) which rolls
regcred + otel-collector-minio + otel-collector-kafka secrets into the
opentelemetry-collector namespace and adds the traces/ lifecycle rule.
2026-11-08 18:23:55 +03:00
emelinda
df3840e70d remove {topic: security.k8s-audit, kind: k8s_audit} 2026-11-07 20:27:40 +03:00
emelinda
772cef5cef security-audit: fix pipelines placement in processor config — top-level key
config.Pipelines is a root-level key in k8s-audit; nested under kafka: it
was ignored and the service fell back to the single kafka.topic fallback.
2026-11-07 20:18:47 +03:00
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
emelinda
a2da49804a security-audit: audit-processor 47297469, flush_interval 1m
Bump processor image and deliver events to MinIO within a minute
(more small parquet files; compaction is stage 3 of k8s-audit).
2026-11-07 18:46:32 +03:00
emelinda
ff931e1708 security-audit: audit-processor flush_interval 5m -> 1m
Deliver audit events to MinIO within a minute for near-real-time
investigation; trade-off is more small parquet files (compaction
is planned in stage 3 of k8s-audit).
2026-11-07 18:07:36 +03:00
emelinda
a6a176d6c5 security-audit: audit-processor af50e663, drop retention config section
New image removes the bucket lifecycle check (retention is owned by terraform
minio-buckets lifecycle_rules), so the retention section is dropped from the
processor config map.
2026-11-07 17:24:47 +03:00
emelinda
a60b171bea security-audit: IsMap guards in transform/audit delete_key statements
Some events (e.g. deletecollection) carry requestObject as a slice, not a map:
indexing it with "metadata" failed with "unable to resolve an integer index in
slice" and spammed the collector log (error_mode: ignore — events were not lost).
IsMap chains rely on OTTL short-circuit `and` evaluation (verified against
v0.121 sources).
2026-11-07 16:23:46 +03:00
emelinda
cf2689aea0 security-audit: fix filter/audit config key — log_record (singular), filterprocessor 0.121
The processor rejected "log_records": LogFilters.LogConditions is mapstructure
"log_record" in v0.121 (collector failed to start: failed to get config).
2026-11-07 16:00:24 +03:00
emelinda
0b8318f547 security-audit: drop flux-system read polling from apiserver audit pipeline
filter/audit in audit-collector drops get/list/watch events from
system:serviceaccount:flux-system:* (helm/kustomize/source controllers polling
fluxcd resources every few seconds — the bulk of the topic volume). GitOps
mutations are kept: they are the actual trail of cluster changes.
2026-11-07 15:45:37 +03:00
emelinda
508f18d2a5 Merge remote-tracking branch 'origin/master' 2026-11-07 14:54:15 +03:00
emelinda
1960ef495c security-audit: add audit-processor — ship apiserver audit from Kafka to MinIO (Parquet)
base/processor-*.yaml: Deployment (1 replica, image k8s-audit-processor:394b6f9d),
ConfigMap with config.yaml, ServiceAccount, NetworkPolicy (DNS, kafka:9092,
external MinIO 10.133.0.245:9000). Contour-specific values for uralkal are set
via env patch in the overlay (K8S_AUDIT_*), same pattern as the collectors.
Credentials reuse the static Secrets (security-audit-kafka, kafka-ca,
security-audit-minio) via a projected volume at /vault/secrets.

app.env=stand: the contour's external MinIO has no TLS, so strict validation
(minio.secure) would fail. log.s3_echo=true is temporary for flow verification
(per security req. 20: disable after debugging).
2026-11-07 14:54:08 +03:00
491c0462cd ++ proctmp only uralkal 2026-11-07 11:37:41 +03:00
aa0ba4097c ++ engine low proctmp 2026-11-07 11:22:11 +03:00
emelinda
9cb62ea9f0 security-audit: nil-guards в transform/audit — удаление managedFields/annotations
У части событий requestObject есть, а metadata/annotations в нём nil —
statement падал с "expected pcommon.Map but got nil" и засорял лог
(error_mode: ignore, события не терялись).
2026-11-06 18:03:30 +03:00
emelinda
d4bbc5fd14 security-audit: отложить события Zitadel — отключить Job idp-actions-bootstrap
PAT machine user'а security-audit-bootstrap не заведён (ни Vault-роль, ни статический
Secret), Job не сможет настроить Target/Execution'ы. Пайплайн logs/idp в access-collector
оставлен и инертен: без Target'а Zitadel ничего не отправляет. Обратное включение:
раскомментировать idp-actions-bootstrap в base/kustomization.yaml и его патч в оверлее
uralkal, добавить ключ zitadel_pat в Secret security-audit-kafka.
2026-11-06 17:34:05 +03:00
emelinda
3162679524 security-audit: креды Kafka и PAT Zitadel — из статических Secret'ов вместо Vault Agent
В контуре uralkal роли Vault (security-audit, security-audit-bootstrap) не заведены.
Коллекторы и Job idp-actions-bootstrap монтируют Secret'ы namespace (security-audit-kafka,
kafka-ca) projected volume'ом в /vault/secrets под теми же именами файлов — конфиг
коллекторов (${file:...}, ca_file) не меняется. Из NetworkPolicy убран egress в Vault,
из оверлея uralkal — dependsOn на HelmRelease vault.
2026-11-06 17:22:20 +03:00
emelinda
f0014c5d00 uralkal: подключить security-audit — аудит apiserver, журнал доступа шлюза, события Zitadel
DaemonSet audit-collector на control-plane (журнал kube-apiserver → security.k8s-audit),
Deployment access-collector (OTLP :4317 — журнал доступа ingress-шлюза → security.mesh-access,
webhookevent :8088 — события Zitadel Actions v2 → security.idp-events, otlp :4319 — журнал
аудита Vault → security.vault-audit), Job idp-actions-bootstrap (Target + Execution'ы в Zitadel),
NetworkPolicy/AuthorizationPolicy, EnvoyFilter strip-audit-headers и Telemetry шлюза
на провайдер audit-access (уже раскатан в istio-pilot/uralkal).

Предусловия выполнены вне репозитория: аудит apiserver на мастерах (INFRA-3057),
топики security.* и SCRAM-пользователь в Kafka, бакет security-audit в MinIO,
секреты и роли Vault (terraform, vault-platform-secrets).
2026-11-06 16:47:32 +03:00
emelinda
509926a108 uralkal: отключить postgres-tls-test и istio-mtls-check от кластера
Оверлеи убраны из clusters/uralkal/kustomization.yaml, манифесты
apps/postgres-tls-test/ и infrastructure/istio-mtls-check/ сохранены
для возможного повторного подключения.
2026-11-06 15:35:36 +03:00
Дмитрий Лавренчук
31d469a847 Merge branch 'task/PDM-2711_brusnika_Ws' into 'master'
fix: documentaiton_host in brusnika

See merge request infra/iac!18
2026-11-06 11:19:36 +00:00
Дмитрий Лавренчук
c746a0181c Merge branch 'fix/wb' into 'master'
fix: disabke cde api wb

See merge request infra/iac!17
2026-11-06 11:18:54 +00:00
diamondrigido
6d388eef11 fix: documentaiton_host in brusnika 2026-11-06 13:18:21 +02:00
diamondrigido
150f22ae59 fix: disabke cde api wb 2026-11-06 09:16:51 +02:00
ivan
7b42b02915 ++ 2026-11-05 23:19:00 +05:00
Дмитрий Лавренчук
c7e33b74b6 Merge branch 'task/PDM-2655_ugmk_move' into 'master'
fix: обновил образы для документации

See merge request infra/iac!16
2026-11-05 13:22:36 +00:00
diamondrigido
b98109047f fix: обновил образы для документации 2026-11-05 15:22:01 +02:00
ivan
857bd4a675 uralkal: upload-oblako-las — креды и хост MinIO из documentations_s3_service_account_json 2026-11-05 17:31:39 +05:00
ivan
1c1b866331 uralkal: upload-oblako-las — curl без проверки сертификата (TLS-инспекция в сети Уралкалия) 2026-11-05 17:18:42 +05:00
ivan
142b28be80 uralkal: django — Job upload-oblako-las скачивает Облако.las и кладёт в MinIO бакет django 2026-11-05 17:11:13 +05:00
ivan
297f4b0adf uralkal: zitadel-action — при 403 на admin API берёт организацию токена через /management/v1/orgs/me 2026-11-05 16:26:29 +05:00
ivan
59a02bc7dc uralkal: django — Job создаёт в Zitadel action createUser на External Authentication / Pre Creation 2026-11-05 16:15:10 +05:00
ivan
1fc4742931 uralkal: kc-sync-users — синхронизация из realm sarex 2026-11-05 15:48:45 +05:00
ivan
4dac264303 uralkal: camunda keycloak — debug-логи org.keycloak.storage.ldap 2026-11-05 15:12:24 +05:00
ivan
b9c73a2d28 uralkal: kc-sync-users — привязка пользователей к компании id 1 (--sync-users-def-company-id 1) 2026-11-05 15:01:37 +05:00