Preflight checks for MongoDB Atlas
Before running the MongoDB Atlas crawler, you can run preflight checks to verify that the connected user has the MongoDB privileges required for metadata extraction. The connector checks the user's privileges via MongoDB's connectionStatus (with showPrivileges); no admin-only APIs are required.
The following preflight checks are performed:
Database and schema check
Validates that the user can list databases and retrieve database statistics.
- ✅ Check successful-User has both
listDatabasesanddbStatsprivileges. - ❌ Check failed-User lacks one or both of
listDatabasesordbStats. The failure message lists the missing privileges.
Collections check
Validates that the user can list collections and retrieve collection statistics.
- ✅ Check successful-User has both
listCollectionsandcollStatsprivileges. - ❌ Check failed-User lacks one or both of
listCollectionsorcollStats. The failure message lists the missing privileges.
Overall auth check
Combines the preceding checks into an overall authentication and authorization result.
- ✅ Check successful-User has all four required privileges:
listDatabases,dbStats,listCollections, andcollStats. - ❌ Check failed-User is missing one or more of the required privileges. The failure message lists the missing actions.
Requirements for preflight to pass
- Grant the MongoDB user at least:
listDatabases,dbStats,listCollections, andcollStats(for example via a custom role or read access on the databases you want to crawl). - Use the correct auth source when configuring the connection (for example
authSource=adminor the database where the user is defined). The connector reads the auth source from the connection's extra settings.
See also
- Crawl MongoDB assets: Run a crawl after preflight passes.
- Set up MongoDB Atlas: Configure connection and credentials.
- What does Atlan crawl from MongoDB Atlas: Assets and metadata that Atlan discovers.
- Troubleshooting connectivity: Resolve connection issues.