You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@camel.apache.org by Javier Calvach Regidor <jc...@rocketmail.com> on 2014/07/09 09:45:27 UTC

Camel + LDAP

Hi everyone,

I'm trying to develop a camel route in order to connect an identity manager with an LDAP so, the idea is:

IdM <-> Camel <-> LDAP

I've tried these two (not at the same time) with no results:

<from uri="mina:tcp://10.0.1.219:389?sync=true&amp;textline=true"/>
<to uri="mina:tcp://10.0.1.40:389?sync=true&amp;textline=true"/>


and

<from uri="jetty:http://10.0.1.219:389?matchOnUriPrefix=true"/>
<to uri="jetty:http://10.0.1.40:389?bridgeEndpoint=true"/>

All the systems are in the same subnet, with total visibility between them.

Any hint here?

Looking forward to having some news from you,
Thank you in advance.

Re: Camel + LDAP

Posted by "Walzer, Thomas" <th...@integratix.net>.
Why don´t you try the ldap component?
Doing all the stuff low level is rather tedious.

Cheers, Thomas.

Am 09.07.2014 um 09:45 schrieb Javier Calvach Regidor <jc...@rocketmail.com>:

> Hi everyone,
> 
> I'm trying to develop a camel route in order to connect an identity manager with an LDAP so, the idea is:
> 
> IdM <-> Camel <-> LDAP
> 
> I've tried these two (not at the same time) with no results:
> 
> <from uri="mina:tcp://10.0.1.219:389?sync=true&amp;textline=true"/>
> <to uri="mina:tcp://10.0.1.40:389?sync=true&amp;textline=true"/>
> 
> 
> and
> 
> <from uri="jetty:http://10.0.1.219:389?matchOnUriPrefix=true"/>
> <to uri="jetty:http://10.0.1.40:389?bridgeEndpoint=true"/>
> 
> All the systems are in the same subnet, with total visibility between them.
> 
> Any hint here?
> 
> Looking forward to having some news from you,
> Thank you in advance.


Re: Camel + LDAP

Posted by Charles Moulliard <ch...@gmail.com>.
You can also imagine to query your LDAP server using a camel bean where you
use this API (enhancement of JNDI/LDAP API) :
http://directory.apache.org/api/

Question : Does it offer an advantage comparing to camel-ldap ? I don't
thing so as our component already uses the Apache DS API ;-)


On Wed, Jul 9, 2014 at 1:15 PM, Charles Moulliard <ch...@gmail.com> wrote:

> Correction. Camel LDAP does not uses mina2 to communicate with LDAP
> server. That will be done by JNDI / LDAP :
> http://www.javaworld.com/article/2076073/java-web-development/ldap-and-jndi--together-forever.html
>
>
> On Wed, Jul 9, 2014 at 1:06 PM, Charles Moulliard <ch...@gmail.com>
> wrote:
>
>> Hi Javier,
>>
>> Camel LDAP component uses mina2 as API to establishes a TCP connection
>> with the LDAP Server. But to call a LDAP Server, you must also use a LDAP
>> Client API to be able to send your request according to a specific format
>> which is managed by the LDAP component :
>> https://github.com/FuseByExample/camel-persistence-part1/blob/master/jdbc/src/main/resources/META-INF/spring/camelContext.xml#L71
>> That means that if you use camel just as a proxy to call the LDAP server
>> you must handle yourself the JNDI query to send to your LDAP server. That
>> will cost much more time and effort for you instead of using the LDAP camel
>> component.
>>
>> Regards,
>>
>>
>>
>> On Wed, Jul 9, 2014 at 12:20 PM, Javier Calvach Regidor <
>> jcalvache@rocketmail.com> wrote:
>>
>>> Hi Charles,
>>>
>>> If I'm not wrong, LDAP is TCP protocol.  I want to use Camel just as a
>>> router. If Camel receives packages in port X, send them to IP x.x.x.x, port
>>> Y. Actually, it should be "sheer" in the communication.
>>>
>>> Is this possible?
>>>
>>> Thanks again,
>>>
>>> Regards.
>>>
>>>
>>> El Miércoles 9 de julio de 2014 11:08, Charles Moulliard <
>>> ch007m@gmail.com> escribió:
>>>
>>>
>>>
>>> Hi Javier,
>>>
>>> In short, mina is a TCP component that you will use to create a TCP
>>> Server
>>> or to call an existing TCP server and managing with codec/decodec
>>> messages
>>> exchanges with the server. With Jetty, you will setup a project exposing
>>> a
>>> HTTP Server or calling as a HTTP client a server.
>>>
>>> Questions :
>>> - Which protocol should you plan/target to use : HTTP or TCP ? For which
>>> purpose ?
>>> - How do you plan to call your LDAP server when in your camel route, you
>>> don't use the LDAP component (http://camel.apache.org/ldap.html) ?
>>>
>>> Regards,
>>>
>>>
>>>
>>> On Wed, Jul 9, 2014 at 9:45 AM, Javier Calvach Regidor <
>>> jcalvache@rocketmail.com> wrote:
>>>
>>> > Hi everyone,
>>> >
>>> > I'm trying to develop a camel route in order to connect an identity
>>> > manager with an LDAP so, the idea is:
>>> >
>>> > IdM <-> Camel <-> LDAP
>>> >
>>> > I've tried these two (not at the same time) with no results:
>>> >
>>> > <from uri="mina:tcp://10.0.1.219:389?sync=true&amp;textline=true
>>> <http://10.0.1.219:389?sync=true&textline=true>"/>
>>> > <to uri="mina:tcp://10.0.1.40:389?sync=true&amp;textline=true
>>> <http://10.0.1.40:389?sync=true&textline=true>"/>
>>> >
>>> >
>>> > and
>>> >
>>> > <from uri="jetty:http://10.0.1.219:389?matchOnUriPrefix=true"/>
>>> > <to uri="jetty:http://10.0.1.40:389?bridgeEndpoint=true"/>
>>> >
>>> > All the systems are in the same subnet, with total visibility between
>>> them.
>>> >
>>> > Any hint here?
>>> >
>>> > Looking forward to having some news from you,
>>> > Thank you in advance.
>>>
>>>
>>>
>>>
>>> --
>>> Charles Moulliard
>>> Apache Committer / Architect @RedHat
>>> Twitter : @cmoulliard | Blog :  http://cmoulliard.github.io
>>>
>>
>>
>>
>> --
>> Charles Moulliard
>> Apache Committer / Architect @RedHat
>> Twitter : @cmoulliard | Blog :  http://cmoulliard.github.io
>>
>>
>
>
> --
> Charles Moulliard
> Apache Committer / Architect @RedHat
> Twitter : @cmoulliard | Blog :  http://cmoulliard.github.io
>
>


-- 
Charles Moulliard
Apache Committer / Architect @RedHat
Twitter : @cmoulliard | Blog :  http://cmoulliard.github.io

Re: Camel + LDAP

Posted by Charles Moulliard <ch...@gmail.com>.
Correction. Camel LDAP does not uses mina2 to communicate with LDAP server.
That will be done by JNDI / LDAP :
http://www.javaworld.com/article/2076073/java-web-development/ldap-and-jndi--together-forever.html


On Wed, Jul 9, 2014 at 1:06 PM, Charles Moulliard <ch...@gmail.com> wrote:

> Hi Javier,
>
> Camel LDAP component uses mina2 as API to establishes a TCP connection
> with the LDAP Server. But to call a LDAP Server, you must also use a LDAP
> Client API to be able to send your request according to a specific format
> which is managed by the LDAP component :
> https://github.com/FuseByExample/camel-persistence-part1/blob/master/jdbc/src/main/resources/META-INF/spring/camelContext.xml#L71
> That means that if you use camel just as a proxy to call the LDAP server
> you must handle yourself the JNDI query to send to your LDAP server. That
> will cost much more time and effort for you instead of using the LDAP camel
> component.
>
> Regards,
>
>
>
> On Wed, Jul 9, 2014 at 12:20 PM, Javier Calvach Regidor <
> jcalvache@rocketmail.com> wrote:
>
>> Hi Charles,
>>
>> If I'm not wrong, LDAP is TCP protocol.  I want to use Camel just as a
>> router. If Camel receives packages in port X, send them to IP x.x.x.x, port
>> Y. Actually, it should be "sheer" in the communication.
>>
>> Is this possible?
>>
>> Thanks again,
>>
>> Regards.
>>
>>
>> El Miércoles 9 de julio de 2014 11:08, Charles Moulliard <
>> ch007m@gmail.com> escribió:
>>
>>
>>
>> Hi Javier,
>>
>> In short, mina is a TCP component that you will use to create a TCP Server
>> or to call an existing TCP server and managing with codec/decodec messages
>> exchanges with the server. With Jetty, you will setup a project exposing a
>> HTTP Server or calling as a HTTP client a server.
>>
>> Questions :
>> - Which protocol should you plan/target to use : HTTP or TCP ? For which
>> purpose ?
>> - How do you plan to call your LDAP server when in your camel route, you
>> don't use the LDAP component (http://camel.apache.org/ldap.html) ?
>>
>> Regards,
>>
>>
>>
>> On Wed, Jul 9, 2014 at 9:45 AM, Javier Calvach Regidor <
>> jcalvache@rocketmail.com> wrote:
>>
>> > Hi everyone,
>> >
>> > I'm trying to develop a camel route in order to connect an identity
>> > manager with an LDAP so, the idea is:
>> >
>> > IdM <-> Camel <-> LDAP
>> >
>> > I've tried these two (not at the same time) with no results:
>> >
>> > <from uri="mina:tcp://10.0.1.219:389?sync=true&amp;textline=true
>> <http://10.0.1.219:389?sync=true&textline=true>"/>
>> > <to uri="mina:tcp://10.0.1.40:389?sync=true&amp;textline=true
>> <http://10.0.1.40:389?sync=true&textline=true>"/>
>> >
>> >
>> > and
>> >
>> > <from uri="jetty:http://10.0.1.219:389?matchOnUriPrefix=true"/>
>> > <to uri="jetty:http://10.0.1.40:389?bridgeEndpoint=true"/>
>> >
>> > All the systems are in the same subnet, with total visibility between
>> them.
>> >
>> > Any hint here?
>> >
>> > Looking forward to having some news from you,
>> > Thank you in advance.
>>
>>
>>
>>
>> --
>> Charles Moulliard
>> Apache Committer / Architect @RedHat
>> Twitter : @cmoulliard | Blog :  http://cmoulliard.github.io
>>
>
>
>
> --
> Charles Moulliard
> Apache Committer / Architect @RedHat
> Twitter : @cmoulliard | Blog :  http://cmoulliard.github.io
>
>


-- 
Charles Moulliard
Apache Committer / Architect @RedHat
Twitter : @cmoulliard | Blog :  http://cmoulliard.github.io

Re: Camel + LDAP

Posted by Charles Moulliard <ch...@gmail.com>.
Hi Javier,

Camel LDAP component uses mina2 as API to establishes a TCP connection with
the LDAP Server. But to call a LDAP Server, you must also use a LDAP Client
API to be able to send your request according to a specific format which is
managed by the LDAP component :
https://github.com/FuseByExample/camel-persistence-part1/blob/master/jdbc/src/main/resources/META-INF/spring/camelContext.xml#L71
That means that if you use camel just as a proxy to call the LDAP server
you must handle yourself the JNDI query to send to your LDAP server. That
will cost much more time and effort for you instead of using the LDAP camel
component.

Regards,



On Wed, Jul 9, 2014 at 12:20 PM, Javier Calvach Regidor <
jcalvache@rocketmail.com> wrote:

> Hi Charles,
>
> If I'm not wrong, LDAP is TCP protocol.  I want to use Camel just as a
> router. If Camel receives packages in port X, send them to IP x.x.x.x, port
> Y. Actually, it should be "sheer" in the communication.
>
> Is this possible?
>
> Thanks again,
>
> Regards.
>
>
> El Miércoles 9 de julio de 2014 11:08, Charles Moulliard <ch...@gmail.com>
> escribió:
>
>
>
> Hi Javier,
>
> In short, mina is a TCP component that you will use to create a TCP Server
> or to call an existing TCP server and managing with codec/decodec messages
> exchanges with the server. With Jetty, you will setup a project exposing a
> HTTP Server or calling as a HTTP client a server.
>
> Questions :
> - Which protocol should you plan/target to use : HTTP or TCP ? For which
> purpose ?
> - How do you plan to call your LDAP server when in your camel route, you
> don't use the LDAP component (http://camel.apache.org/ldap.html) ?
>
> Regards,
>
>
>
> On Wed, Jul 9, 2014 at 9:45 AM, Javier Calvach Regidor <
> jcalvache@rocketmail.com> wrote:
>
> > Hi everyone,
> >
> > I'm trying to develop a camel route in order to connect an identity
> > manager with an LDAP so, the idea is:
> >
> > IdM <-> Camel <-> LDAP
> >
> > I've tried these two (not at the same time) with no results:
> >
> > <from uri="mina:tcp://10.0.1.219:389?sync=true&amp;textline=true"/>
> > <to uri="mina:tcp://10.0.1.40:389?sync=true&amp;textline=true"/>
> >
> >
> > and
> >
> > <from uri="jetty:http://10.0.1.219:389?matchOnUriPrefix=true"/>
> > <to uri="jetty:http://10.0.1.40:389?bridgeEndpoint=true"/>
> >
> > All the systems are in the same subnet, with total visibility between
> them.
> >
> > Any hint here?
> >
> > Looking forward to having some news from you,
> > Thank you in advance.
>
>
>
>
> --
> Charles Moulliard
> Apache Committer / Architect @RedHat
> Twitter : @cmoulliard | Blog :  http://cmoulliard.github.io
>



-- 
Charles Moulliard
Apache Committer / Architect @RedHat
Twitter : @cmoulliard | Blog :  http://cmoulliard.github.io

Re: Camel + LDAP

Posted by Javier Calvach Regidor <jc...@rocketmail.com>.
Hi Charles,

If I'm not wrong, LDAP is TCP protocol.  I want to use Camel just as a router. If Camel receives packages in port X, send them to IP x.x.x.x, port Y. Actually, it should be "sheer" in the communication.

Is this possible?

Thanks again,

Regards.


El Miércoles 9 de julio de 2014 11:08, Charles Moulliard <ch...@gmail.com> escribió:
 


Hi Javier,

In short, mina is a TCP component that you will use to create a TCP Server
or to call an existing TCP server and managing with codec/decodec messages
exchanges with the server. With Jetty, you will setup a project exposing a
HTTP Server or calling as a HTTP client a server.

Questions :
- Which protocol should you plan/target to use : HTTP or TCP ? For which
purpose ?
- How do you plan to call your LDAP server when in your camel route, you
don't use the LDAP component (http://camel.apache.org/ldap.html) ?

Regards,



On Wed, Jul 9, 2014 at 9:45 AM, Javier Calvach Regidor <
jcalvache@rocketmail.com> wrote:

> Hi everyone,
>
> I'm trying to develop a camel route in order to connect an identity
> manager with an LDAP so, the idea is:
>
> IdM <-> Camel <-> LDAP
>
> I've tried these two (not at the same time) with no results:
>
> <from uri="mina:tcp://10.0.1.219:389?sync=true&amp;textline=true"/>
> <to uri="mina:tcp://10.0.1.40:389?sync=true&amp;textline=true"/>
>
>
> and
>
> <from uri="jetty:http://10.0.1.219:389?matchOnUriPrefix=true"/>
> <to uri="jetty:http://10.0.1.40:389?bridgeEndpoint=true"/>
>
> All the systems are in the same subnet, with total visibility between them.
>
> Any hint here?
>
> Looking forward to having some news from you,
> Thank you in advance.




-- 
Charles Moulliard
Apache Committer / Architect @RedHat
Twitter : @cmoulliard | Blog :  http://cmoulliard.github.io

Re: Camel + LDAP

Posted by Charles Moulliard <ch...@gmail.com>.
Hi Javier,

In short, mina is a TCP component that you will use to create a TCP Server
or to call an existing TCP server and managing with codec/decodec messages
exchanges with the server. With Jetty, you will setup a project exposing a
HTTP Server or calling as a HTTP client a server.

Questions :
- Which protocol should you plan/target to use : HTTP or TCP ? For which
purpose ?
- How do you plan to call your LDAP server when in your camel route, you
don't use the LDAP component (http://camel.apache.org/ldap.html) ?

Regards,


On Wed, Jul 9, 2014 at 9:45 AM, Javier Calvach Regidor <
jcalvache@rocketmail.com> wrote:

> Hi everyone,
>
> I'm trying to develop a camel route in order to connect an identity
> manager with an LDAP so, the idea is:
>
> IdM <-> Camel <-> LDAP
>
> I've tried these two (not at the same time) with no results:
>
> <from uri="mina:tcp://10.0.1.219:389?sync=true&amp;textline=true"/>
> <to uri="mina:tcp://10.0.1.40:389?sync=true&amp;textline=true"/>
>
>
> and
>
> <from uri="jetty:http://10.0.1.219:389?matchOnUriPrefix=true"/>
> <to uri="jetty:http://10.0.1.40:389?bridgeEndpoint=true"/>
>
> All the systems are in the same subnet, with total visibility between them.
>
> Any hint here?
>
> Looking forward to having some news from you,
> Thank you in advance.




-- 
Charles Moulliard
Apache Committer / Architect @RedHat
Twitter : @cmoulliard | Blog :  http://cmoulliard.github.io