![]() ![]() ![]() See Manage Users and Roles for details on adding a user with roles. To add a user with these roles, specify "admin" in the "db" field. Note: Some roles are defined only in the admin database, including: clusterAdmin, readAnyDatabase, readWriteAnyDatabase, dbAdminAnyDatabase, and userAdminAnyDatabase. To grant roles to a user, you must have the grantRole action on the roles database. For routine user creation, you must possess the following permissions: To create a new user in a database, you must have the createUser action on that database resource. To add "userAdminAnyDatabase" role for the user, the above example specified "admin" in the "db" field. To be able to create users, you need to: enable access control. In the above example, to add the user with the "readWrite" role in the test database, the role specification document specified "test" in the "db" field. Omit spaces as needed.įor example, in the mongo shell, to add the user with both the "readWrite" role in the test database and the "userAdminAnyDatabase" role which is defined only in the admin database:ĬreateUser: "CN=myName,OU=myOrgUnit,O=myOrg,L=myLocality,ST=myState,C=m圜ountry", Subject= CN=myName,OU=myOrgUnit,O=myOrg,L=myLocality,ST=myState,C=m圜ountryĪdd the RFC2253 compliant value of the subject as a user. The command returns the subject string as well as certificate: Openssl x509 -in -inform PEM -subject -nameopt RFC2253 Retrieve the RFC2253 formatted subject from the client certificate with the following command: Note: The RDNs in the subject string must be compatible with the RFC2253 standard. If the output shows a Relative Distinguished Name (RDN) for users that are not authorized, this is a finding.Īdd x.509 Certificate subject as an authorized user. If the output does not contain a Relative Distinguished Name (RDN) for an authorized user, this is a finding. Login to MongoDB and run the following command: you cannot use a single client certificate to authenticate more than one MongoDB user. To authenticate with a client certificate, you must first add the value of the subject from the client certificate as a MongoDB user.Įach unique x.509 client certificate corresponds to a single MongoDB user i.e. MongoDB Enterprise Advanced 3.x Security Technical Implementation Guide Once a PKI certificate has been validated, it must be mapped to a DBMS user account for the authenticated identity to be meaningful to MongoDB and useful for authorization decisions. The DoD standard for authentication is DoD-approved PKI certificates. ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |