Re: MapReduce output to a temp db collection failed due to unauthorization issue

54 views
Skip to first unread message

Yong Ouyang

unread,
Sep 10, 2012, 7:25:02 AM9/10/12
to mongod...@googlegroups.com
I haven't looked at other drivers, but I suppose this is a driver design issue (2 levels of authentication cache, one on the DB level, and the other on the DBPort level). The driver has a isAuthenticated() method on DB class, which checks whether the db has been successfully authenticated previously. On the other hand, each connection requires authentication to the db if we are to execute any command on that db, which is why there is a checkAuth(db) method on DBPort class. But the drawback is now exposed that if the output db of MapReduce is not the same as the one you issue the MapReduce command on, DBPort will not be able to authenticate against the output db. 

I've figured out a workaround that I have to add a method to DB class to enforce authentication, such that before sending out the MapReduce command, I can ensure my temp db is authenticated for that connection.  

Yong Ouyang

unread,
Sep 24, 2012, 10:59:44 PM9/24/12
to mongod...@googlegroups.com
created a JIRA
Reply all
Reply to author
Forward
0 new messages