RWB Deploys Enterprise-Wide Database Access Control with Trino and Open Policy Agent

RWB has replaced fragmented manual database access processes with a centralized architecture built on Trino as the single entry point and Open Policy Agent for policy enforcement. The system enforces least-privilege access, mandatory auditing, and automated revocation tied to HR records while eliminating anonymous and password-based logins. Access requests now complete in 3–10 minutes instead of an average of four days, with 92 percent handled automatically. Key components include Keycloak for OIDC authentication, Vault for secrets, Kafka for security event streaming to SOC, and Kubernetes orchestration. Responsibility is split across AI & Data Security, Core DevOps, Access Management, SOC, and Trust & Safety teams. More than 1,250 PostgreSQL clusters and 90 projects are now connected, with real-time dashboards tracking adoption and policy health.

HabrTranslated from Russian

Read at source

RWB has implemented a company-wide database access management architecture centered on Trino and Open Policy Agent (OPA), replacing ad-hoc manual grants with a centralized, auditable process.

Previously, users received full database access rather than granular table or schema permissions. Revocation depended on manual HR synchronization, new access requests took between one and 17 days, and audit trails were incomplete. The company determined that these issues would not scale with growth and required a unified solution meeting strict requirements: no anonymous or password access, minimum necessary privileges, full operation logging, and a digital record of every access request and approval.

The architecture uses Trino Coordinator and Worker nodes to handle queries, OPA to evaluate Rego policies on every request, Keycloak for OIDC authentication, Vault for secrets, Kafka for security event delivery to SOC, and Kubernetes for orchestration. Policies are generated automatically from access matrices stored in GitLab, versioned, tested via CI/CD, and deployed to S3 without service restarts. Granularity reaches column level when needed, though catalog/schema/table is the standard operating scope.

Three request flows were established: project-level access matrices processed through merge requests with automated checks, point-in-time additions to existing groups via Service Desk with two-level approval, and temporary 24–72 hour access with automatic revocation. HR integration now triggers instant access removal upon employee departure, while an independent Access Management team can revoke rights in seconds during emergencies.

All Trino traffic is streamed through an event listener to Kafka and then to SOC, where custom alerts detect enumeration, unauthorized DDL/DML, anomalous query volumes, and impersonation. Incident escalation follows a three-tier model with SOC handling L1, DevOps and Access Management covering L2, and Data Security engaged at L3. Long-term logs reside in S3 per regulatory guidance.

Results include 1,250+ PostgreSQL clusters connected, 700+ daily users, 90+ projects onboarded, and access provisioning reduced to minutes. Real-time BI dashboards track cluster health and project maturity, while 24/7 support channels and training materials assist end users.

Meridian digestThe week's most consequential security stories, distilled into one briefing.See the digest

More in Policy & Regulation

Russian Minister Proposes Blocking All SIM Cards Linked to Fraudsters Banned in MAX Messenger
Russia Ready to Disclose Source Code of Social Networks, Messengers and AI Models
Russia Mulls Mandatory Two-Week IMEI Registration for Foreign Smartphones via Gosuslugi