Making a user to tail the oplog with Automation



Update 2/25/2016: The new UI has changed the way this process would look (putting the users & roles under the “More” menu on the Deployment page), but the idea is the same. Feel free to open a ticket or chat us with any questions you may have about this.

A question we are asked a lot is how to create a user that can tail the oplog using Cloud Manager Automation. This is a feature needed by Meteor users if they want to use MongoDB authentication to protect their database servers. Here’s how:

  1. Head to your Authorization & Roles page
  2. Create a new role (I called mine “oplogger”) that has permissions to read the local database
  3. Once you save this role, you can go to your “Authentication & Users” tab:
  4. Then you can create a user with the “oplogger” role (and any other roles you may want) and save it with a password you know
  5. Push your changes via “Review & Deploy” and then “Confirm & Deploy”

Once you configure your Meteor installation (MONGO_OPLOG_URL) to connect with the new credentials, your app should work as expected, providing you live tracking of changes.