How to Configure Make MongoDB Read Only Access

Published
Length
3 min read

Luis Felipe Dias

All posts

To set up make mongodb read only access, assign a read role to a dedicated database user. Then, store those user credentials inside your Make scenario settings. Many teams use a shared admin account when they build fast workflows. This habit gives every automated step full power to change or delete live data. One wrong workflow module can wipe out an entire collection in seconds. How to set up make mongodb read only access MongoDB controls user rights through role-based authorization on a spe

Your coding agents run with your access.

Claude Code reaches prod with a developer's credentials, and approval prompts get clicked through. hoop.dev checks every query, masks sensitive data, and holds risky changes for a human.

To set up make mongodb read only access, assign a read role to a dedicated database user. Then, store those user credentials inside your Make scenario settings. Many teams use a shared admin account when they build fast workflows. This habit gives every automated step full power to change or delete live data. One wrong workflow module can wipe out an entire collection in seconds.

How to set up make mongodb read only access

MongoDB controls user rights through role-based authorization on a specific database. Each role grants a set of actions on defined database resources. These built-in or custom roles work down to the collection level. Notice that MongoDB Atlas has different built-in roles than self-hosted databases. Both options still build their roles from the same privilege actions.

To lock down your Make workflows, start inside your database admin console. Create a new database user just for your Make automation runs. Assign the built-in read role to this new user on the target database. The read role lets the user read all non-system collections. It also allows read access to the system.js collection.

This role permits safe actions like find, listCollections, and listIndexes. It also allows dbStats, collStats, and changeStream actions for triggers. It leaves out write actions like insert, update, remove, and dropCollection. In contrast, the readWrite role adds all of those data change actions. It also adds createCollection, createIndex, and dropIndex to the user rights. By picking the read role, you stop Make from changing any records.

What native database roles solve and what they miss

Native database roles solve the problem of accidental writes from automation tools. When Make logs in with the read role, the database blocks write actions. Even if a builder adds an update module, MongoDB rejects the command. This keeps your core records safe from bad workflow logic.

Still, native database roles only check who logs in at the collection level. They cannot filter which document fields return inside a permitted find action. Once the read role grants access to a collection, Make reads full documents. Those documents often hold emails, phone numbers, card numbers, or national IDs.

Auditor Read-Only Access + Customer Support Access to Production: architecture patterns and best practices

Continue reading? Get the full guide.

Free. No spam. Unsubscribe anytime.

Static database credentials also create a tracking problem for security teams. Make scenarios use one stored username and password for every single run. In the database logs, every query comes from that one shared Make user. You cannot see which team member built or ran the scenario. You also cannot mask sensitive fields in flight before they reach third-party apps. Data masking rewrites matched fields in results so workflows only receive safe values.

Steps to keep automated database queries safe

Start by auditing every Make scenario that connects to your production clusters. Replace any readWrite or admin accounts with a dedicated read user right away. If a workflow only needs one collection, build a custom role for it. Grant the find action on that single collection instead of the whole database.

Next, separate your read users from your write users across all workflows. Most Make scenarios only pull data to sync with other cloud tools. Keep write credentials locked down and out of general automation folders. Review your database logs each week to spot big queries from automation tools.

Inspect MongoDB wire traffic in flight

Built-in MongoDB roles govern collection access at setup time. They cannot score command risk per call or mask sensitive document values on the fly. By design, hoop.dev is an open-source proxy that sits next to MongoDB as a sidecar for your MongoDB. It reads every command from mongosh, drivers, or agent tools.

First, hoop.dev guardrails block bad deletes, drops, and write pipelines. Next, hoop.dev data masking rewrites sensitive values in returned documents based on your rules and logs each decision. Explore the repo on GitHub.

Frequently asked questions

Can a Make scenario watch for new documents with the read role?

Yes, the built-in read role includes the changeStream privilege action. This action lets Make watch a collection for changes without needing write rights.

What is the difference between the read and readWrite roles in MongoDB?

The read role allows queries like find, listCollections, listIndexes, and changeStream. The readWrite role adds actions like insert, update, remove, and dropCollection.

Can MongoDB roles block sensitive fields like emails or card numbers?

No, MongoDB roles only control access down to the collection level. They do not rewrite or mask individual fields like emails or card numbers inside returned documents.

The query runs. The emails stay hidden.