Closed chapmbk closed 11 years ago
Cheers Brandon. I'm going to do a small format tidy up to remove some of the changes that aren't related to authEnabled
, but other than that this looks great! Thanks again for adding this!
It is great that we can start embedmongo with auth enabled now, but how is this intended to be used?
It would seem that embed mongo would have to be pre-set up with at least a full admin user in order to do anything with it when started with auth enabled, but I may be missing something. What would be really valuable is if the plugin can create a db/user based on config, but I don't believe this is supported yet.
I wondered the same :)
Check out #25, comment 20781570 from the author of this pull request.
Maybe @chapmbk can elaborate further.
When you start mongo with authentication, it does not enforce authentication until you create the first user. http://docs.mongodb.org/manual/reference/configuration-options/#auth
In our project, we use this plugin to start mongo.
We then run a script on Mongo to set up reference data, etc...
This is done with another plugin. https://code.google.com/p/maven-mongodb-plugin/
One of the steps of the script is to create the user.
After that, our Integration tests run using authentication.
Ah, localhost exception.
I can probably make that work for me in a bit of a roundabout way. Thanks for the info.
This is for enhancement ticket: https://github.com/joelittlejohn/embedmongo-maven-plugin/issues/25