Habrβ€’September 21, 2026β€’πŸ‡·πŸ‡ΊTranslated from Russian

Implementing 2FA Kubernetes Access via Gateway API, Dex and MULTIDIRECTORY

A Russian cybersecurity firm has published a detailed account of replacing static, long-lived kubeconfig certificates with corporate accounts and mandatory two-factor authentication across its Talos Linux Kubernetes clusters.

The previous approach relied on exchanging root kubeconfig files through a password vault. Each certificate was valid for a year, worked from any location, and could not be revoked without rotating the cluster CA. When an employee left or a laptop was lost, the credentials remained active.

Target requirements

The team defined four goals: login with corporate credentials, enforced second factor, cluster rights derived from directory groups, and a kubeconfig file containing no secrets.

Architecture components

  • Talos Linux 1.13 as the immutable operating system
  • Kubernetes v1.33
  • ArgoCD for GitOps management
  • NGINX Gateway Fabric 2.6 implementing Gateway API
  • Dex 0.24 as the OIDC provider
  • kube-oidc-proxy performing token validation and impersonation
  • MULTIDIRECTORY as the LDAP source of truth for users, groups and 2FA policies

MULTIDIRECTORY supplies both LDAP attributes and 2FA enforcement. Dex connects to it with a standard LDAP connector; the second factor itself is configured only inside the directory, so neither Dex nor Kubernetes is aware of its existence.

Groups returned by Dex are placed in the OIDC token claim and forwarded by kube-oidc-proxy. Standard ClusterRoleBinding objects then grant permissions to those groups, allowing access changes to be performed solely by editing directory membership.

Single-host routing with Gateway API

All traffic arrives at one FQDN. An HTTPRoute splits requests among three backends: Dex OIDC endpoints, a Python kubeconfig generator, and kube-oidc-proxy. The catch-all rule for β€œ/” does not override more specific prefixes, a behavior that differs from classic NGINX location ordering.

The generated kubeconfig uses the kubelogin exec plugin. It contains only the public cluster address, CA data and client ID; no certificates or tokens are embedded.

Gateway API migration issues

The team encountered several non-obvious problems. Routes placed in a different namespace from the Gateway were silently rejected because the listener defaulted to β€œSame” namespace. Explicitly setting allowedRoutes.namespaces.from: All resolved the issue. BackendTLSPolicy required the exact hostname present in the backend certificate rather than the internal service name, otherwise 502 errors occurred. Finally, the OIDC issuer URL had to remain identical inside and outside the cluster, solved with hostAliases on the proxy deployment.

All cluster-specific values were externalized into Kustomize patches and ArgoCD Application values, making the configuration reusable across additional clusters without code changes.

Related articles

Securitylabβ€’Other

OpenAI Releases GPT-6.1 Terra: Cost-Effective Model Focused on Computer Control, Image Analysis and Practical Automation

OpenAI has launched GPT-6.1 Terra, a new model positioned between its high-end GPT-6 Astra and more affordable options in the GPT-6 family. The model emphasizes real-world computer interaction, visual understanding of documents and interfaces, and reduced error rates rather than raw reasoning benchmarks. It supports a 1.05 million token context window, image inputs, and tool use through the Responses API while cutting input token prices by half compared with its predecessor. Published benchmarks show substantial gains on Terminal-Bench 4.0, OSWorld 2.1 and Agents' Last Exam, with error rates dropping sharply at both low and maximum reasoning levels. OpenAI stresses that the model still requires human oversight for high-stakes actions and does not directly process audio or video. The release targets developers and enterprises seeking reliable automation of repetitive multi-step tasks at lower cost than flagship models.

Habrβ€’Other

Yandex Black October: How Architectural Flaws and Capacity Mismanagement Turned Data Center Losses Into a 11-Day Fintech Coma

In October 2026 three Yandex data centers in Central Russia were physically destroyed within days, triggering the collapse of Yandex Cloud and multiple core services. Between the first and third site failures engineers had 74 hours to restore quorum and rebalance workloads yet failed to do so because Control Plane components remained tied to the lost zone and spare capacity had been eliminated to cut costs. Core banking and BNPL systems entered Read-Only mode after losing quorum, forcing a complete stop-the-world reconciliation that lasted until 22 October. Backups stored inside the same regional S3 buckets proved unusable, resulting in a seven-day RPO and primary-key collisions after restoration. The incident exposed that Metro-Cluster designs had been incorrectly treated as full Disaster Recovery and that aggressive AP microservice patterns created logical split-brain conditions outside the database layer.

AntiMalwareβ€’Other

Astra Group Releases Low-Code Astra AI Platform for Building Corporate AI Agents in Closed Environments

Astra Group has launched the Astra AI Platform, a low-code constructor designed for creating corporate AI applications that operate entirely within closed circuits without reliance on foreign clouds. The platform targets small and medium businesses as well as large corporations, enabling rapid deployment of AI secretaries, technical support assistants, and other agents in days rather than months. It forms part of the broader Astra AI ecosystem and includes two main constructors: one for machine learning model training and deployment, and another for LLM-based language assistants, document search, and process automation. Users can assemble scenarios from visual blocks, debug them in real time, or extend functionality with custom Python code when needed. The solution supports RAG-based knowledge bases, integration with external tools such as CRM and ERP systems, and the coordination of multiple agents for distributed task handling. One demonstrated use case involves processing ten pages of engineering drawings and specifications in five minutes to prepare data for downstream systems. The product is already listed in the Russian domestic software registry and available to customers.

Habrβ€’Other

Multi-Tenancy Isolation in VictoriaMetrics, VictoriaLogs and Grafana: Building Client Separation in a Shared Stack

Voltir runs a single shared monitoring stack consisting of VictoriaMetrics, VictoriaLogs, Grafana and vmalert for all customers instead of deploying separate instances per tenant. Isolation relies on numeric account IDs enforced at every layer: nginx validates tokens against the platform API before proxying writes, Grafana data sources hard-code tenant accounts, and vmalert rules receive automatic account filters. The team discovered that a single malformed rule or template could break alerting for every tenant because vmalert loads the entire rules directory at once. They also found that Grafana automatically created personal organizations granting Org Admin rights, accumulating hundreds of orphaned organizations and users that consumed disk space and resources. A dedicated cleanup module plus hourly reconciliation now removes rules, organizations, series and users when a tenant is deleted, while isolation tests verify both data and API objects across tenants.