I'm building a Java app that connects to a mongodb hosted with mongolab. Mongolab requires authentication. This app runs on people's local machines and connects directly to mongolab.
Do I:
- Merely code the authentication like so:
db.authenticate("Jimbo", "pa55w0rd".toCharArray())
leaving the password available to anyone with a hex editor - does that even matter? Use a middle man service that does individual user authentication and then retrieves data from mongolabs?
Have every user of my cool app have a username and password?
Some other cool trick I've missed?
What's the best practice here?