You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
- Project-level user management with centralized authentication
25
25
26
-
Use `database` commands for granular database-specific operations and `atlas` commands for centralized Atlas project management.
26
+
**User Management**: All database users must be created through `matlas atlas users` commands. Users created in Atlas automatically become available in MongoDB databases after propagation.
27
27
28
28
29
29
@@ -292,7 +292,7 @@ kind: ApplyDocument
292
292
metadata:
293
293
name: custom-roles-example
294
294
resources:
295
-
# Custom database role
295
+
# Custom database role (created directly in MongoDB)
296
296
- apiVersion: matlas.mongodb.com/v1
297
297
kind: DatabaseRole
298
298
metadata:
@@ -320,7 +320,8 @@ resources:
320
320
- roleName: read
321
321
databaseName: myapp
322
322
323
-
# User that uses the custom role
323
+
# Atlas database user that uses the custom role
324
+
# Note: All users must be created via Atlas API - they propagate to MongoDB databases
Manage MongoDB database users directly in databases. These users are created using MongoDB's`createUser`command and can be assigned both built-in roles and custom roles created with `matlas database roles`.
381
+
**Important**: In MongoDB Atlas, all database users must be created and managed through the Atlas API. Direct MongoDB `createUser`commands are not supported.
381
382
382
-
**Note**: These are different from Atlas database users managed via `matlas atlas users`. Database users exist only within specific MongoDB databases, while Atlas users are managed centrally via the Atlas API.
383
+
All database user management is handled via `matlas atlas users` commands. Users created through Atlas automatically propagate to MongoDB databases and can access databases according to their assigned roles.
Copy file name to clipboardExpand all lines: tracking/documentation.md
+31Lines changed: 31 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -63,3 +63,34 @@ This ensures all developers follow the established workspace rules and maintain
63
63
64
64
---
65
65
66
+
## [2025-01-27] Database User Management Documentation Correction
67
+
68
+
**Status**: Completed
69
+
**Developer**: Assistant
70
+
**Related Issues**: User feedback about incorrect documentation
71
+
72
+
### Summary
73
+
Corrected misleading documentation in `docs/database.md` that incorrectly claimed there were two different types of user management (Atlas vs Database). Fixed to reflect actual implementation where all users are created via Atlas API and propagate to MongoDB databases.
74
+
75
+
### Tasks
76
+
-[x] Correct main distinction section between Atlas and Database commands
77
+
-[x] Remove false separation between "Atlas users" and "Database users"
78
+
-[x] Rewrite Database Users section to clarify Atlas-managed nature
79
+
-[x] Update examples to show correct Atlas user creation patterns
80
+
-[x] Add clarifying comments in YAML examples
81
+
82
+
### Files Modified
83
+
-`docs/database.md` - Major revision to Database Users section and command distinction explanation
84
+
85
+
### Notes
86
+
The original documentation incorrectly suggested that `matlas database users` commands would create users directly in MongoDB using `createUser` commands. However, the actual implementation shows:
87
+
88
+
1. All user management goes through Atlas API (`internal/services/atlas/users.go`)
89
+
2. The `cmd/database/users/users.go` commands are stubs that redirect to Atlas commands
90
+
3. Tests in `database-operations.sh` correctly use `matlas atlas users create`
91
+
4. Users created via Atlas automatically propagate to MongoDB databases
92
+
93
+
This correction eliminates confusion and aligns documentation with the actual codebase behavior. The user management model is: **Atlas API → User Creation → Propagation to MongoDB Databases**.
0 commit comments