camel-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Dewitte P-Alban <dewitte...@gmail.com>
Subject Re: Authentification with a mongodb route
Date Sun, 28 Oct 2012 11:52:20 GMT
Unfortunatly there is a bug in mongo java driver.  User and password given
in URI are not used by MongoURI object.

See https://jira.mongodb.org/browse/JAVA-436#comment-179882

I am seaking for a workaround.

Sorry for the lag in my reponse. Coding is more a hobby than my work right
now :(

On Wed, Oct 3, 2012 at 1:48 PM, Dewitte P-Alban <dewitte.pa@gmail.com>wrote:

> Thanks,
>
> That helps a lot :)
>
>
> On Wed, Oct 3, 2012 at 1:03 PM, Raul Kripalani <raul@evosent.com> wrote:
>
>> Hi Pierre,
>>
>> The camel-mongodb component connects to the MongoDB server via a
>> com.mongodb.Mongo bean that you set up in the registry.
>>
>> You configure authentication in the connection URI you pass to the Mongo
>> bean. This is the format [1]. Example, assuming you use Spring:
>>
>> <bean id="myDb" class="com.mongodb.Mongo">
>>     <constructor-arg index="0">
>>         <bean class="com.mongodb.MongoURI">
>>             <constructor-arg index="0"
>> value="mongodb://username:password@host:port/db" />
>>         </bean>
>>     </constructor-arg>
>> </bean>
>>
>> Then your camel-mongodb endpoints use this URI: "mongodb:myDb?...".
>>
>> [1]
>>
>> http://www.mongodb.org/display/DOCS/Connections#Connections-StandardConnectionStringFormat
>>
>> Hope that helps,
>>
>> *Raúl Kripalani*
>> Apache Camel Committer
>> Enterprise Architect, Program Manager, Open Source Integration specialist
>> http://about.me/raulkripalani | http://www.linkedin.com/in/raulkripalani
>> http://blog.raulkr.net | twitter: @raulvk <http://twitter.com/raulvk>
>>
>> On Wed, Oct 3, 2012 at 11:45 AM, Dewitte P-Alban <dewitte.pa@gmail.com
>> >wrote:
>>
>> > Hi,
>> >
>> > I can't see neither in documentation or in code a way to specifie the
>> user
>> > password to authentie request to a mondb server (with java driver is
>> > myMongoDBObject.auth("user","password").
>> >
>> > Does any body already face this question ?
>> >
>> > Best regards
>> >
>> > Pierre-Alban DEWITTE
>> >
>>
>
>

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message