camel-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Sergey Beryozkin <sberyoz...@gmail.com>
Subject Re: Configuring SSL for CXF-RS consumers in Camel
Date Thu, 07 Feb 2013 10:54:09 GMT
Hi,
On 07/02/13 08:44, Martin Stiborský wrote:
> Thanks…but, still no luck…I have found so many different examples how to
> configure http:conduit in various environments, with various frameworks,
> but no combination works for me…even worse, I don't how it *actually* works.
>
> I have cxf-rs, camel, running in karaf. For start, I'm trying to setup a
> simple basic authentication within my exposed REST API.
>
> blueprint configuration:
>
> <blueprint ...>
>
> <camel-cxf:rsServer id="myServer" address="${server.rest.base}/"
>                          serviceClass="com.foo.myServerClass"/>
>
>    <http:conduit name="http://localhost:.*"
>                    xmlns:sec="http://cxf.apache.org/configuration/security"
>                    xmlns="http://cxf.apache.org/transports/http/configuration
> ">
>      <http:authorization>
>        <sec:UserName>user</sec:UserName>
>        <sec:Password>pass</sec:Password>
>      </http:authorization>
>    </http:conduit>
>
>    <camelContext id="mainContext" useMDCLogging="true"
>                    xmlns="http://camel.apache.org/schema/blueprint">
>        ...
>    </camelContext>
>
> </blueprint>
>
> So, when some service in my REST interface is being invoked, I should be
> asked for authentication.
> But, it doesn't work.
> I'd like to kindly ask you for help, thanks guys!
>

I somehow thought you were asking about the client side set up, sorry. 
HttpConduit does not help on the server side, only on the client side.
Re HTTPS: on the server side, when running in OSGI, your best bet  is to 
use pax-web configuration, or I guess, may be various HTTP bridges (I've 
no experience with these).
Authentication: use CXF JAASLoginInInterceptor, I think there might be a 
demo in ServiceMix, or I can point you to our own demo too...
HTH, Sergey


>
>
>
> On Wed, Feb 6, 2013 at 11:15 AM, Sergey Beryozkin<sberyozkin@gmail.com>wrote:
>
>> On 05/02/13 22:19, Martin Stiborský wrote:
>>
>>> Hello guys,
>>> just a quick question, because, I'm a little bit lost…
>>> What is the preffered way to configure SSL for REST interface in Camel
>>> project?
>>>
>>> I'm using CXF-RS and so far, sending requests via http was good enough,
>>> but
>>> now it gets more serious and I need https…
>>>
>>> I have found that one possibility could be through "PAX web" and the
>>> second
>>> one "http conduit".
>>> Is it so? What is the difference?
>>> At least the PAX web was not working for me, I have very similar scenario
>>> what is discussed in this thread (
>>> http://camel.465427.n5.nabble.**com/Camel-CXF-HTTPS-td5721517.**html<http://camel.465427.n5.nabble.com/Camel-CXF-HTTPS-td5721517.html>)
>>> but the
>>> "https" resource was not working (connection refused), following the
>>> advices in the discussion there.
>>>
>>> Now I'm going to take a look on "http conduit", but anyway, I'd like to
>>> ask
>>> you for hints.
>>>
>>
>> Re CXF HTTP Conduit, please check
>> http://cxf.apache.org/docs/**jax-rs-client-api.html#JAX-**RSClientAPI-**
>> ConfiguringanHTTPConduitfromSp**ring<http://cxf.apache.org/docs/jax-rs-client-api.html#JAX-RSClientAPI-ConfiguringanHTTPConduitfromSpring>
>>
>> HTH, Sergey
>>
>>   Thanks!
>>>
>>>
>
>

Mime
View raw message