Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Aspire 4.0 supports authenticating to MongoDB using X.509 or SCRAM. Based on the requirement will be necessary modify the settings.xml file.

...

SCRAM Authentication

Aspire 4.0 supports authenticating to MongoDB using SCRAM.

...

Code Block
languagebash
titlemongo.exe
> use admin
> db.getUser("aspireAdmin");
  {
    "_id_": "admin.myUserAdmin",
    "user": "myUserAdmin",
    "db": "admin",
    "roles": [ 
        {    
          "role": "clusterAdmin", 
          "db"": "admin" 
        },
        {
          "role": "readWriteAnyDatabase", 
          "db": "admin" 
        }
     ]
  }
> 


Enable

...

Scram Authentication in MongoDB

  1. Start MongoDB without access control
    $ mongod.exe --port 27017

  2. Connect a mongo shell to the instance.
    $ mongo.exe  --port 27017

  3. Create the user administrator: The database where you create the user (in this example, admin) is the user’s authentication database. For Aspire requirements, create the user with the roles: clusterAdmin and readWriteAnyDatabase.

...