Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » EclipseLink » MongoDB and passwords
MongoDB and passwords [message #948608] Thu, 18 October 2012 03:24 Go to next message
Caleb Holt is currently offline Caleb Holt
Messages: 6
Registered: May 2010
Junior Member
[Edit - Also probably worth noting that I have this working perfectly on my local mongodb that does not require a password]

Simply put I haven't seen an example of a working password protected mongodb and eclipselink. Would be nice if this was available.

I tried 3 things


  1. Putting in the password the jdbc way
  2. Placing username:password@hostname as the host
  3. Taking the mongodb prefix for properties and putting .username and .password on the end.
    e.g. eclipselink.nosql.property.mongo.password and eclipselink.nosql.property.mongo.user or .username


it would be great if someone can tell me how to gain access to my password protected mongodb from eclipselink.(I have no way of gaining access without a password, cloudbess is my host which has MongoHQ as a service that hosts my mongodb password protected only.)

Thank you.

[Updated on: Thu, 18 October 2012 15:22]

Report message to a moderator

Re: MongoDB and passwords [message #949252 is a reply to message #948608] Thu, 18 October 2012 17:08 Go to previous messageGo to next message
Caleb Holt is currently offline Caleb Holt
Messages: 6
Registered: May 2010
Junior Member
I did find this

https://bugs.eclipse.org/bugs/show_bug.cgi?id=392174

Apparently the way to use a password is
"eclipselink.nosql.property.user"
"eclipselink.nosql.property.password"

but mongodb does not support passwords.

They said the problem is "The issue is that our MongoConnectionSpec support does not make use of these.". And that should be the bug that gets fixed.
Re: MongoDB and passwords [message #964545 is a reply to message #949252] Tue, 30 October 2012 12:01 Go to previous messageGo to next message
James Sutherland is currently offline James Sutherland
Messages: 1939
Registered: July 2009
Location: Ottawa, Canada
Senior Member

I just checked in a fix for this into the development stream. I will try to check it into 2.4 next.

Either "javax.jdbc.user" or "eclipselink.nosql.property.user" will work.

In the current 2.4 release, you should be able to pass a MongoJCAConnectionSpec directly to set the user/password.
Or get the Mongo connection an call authenticate yourself.



James : Wiki : Book : Blog : Twitter
Re: MongoDB and passwords [message #964604 is a reply to message #964545] Tue, 30 October 2012 12:57 Go to previous message
Caleb Holt is currently offline Caleb Holt
Messages: 6
Registered: May 2010
Junior Member
Thanks for fixing this, and creating a great product.

I'll try the MongoJCAConnectionSpec thing.
Previous Topic:Where is now isolation property of @cache in eclipslink 2.4.1
Next Topic:Why tables for abstract classes with TablePerClass inheritance are created?
Goto Forum:
  


Current Time: Tue Jul 29 11:03:19 EDT 2014

Powered by FUDForum. Page generated in 0.01610 seconds