iac/infrastructure/security-audit/base/authorizationpolicy-access-collector.yaml
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

34 lines
2.1 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.

# Транспортная аутентификация вместо HMAC-подписи Zitadel: mTLS Istio + проверка identity источника.
# Как только к workload применяется хотя бы одна ALLOW-политика, весь остальной трафик к нему запрещён.
# - Probe'ы kubelet не блокируются: sidecar переписывает их на pilot-agent (:15020), а тот обращается
# к приложению напрямую, мимо Envoy и его RBAC-фильтра.
# - При подключении сбора метрик коллектора (:8888) добавить отдельное правило для источника сбора.
# Условие: Zitadel в mesh (ns zitadel istio-injection=enabled, под с sidecar.istio.io/inject=true), иначе
# у его запросов нет principal и правило 1 их отклонит.
apiVersion: security.istio.io/v1
kind: AuthorizationPolicy
metadata:
name: access-collector
spec:
selector:
matchLabels:
security-audit/collector: access # podLabels HelmRelease access-collector
action: ALLOW
rules:
- from:
- source:
principals: ["cluster.local/ns/zitadel/sa/zitadel"] # SA Deployment zitadel-idp-contour
to:
- operation: {ports: ["8088"], methods: ["POST"], paths: ["/zitadel/events"]}
# Журнал доступа mesh-wide (Telemetry mesh-audit-access): источники — все workload'ы mesh,
# allowlist по SA невыразим. Транспорт дополнительно режет NetworkPolicy (порт 4317).
- to:
- operation: {ports: ["4317"]}
# Журнал аудита Vault: поды StatefulSet vault-vault-contour в mesh (ns vault, istio-injection=enabled).
# Если Vault выведут из mesh — principal пропадёт, будет 403, shipper копит очередь на PVC (см. README).
- from:
- source:
principals: ["cluster.local/ns/vault/sa/vault-vault-contour"]
to:
- operation: {ports: ["4319"]}