The category we're building: database access governance

I want to make an argument I’m willing to be wrong about in the details, because I think it’s right about the direction. Here it is in one sentence: the query is the unit of database access control, and almost no tool on the market treats it that way.

That sounds like a small, pedantic claim. It’s the thesis of the company, so let me earn it.

Every tool gets the unit wrong, and gets it wrong the same way

When I started looking at this problem, I assumed the gap was a feature gap. Some tool was 80% of the way there and needed approvals, or masking, or a better audit log. That isn’t what’s going on. Every category that touches database access governs a container and then trusts whatever happens inside it.

PAM governs the session. StrongDM, Teleport, CyberArk, and HashiCorp Boundary are good products, and I don’t say that to be diplomatic. They cover SSH, RDP, Kubernetes, cloud consoles, and databases under one zero-trust model, with mature governance and broad protocol support. They were built around the session, because the session is the right unit for SSH. You approve a session, record it, and investigate it, and the commands inside it are details. For a database that’s backwards. One query can drop a table or return a million rows of sensitive data, and the session only says “I was connected for a while.” I made this argument at length in Approve queries, not sessions, so I won’t repeat it here.

The incumbents aren’t standing still. StrongDM’s Policy-Based Action Control now authorizes individual queries for one database engine. It reads the query and can send a specific action to approval. That’s a sign of where the market is going. The strongest team in PAM is reaching for the query as the unit, on one engine, inside a product whose shape is still the session.

Change management governs the change. Bytebase is the strongest example, and it’s good at what it does: version-controlled schema migrations, SQL review before deployment, rollback, and GitOps for DDL. If your problem is shipping schema changes safely, buy it. Its access model is a time-bound grant. You request access to a database for a window, an approver grants it, and every query you run inside that window is trusted because of the grant. That’s a legitimate just-in-time access model. It’s also the session model again, with the grant as the container.

SQL clients govern nothing. DataGrip, TablePlus, DBeaver, and the command line are where your best engineers are fast, and they won’t give them up. A SQL client’s job is to send a string to a database and render what comes back. It has no policy, no approval, and no audit record tied to a person. The connection is the container, and nobody responsible for governance can see inside it.

Across all three, governance attaches to the session, the grant, or the connection, and the query falls through the gap, even though the query carries the risk and the intent. Each tool is right about its own unit. PAM is right that the session is the unit for SSH. Bytebase is right that the change is the unit for migrations. SQL clients are right to be fast and stay out of the way. None of them was built to govern the database query, so none of them does.

dana runs three statements in a session approved once at 09:00, and all three run unchecked, including a clear email and a 340-row UPDATE. In QueryDesk the same three are decided one by one: the read runs, the email comes back masked, and the UPDATE through the read/write credential waits for 0 of 1 approvals.

The category I think exists is treating the query itself as the governed unit. “Database access governance” describes it well enough. I’m not interested in coining a buzzword, and I’d be suspicious of anyone who tried to sell you one. What I care about is the unit, not the name.

The query, with everything attached to it

If the query is the unit, then everything you’d normally attach to a session or a grant attaches to the query instead. In QueryDesk, a single query carries:

  • Access. When the query runs, QueryDesk checks that whoever submitted it, a person or a service account, can run queries on that database through the credential they picked. Nothing carries over from an earlier session or grant.
  • Approval. If that credential requires review, the query waits until that many teammates approve the exact SQL. Approvers can’t change it, and an edit by its author voids the approvals it had. The query that runs is the query that was approved.
  • Data protection. QueryDesk rewrites the query before it reaches the database, so protected columns come back masked and the clear value never leaves the database. It’s a separate control from approval, and where the masking happens decides whether clear values ever pass through a system outside the database.
  • Audit. QueryDesk keeps one record per query with who ran it, the exact SQL, the database and credential, each approval, and an AI label when Claude, ChatGPT, or Cursor wrote it. The auditor’s hardest database question becomes a filter on the audit log.

This is why it’s a different kind of product and not a PAM tool with better logging. When the query is the unit, these four stop being separate systems you correlate after the fact. The approval is in the same record as the SQL. The identity is on the query, not on a shared database login three hops away. The masking happened to the query before it ran, not to the results on the way back. You don’t stitch a bastion log to a Slack thread to a Jira ticket to answer “who did what.” The query record already has the answer.

Without QueryDesk, the story of one UPDATE is split across a bastion log, a Slack thread, a Jira ticket and a database log that only knows the shared login app_rw. QueryDesk audit log holds it in one record: dana, billing-prod, the billing-rw credential, the exact SQL, approved by sam at 09:14, ran at 09:15.

Why this matters now, and not five years ago

Three things changed, and I think they compound.

AI now writes and runs queries. I’d put this one first, because it’s the newest and it changes the most. Every tool I named above assumes a person is on the other end. A person requests the session, a person gets the grant, a person types into the client. Now Claude, ChatGPT, or Cursor writes the SQL, and an agent can run it under a service account with nobody at a keyboard. “Approve the person and trust their session” doesn’t apply when there’s no session to approve.

With the query as the unit, you can say yes to that. QueryDesk governs a query from an AI client the same way it governs one a person typed, and adds controls for AI on top. Each database has its own AI access setting: Off, Read only, or Read and write. AI runs only through credentials you allow for AI, and a credential that requires review holds an AI query for a person to approve, as it would hold yours. The AI can’t approve its own query, and an approved query reruns the exact SQL that was approved.

On every AI query, QueryDesk applies the data protection policy of the person or service account the AI acts as, combined with the database’s AI data protection policy, and the stricter rule wins on each column. It caps rows and run time per database. It labels the query as AI in the audit log, so you can filter to everything AI ran. The AI acts as a person who signed in or as a service account with its own token, so every query has an owner. The container models have nothing to check here, because an agent doesn’t hold a session you can approve. The query is the unit that still carries everything you need to decide, and that, more than anything else on this list, is why I think it’s the right one.

An AI client acting as sam selects name, email, card_last4 and plan. QueryDesk combines sam policy with the AI data protection policy column by column, and the stricter action wins: email hidden because the AI policy hides it, card_last4 hidden because sam policy hides it. The row comes back with both masked.

Compliance reviews now ask where sensitive data went in clear form. When you have to prove that regulated values never left a specific database unmasked, a tool that reads the data out and masks it on the way back can’t prove it, because the clear values passed through that tool. A tool that rewrites the query before it runs can, because the database itself returns the masked value. I’ve had that conversation with enough compliance teams to know it comes up in real reviews. It’s a narrower question than where the database is hosted, and the query path answers it.

Growth-stage companies hit their first serious audit early. The arrangement that worked at eight engineers, where everyone has prod access, collides with the first SOC 2 or the first regulated customer. Suddenly “who can read sensitive data in production” needs a defensible answer. Teams reach for what they have: native roles, a bastion, maybe a PAM tool they already own for SSH. The database turns out to be the worst fit of all of it. Most of them build a partial version of query-level control themselves before they find out they could have bought it.

What QueryDesk isn’t

A category claim needs limits to be honest, so here are ours.

QueryDesk doesn’t replace PAM. If you need to govern SSH, RDP, Kubernetes, and cloud consoles in one place, that’s PAM, and you should keep it. QueryDesk governs databases. My claim is that databases are the worst fit inside a PAM stack, not that PAM is bad at everything.

QueryDesk isn’t a schema migration tool. It has no GitOps for DDL, no migration pipeline, and no rollback. If that’s your problem, Bytebase and tools like it are the answer, and we don’t compete for that work.

QueryDesk isn’t a BI tool. It has dashboards built from queries, but once you need real analytics, exploration, and visualization at scale, you need a different product. The dashboards exist so a governed query can be reused, not to replace your warehouse’s BI layer.

I’d rather lose a deal to the right tool than win one by pretending our category is bigger than it is. The argument depends on the query being the unit. If I start claiming QueryDesk is also your migration tool, your BI layer, and your PAM, the argument falls apart.

The market I think exists

Here’s the prediction I’m willing to be wrong about. Within a few years, treating the query as the unit of database access control will be as obvious as treating the session as the unit for infrastructure access is today. The session won that argument for SSH because it was the right unit for SSH. The query will win it for databases for the same reason. The companies that get there first will have built a partial version themselves, with roles, triggers, a homegrown approval bot, and a pile of logs they correlate by hand. They’ll keep maintaining it until they decide it isn’t their job.

I could be wrong about plenty of the specifics. I could be wrong about the timeline. I could be wrong about which control pulls teams in first, whether that’s masking, approval, or audit. I could be wrong that a startup wins this rather than an incumbent extending into it, the way StrongDM’s PBAC is starting to. Those are open questions, and I hold them loosely.

What I don’t think I’m wrong about is the direction. Every serious data team eventually needs the query to be a governed object, with access, approval, identity, and audit attached to it, because the query is where the risk and the intent live. The tools that got the unit wrong weren’t careless. They got it right for their own unit and treated the database as an afterthought. That afterthought is the category.

We built QueryDesk because we kept hitting the gap ourselves, and every tool we reached for governed a container and trusted what happened inside it. We bet that the query is the unit and built everything around that decision: approval on each query, masking that rewrites the query before it runs, an audit log with one record per query, and clients that keep developers in DataGrip or their own terminal. If the bet is right, the specifics will sort themselves out. If it’s wrong, no amount of features saves it. I think it’s right.

If you’ve been building the partial version of this yourself and you’re tired of maintaining it, we’d like to talk. And if you think I’ve got the direction wrong, I’d like to hear why.