Policy checks for MongoDB, one connection string away.

The 3T Governance Proxy sits between your MongoDB clients and your clusters. It signs each user in with your identity provider and checks supported commands against your policies before they reach the database. When you turn masking on, it can also hide Critical PII in results.

0
changes to your queries
~3 ms
median added to an allowed query in our tests
OIDC
sign-in for every client

✓ mongosh → proxy.example.internal:27017 · OIDC as [email protected]

Guardrails

Run a query

0

allow

0

mask

0

deny

Switch identity, client or guardrail to see the decision change. Illustrative data.

Studio 3T security

✓

SOC 2

Report available

✓

ISO/IEC 27001

Certified

Works with your tools

Works with clients that support MongoDB OIDC sign-in.

The proxy speaks the MongoDB wire protocol. Clients connect with a new connection string that signs in with MONGODB-OIDC and passes the 3T Access connection ID as appName. Your queries stay the same; apps that use a driver directly may need a little OIDC sign-in setup. If the proxy is not on localhost, each client also needs to trust its address once.

Studio 3T

Studio 3T IDE

GUI

MongoDB Compass logo

MongoDB Compass

GUI

mongosh logo

mongosh

Shell

Node.js driver logo

Node.js driver

Driver

PyMongo logo

PyMongo

Driver

Java driver logo

Java driver

Driver

Go driver logo

Go driver

Driver

C# / .NET driver logo

C# / .NET driver

Driver

Rust driver logo

Rust driver

Driver

# before

mongodb://prod-cluster.example.internal:27017

# after: same client, policy checks on supported commands

mongodb://proxy.example.internal:27017/?authMechanism=MONGODB-OIDC&authSource=%24external&appName=CONNECTION_ID

Every client signs in as a person.

Risky commands are refused before they run.

How it sits in your stack

One checkpoint in front of MongoDB.

People and AI tools connect through the same proxy. It asks the policy engine about each supported command and forwards it only if it is allowed. Commands it does not support yet, such as inserts and index builds, are refused.

Diagram: clients such as mongosh, Studio 3T, Compass, application drivers and AI agents (MCP) sign in with OIDC. At first they reach MongoDB or Atlas directly, unchecked. Then they connect through the 3T Governance Proxy, which checks supported commands with the policy engine (rules and PII findings), allows, masks or denies them, and records blocks and warnings. Allowed commands go on to MongoDB; denied ones return a driver error to the client.
Clients connect through the proxy, which checks supported commands with the policy engine before they reach MongoDB.

PII-aware decisions

Viewers see only what their role allows.

The proxy uses results from your latest PII scan to see which fields a query asks for. Pick fields, a role and whether the mask guardrail is on, and see what comes back.

Projection

Role

Mask guardrail

db.patients.find({}, { name: 1, email: 1, plan: 1 }).limit(20)

Illustration
nameAmelia HartPII
planenterpriseLikely Safe
Allowed.

Illustrative data. The mask guardrail also needs masking turned on in the proxy; without it, a read that would be masked is refused.

Policies and violations

Choose policies in 3T Lens, and see what they caught.

You manage the proxy's policies in 3T Lens, and they apply to every client that connects through the proxy. The database sees only the connection's own account, so the Policy violations list is where a refusal or warning is tied to the person who ran it.

Allow, warn, mask or block

Each operation policy allows, warns about, masks or blocks a kind of operation, such as aggregations that write PII with $out or $merge. The built-in policies start switched off, and you turn on the ones you want. Masking also needs to be turned on in the proxy.

Operation policies in 3T Lens: a searchable list with category filters and policies such as $lookup aggregations not routed to a secondary and aggregations that write PII with $out or $merge, each showing its category, its effect (Allow, Warn or Block) and an on/off switch
Operation policies in 3T Lens, each with its category, effect and on/off switch.

See who ran what, and which rule it broke

Refusals and warnings appear in the Policy violations list with the user, rule, database, collection and client app. Repeats within five minutes add to a count. Allowed and masked queries are counted in the proxy's metrics and are not listed.

Policy violations in 3T Lens: counts of critical violations, warnings, actors and occurrences, then two critical violations, finds without a limit and finds with neither a limit nor maxTimeMS, each with its message, the user's email, a connection ID, an IP address, the app, database and collection, and Acknowledge and Review buttons
Policy violations in 3T Lens, with the message, user and collection for each refusal.

The Governance Proxy advantage

The same policies for every client that connects.

01

Identity-first access

Every client signs in with MONGODB-OIDC against your identity provider. Clients never see the database password.

02

Fails closed by default

Refused commands get a normal MongoDB error. If the policy engine can't be reached, supported commands are refused unless you choose to fail open. A read that can't be masked is refused too.

03

PII-aware decisions

Uses results from your latest PII scan when checking supported queries.

04

Catch copies with $out

Spots $out and $merge copies, and can block them when they use PII fields.

05

Joins and bulk writes

A $lookup, $graphLookup or $unionWith is checked against each collection it reads, and each statement in a bulk update or delete is checked on its own.

06

Decides before it runs

Supported commands are decided before they reach the database. Refused commands never touch your data.

What it offers

One enforcement point in front of MongoDB.

Wire-protocol interception

Decodes OP_MSG and legacy OP_QUERY, and forwards allowed commands unchanged.

Getting started

Your queries stay the same.

1

Deploy the proxy

As a container, or with the 3T Tools Helm chart on Kubernetes, in front of self-managed MongoDB or Atlas.

2

Point clients at it

A new connection string with MONGODB-OIDC and the 3T Access connection ID as appName.

3

Sign in via OIDC

The proxy checks the token, confirms in 3T Access that the user may use the connection, and connects with its stored credentials.

4

Turn on policies

Switch on the policies you want in 3T Lens. Supported commands are then allowed, warned about, masked or refused.

Under the hood

Built for the hot path in production.

Bounded concurrency

--max-connections (default 1024) and a 10-second deadline for a new connection's first message stop runaway fan-out.

Connection pooling

Optional pooling of idle upstream connections cuts reconnect time. It is off by default.

Graceful shutdown

On SIGTERM, sessions drain; a panic is contained to one connection.

FAQ

Questions, answered.

A MongoDB wire-protocol proxy. It signs every user in with MONGODB-OIDC and checks supported commands against your policies, using your PII scan results, before they reach the database. When masking is turned on, it can also hide Critical PII in results.

Your queries stay the same. Clients use a new connection string that signs in with MONGODB-OIDC and passes the 3T Access connection ID as appName. GUI tools and mongosh handle the sign-in for you; apps that use a driver directly may need a small OIDC callback. If the proxy is not on localhost, each client also needs to trust the proxy's address once.

Yes. It sits in front of self-managed MongoDB and Atlas clusters.

An AI tool or MCP server that uses a MongoDB driver connects through the proxy and signs in like any other client, so the same policies apply to it.

The client gets a normal MongoDB Unauthorized error, and the refused command never reaches your data.

find, aggregate, count, distinct, update, delete, findAndModify, mapReduce, drop and dropDatabase, plus listing and status commands such as listCollections. Commands it does not support yet, such as inserts, index builds and renames, are refused.

With the Helm chart's default settings, the proxy refuses commands on a connection that has no PII scan yet. Scan the connection in 3T Lens first.

Platform Admins are not blocked by policies: a command a policy would refuse runs for them and is recorded as an admin bypass. A kind of operation that is switched off for everyone stays refused.

In our tests on a Kubernetes cluster, the proxy added about 3 ms at the median to an allowed find, which took 14 to 21 ms going direct. Joins take longer, and your numbers depend on your setup.

Inside your own network, in front of self-managed MongoDB or Atlas. It runs as a container, or on Kubernetes as part of the 3T Tools Helm chart, where it is off until you turn it on.

Refusals and warnings go to the Policy violations list in 3T Lens, with the user, rule, database, collection and client app. Allowed and masked queries are counted in Prometheus metrics and are not listed. Changes to the proxy's own settings are recorded with their time and source IP.

See it in front of your own clusters.

Book a demo to see the 3T Governance Proxy check queries against your own MongoDB.

With your consent, we and third-party providers use cookies and similar technologies on our website to analyse your use of our site for market research or advertising purposes, including personalized advertising (“performance”), to provide you with additional functions (“functional”), and to show content from social media platforms, such as embedded videos (“social media”). This may result in the creation of pseudonymous usage profiles and the transfer of personal data to third countries, including the USA, which may have no adequate level of protection for the processing of personal data. Please choose for which purposes you wish to give us your consent and store your preferences by clicking on “Accept selected”. You can find further information in section 9 of our Privacy Policy.

Manage consent preferences