Skip to Main Content

MongoByte MongoDB Logo

Welcome to the new MongoDB Feedback Portal!

{Improvement: "Your idea"}
We’ve upgraded our system to better capture and act on your feedback.
Your feedback is meaningful and helps us build better products.

Status Submitted
Created by Somesh Saini
Created on Aug 19, 2026

Granular Privilege for collMod Without Requiring atlasAdmin

What problem are you trying to solve?

Focus on the what and why of the need you have, not the how you'd like it solved.

We execute the collMod command to apply or update collection validators as part of our deployment automation. Currently, this operation requires granting the atlasAdmin role, which provides significantly broader privileges than are necessary for this specific task. We would like to follow the principle of least privilege and avoid assigning administrative roles solely to perform a collMod operation.

What would you like to see happen?

Describe the desired outcome or enhancement.

Introduce a dedicated privilege (or include it in an appropriate database administration role) that allows users to execute the collMod command without requiring the full atlasAdmin role. Alternatively, clearly document the minimum set of privileges required for this operation.

Why is this important to you or your team?

Explain how the request adds value or solves a business need.

Our deployment pipelines need to modify collection validators as part of automated releases. Granting atlasAdmin for this purpose violates the principle of least privilege and increases security risk. A more granular privilege would enable secure automation while minimizing unnecessary administrative access.

What steps, if any, are you taking today to manage this problem?

As a temporary workaround, we have assigned the atlasAdmin role to the service account to allow the collMod operation to succeed. However, we would prefer to replace this with a least-privileged role once such an option becomes available or is documented.