You are viewing a plain text version of this content. The canonical link for it is here.
Posted to oak-dev@jackrabbit.apache.org by Jukka Zitting <ju...@gmail.com> on 2014/04/25 19:34:07 UTC

Re: svn commit: r1560611 - in /jackrabbit/oak/trunk: oak-core/src/main/java/org/apache/jackrabbit/oak/plugins/mongomk/util/ oak-core/src/test/java/org/apache/jackrabbit/oak/plugins/mongomk/ oak-jcr/src/test/java/org/apache/jackrabbit/oak/jcr/ oak-jcr/src/t...

Hi,

On Thu, Jan 23, 2014 at 5:45 AM, Chetan Mehrotra
<ch...@gmail.com> wrote:
> On Thu, Jan 23, 2014 at 2:35 PM,  <th...@apache.org> wrote:
>> +        mongo = new MongoClient(mongoURI);
>> +        db = mongo.getDB(mongoURI.getDatabase());
>
> The database referred in the URI is used by Mongo for determining the
> user database against which credentials if passed needs to be
> validated.

The credentials in any case need to be valid for the database that
holds the repository, so I don't see why we couldn't use it for this
purpose.

BR,

Jukka Zitting

Re: svn commit: r1560611 - in /jackrabbit/oak/trunk: oak-core/src/main/java/org/apache/jackrabbit/oak/plugins/mongomk/util/ oak-core/src/test/java/org/apache/jackrabbit/oak/plugins/mongomk/ oak-jcr/src/test/java/org/apache/jackrabbit/oak/jcr/ oak-jcr/src/t...

Posted by Chetan Mehrotra <ch...@gmail.com>.
On Fri, Apr 25, 2014 at 11:04 PM, Jukka Zitting <ju...@gmail.com> wrote:
> The credentials in any case need to be valid for the database that
> holds the repository, so I don't see why we couldn't use it for this
> purpose.

As per the doc the database name tells mongo driver the name of DB in
which user details are stored. Typically in SQL database the admin
user tables are managed in a dedicated schema. Probably similar scheme
is followed in Mongo side also.

Probably we can modify the logic to use the db name present as part of
url if no db name is explicitly provided via 'oak.mongo.db'


Chetan Mehrotra