Giter Site home page Giter Site logo

Comments (7)

vincebowdren avatar vincebowdren commented on May 29, 2024 1

Yes, you will have to configure the application to use authentication when it connects. Exactly how, depends on your application; in ours we just give it the entire mongodb url like this:
-e MONGO_URI=mongodb://11.249.120.179:27017/testdb
when I enabled authentication on the database, I had to change the URL to include a username and password:
-e MONGO_URI=mongodb://testAdmin:[email protected]:27017/testdb

from mongo.

tianon avatar tianon commented on May 29, 2024

from mongo.

JulianKingman avatar JulianKingman commented on May 29, 2024

Thanks! Then how do I get the password?

from mongo.

JulianKingman avatar JulianKingman commented on May 29, 2024

Background: I want to connect via Robomongo, so I need to get the authentication details, which as far as I know, are generated at random and are usually output by the container logs.

from mongo.

yosifkit avatar yosifkit commented on May 29, 2024

There is no password or user created automatically. If you want to turn on authentication then you add --auth to the docker run (docker run -d mongo --auth), and then you'll need to connect to it via localhost (docker exec ...) to create an admin user (https://docs.mongodb.org/manual/tutorial/enable-authentication/).

from mongo.

JulianKingman avatar JulianKingman commented on May 29, 2024

If I have an application linked to the mongo instance, and I add authentication to it, will I need to do something special with the application, or would it continue to work?

from mongo.

tianon avatar tianon commented on May 29, 2024

from mongo.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.