You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@synapse.apache.org by Angel Tcholtchev <a....@googlemail.com> on 2010/03/05 08:56:33 UTC
Synapse http basic auth & http proxy
Hi,
I'm using synapse as proxy service. The actual back-end requires http basic
authentication. The endpoint is also not directly reachable from my network,
so I have to set a http proxy to successfully call it.
I searched through the synapse documentation but I could not find how to set
"out of the box" these properties to the axis2 http transport. Can you
please help me?
Regards,
Angel
Re: Synapse http basic auth & http proxy
Posted by Ruwan Linton <ru...@gmail.com>.
Before the send mediator.
<syn:property name="Autherization" value="(base64 encoded username and
password)" scope="transport"/>
<syn:send><syn:endpoint.... /></syn:send>
Thanks,
Ruwan
On Mon, Mar 8, 2010 at 1:37 PM, Angel Tcholtchev <
a.tcholtchev@googlemail.com> wrote:
> Hi,
> I need it for a demo, so hardcoded property work for me now. Where do I put
> this property.
>
>
> Thanks,
> Angel
>
> On Sat, Mar 6, 2010 at 6:10 PM, Ruwan Linton <ru...@gmail.com>
> wrote:
>
> > Hi Angel,
> >
> > It is just a matter of setting the basic auth header via a property
> > mediator
> > into the HTTP transport headers.
> >
> > <property name="Autherization" value="(base64 encoded username and
> > password)" scope="transport"/>
> >
> > You probably will need to write a custom mediator to generate the base64
> > encoded username and password string.
> >
> > I think it is good to have a built in mediator to support basic
> > authentication as well, and we will try to get a one for the next
> release.
> >
> > Thanks,
> > Ruwan
> >
> > On Fri, Mar 5, 2010 at 3:29 PM, Angel Tcholtchev <
> > a.tcholtchev@googlemail.com> wrote:
> >
> > > Hi Ruwan,
> > > thanks for the help. And how do I send the http basic auth header with
> my
> > > user and pass?
> > >
> > > Regards,
> > > Angel
> > >
> > > On Fri, Mar 5, 2010 at 11:47 AM, Ruwan Linton <ruwan.linton@gmail.com
> > > >wrote:
> > >
> > > > Hi Angel,
> > > >
> > > > Please use the following parameters in the http transport sender
> > > > configuration in the axis2.xml;
> > > >
> > > > <transportSender name="http"
> > > > class="org.apache.synapse.transport.nhttp.HttpCoreNIOSender">
> > > > <parameter name="non-blocking" locked="false">true</parameter>
> > > > <parameter name="http.proxyHost"
> > locked="false">$host</parameter>
> > > > <parameter name="http.proxyPort"
> > locked="false">$port</parameter>
> > > > <parameter name="http.proxyUser"
> > locked="false">$user</parameter>
> > > > <parameter name="http.proxyPassword"
> > > locked="false">$pwd</parameter>
> > > >
> > > > </transportSender>
> > > >
> > > > Thanks,
> > > > Ruwan
> > > >
> > > > On Fri, Mar 5, 2010 at 1:26 PM, Angel Tcholtchev <
> > > > a.tcholtchev@googlemail.com> wrote:
> > > >
> > > > > Hi,
> > > > > I'm using synapse as proxy service. The actual back-end requires
> http
> > > > basic
> > > > > authentication. The endpoint is also not directly reachable from my
> > > > > network,
> > > > > so I have to set a http proxy to successfully call it.
> > > > > I searched through the synapse documentation but I could not find
> how
> > > to
> > > > > set
> > > > > "out of the box" these properties to the axis2 http transport. Can
> > you
> > > > > please help me?
> > > > >
> > > > >
> > > > > Regards,
> > > > > Angel
> > > > >
> > > >
> > > >
> > > >
> > > > --
> > > > Ruwan Linton
> > > > Technical Lead & Product Manager; WSO2 ESB; http://wso2.org/esb
> > > > WSO2 <http://wso2.org/esb%0AWSO2> Inc.; http://wso2.org
> > > > email: ruwan@wso2.com; cell: +94 77 341 3097
> > > > blog: http://ruwansblog.blogspot.com
> > > >
> > >
> >
> >
> >
> > --
> > Ruwan Linton
> > Technical Lead & Product Manager; WSO2 ESB; http://wso2.org/esb
> > WSO2 <http://wso2.org/esb%0AWSO2> Inc.; http://wso2.org
> > email: ruwan@wso2.com; cell: +94 77 341 3097
> > blog: http://ruwansblog.blogspot.com
> >
>
--
Ruwan Linton
Technical Lead & Product Manager; WSO2 ESB; http://wso2.org/esb
WSO2 Inc.; http://wso2.org
email: ruwan@wso2.com; cell: +94 77 341 3097
blog: http://ruwansblog.blogspot.com
Re: Synapse http basic auth & http proxy
Posted by Angel Tcholtchev <a....@googlemail.com>.
Hi,
I need it for a demo, so hardcoded property work for me now. Where do I put
this property.
Thanks,
Angel
On Sat, Mar 6, 2010 at 6:10 PM, Ruwan Linton <ru...@gmail.com> wrote:
> Hi Angel,
>
> It is just a matter of setting the basic auth header via a property
> mediator
> into the HTTP transport headers.
>
> <property name="Autherization" value="(base64 encoded username and
> password)" scope="transport"/>
>
> You probably will need to write a custom mediator to generate the base64
> encoded username and password string.
>
> I think it is good to have a built in mediator to support basic
> authentication as well, and we will try to get a one for the next release.
>
> Thanks,
> Ruwan
>
> On Fri, Mar 5, 2010 at 3:29 PM, Angel Tcholtchev <
> a.tcholtchev@googlemail.com> wrote:
>
> > Hi Ruwan,
> > thanks for the help. And how do I send the http basic auth header with my
> > user and pass?
> >
> > Regards,
> > Angel
> >
> > On Fri, Mar 5, 2010 at 11:47 AM, Ruwan Linton <ruwan.linton@gmail.com
> > >wrote:
> >
> > > Hi Angel,
> > >
> > > Please use the following parameters in the http transport sender
> > > configuration in the axis2.xml;
> > >
> > > <transportSender name="http"
> > > class="org.apache.synapse.transport.nhttp.HttpCoreNIOSender">
> > > <parameter name="non-blocking" locked="false">true</parameter>
> > > <parameter name="http.proxyHost"
> locked="false">$host</parameter>
> > > <parameter name="http.proxyPort"
> locked="false">$port</parameter>
> > > <parameter name="http.proxyUser"
> locked="false">$user</parameter>
> > > <parameter name="http.proxyPassword"
> > locked="false">$pwd</parameter>
> > >
> > > </transportSender>
> > >
> > > Thanks,
> > > Ruwan
> > >
> > > On Fri, Mar 5, 2010 at 1:26 PM, Angel Tcholtchev <
> > > a.tcholtchev@googlemail.com> wrote:
> > >
> > > > Hi,
> > > > I'm using synapse as proxy service. The actual back-end requires http
> > > basic
> > > > authentication. The endpoint is also not directly reachable from my
> > > > network,
> > > > so I have to set a http proxy to successfully call it.
> > > > I searched through the synapse documentation but I could not find how
> > to
> > > > set
> > > > "out of the box" these properties to the axis2 http transport. Can
> you
> > > > please help me?
> > > >
> > > >
> > > > Regards,
> > > > Angel
> > > >
> > >
> > >
> > >
> > > --
> > > Ruwan Linton
> > > Technical Lead & Product Manager; WSO2 ESB; http://wso2.org/esb
> > > WSO2 <http://wso2.org/esb%0AWSO2> Inc.; http://wso2.org
> > > email: ruwan@wso2.com; cell: +94 77 341 3097
> > > blog: http://ruwansblog.blogspot.com
> > >
> >
>
>
>
> --
> Ruwan Linton
> Technical Lead & Product Manager; WSO2 ESB; http://wso2.org/esb
> WSO2 <http://wso2.org/esb%0AWSO2> Inc.; http://wso2.org
> email: ruwan@wso2.com; cell: +94 77 341 3097
> blog: http://ruwansblog.blogspot.com
>
Re: Synapse http basic auth & http proxy
Posted by Ruwan Linton <ru...@gmail.com>.
Hi Angel,
It is just a matter of setting the basic auth header via a property mediator
into the HTTP transport headers.
<property name="Autherization" value="(base64 encoded username and
password)" scope="transport"/>
You probably will need to write a custom mediator to generate the base64
encoded username and password string.
I think it is good to have a built in mediator to support basic
authentication as well, and we will try to get a one for the next release.
Thanks,
Ruwan
On Fri, Mar 5, 2010 at 3:29 PM, Angel Tcholtchev <
a.tcholtchev@googlemail.com> wrote:
> Hi Ruwan,
> thanks for the help. And how do I send the http basic auth header with my
> user and pass?
>
> Regards,
> Angel
>
> On Fri, Mar 5, 2010 at 11:47 AM, Ruwan Linton <ruwan.linton@gmail.com
> >wrote:
>
> > Hi Angel,
> >
> > Please use the following parameters in the http transport sender
> > configuration in the axis2.xml;
> >
> > <transportSender name="http"
> > class="org.apache.synapse.transport.nhttp.HttpCoreNIOSender">
> > <parameter name="non-blocking" locked="false">true</parameter>
> > <parameter name="http.proxyHost" locked="false">$host</parameter>
> > <parameter name="http.proxyPort" locked="false">$port</parameter>
> > <parameter name="http.proxyUser" locked="false">$user</parameter>
> > <parameter name="http.proxyPassword"
> locked="false">$pwd</parameter>
> >
> > </transportSender>
> >
> > Thanks,
> > Ruwan
> >
> > On Fri, Mar 5, 2010 at 1:26 PM, Angel Tcholtchev <
> > a.tcholtchev@googlemail.com> wrote:
> >
> > > Hi,
> > > I'm using synapse as proxy service. The actual back-end requires http
> > basic
> > > authentication. The endpoint is also not directly reachable from my
> > > network,
> > > so I have to set a http proxy to successfully call it.
> > > I searched through the synapse documentation but I could not find how
> to
> > > set
> > > "out of the box" these properties to the axis2 http transport. Can you
> > > please help me?
> > >
> > >
> > > Regards,
> > > Angel
> > >
> >
> >
> >
> > --
> > Ruwan Linton
> > Technical Lead & Product Manager; WSO2 ESB; http://wso2.org/esb
> > WSO2 <http://wso2.org/esb%0AWSO2> Inc.; http://wso2.org
> > email: ruwan@wso2.com; cell: +94 77 341 3097
> > blog: http://ruwansblog.blogspot.com
> >
>
--
Ruwan Linton
Technical Lead & Product Manager; WSO2 ESB; http://wso2.org/esb
WSO2 Inc.; http://wso2.org
email: ruwan@wso2.com; cell: +94 77 341 3097
blog: http://ruwansblog.blogspot.com
Re: Synapse http basic auth & http proxy
Posted by Angel Tcholtchev <a....@googlemail.com>.
Hi Ruwan,
thanks for the help. And how do I send the http basic auth header with my
user and pass?
Regards,
Angel
On Fri, Mar 5, 2010 at 11:47 AM, Ruwan Linton <ru...@gmail.com>wrote:
> Hi Angel,
>
> Please use the following parameters in the http transport sender
> configuration in the axis2.xml;
>
> <transportSender name="http"
> class="org.apache.synapse.transport.nhttp.HttpCoreNIOSender">
> <parameter name="non-blocking" locked="false">true</parameter>
> <parameter name="http.proxyHost" locked="false">$host</parameter>
> <parameter name="http.proxyPort" locked="false">$port</parameter>
> <parameter name="http.proxyUser" locked="false">$user</parameter>
> <parameter name="http.proxyPassword" locked="false">$pwd</parameter>
>
> </transportSender>
>
> Thanks,
> Ruwan
>
> On Fri, Mar 5, 2010 at 1:26 PM, Angel Tcholtchev <
> a.tcholtchev@googlemail.com> wrote:
>
> > Hi,
> > I'm using synapse as proxy service. The actual back-end requires http
> basic
> > authentication. The endpoint is also not directly reachable from my
> > network,
> > so I have to set a http proxy to successfully call it.
> > I searched through the synapse documentation but I could not find how to
> > set
> > "out of the box" these properties to the axis2 http transport. Can you
> > please help me?
> >
> >
> > Regards,
> > Angel
> >
>
>
>
> --
> Ruwan Linton
> Technical Lead & Product Manager; WSO2 ESB; http://wso2.org/esb
> WSO2 <http://wso2.org/esb%0AWSO2> Inc.; http://wso2.org
> email: ruwan@wso2.com; cell: +94 77 341 3097
> blog: http://ruwansblog.blogspot.com
>
Re: Synapse http basic auth & http proxy
Posted by Ruwan Linton <ru...@gmail.com>.
Hi Angel,
On Mon, Mar 8, 2010 at 7:55 PM, Angel Tcholtchev <
a.tcholtchev@googlemail.com> wrote:
> Hi,
> regarding the http proxy. I've tried out the your suggestion.
> I also found this jira https://issues.apache.org/jira/browse/SYNAPSE-481.
>
> Look like the issue was closed on 12/Mar/09 04:58 PM and the latest release
> is from 9-Jun-2008.
> It looks to me that the fix is not included in any official release.
>
Yes, you are correct, but we are planning on a release soon, probably the
release will be available within the next couple of months.
>
> I've got one additional question - how do I turn on logging in different
> locations around the project(for example the NIO HTTP sender)?
>
You could find the log4j.properties file on the lib directory of the synapse
distribution and you could edit that and add a specific package/class to
configure debugging and the debug threshold level for those packages.
Thanks,
Ruwan
>
> Regards Regards,
> Angel Tcholtchev
>
> STREAM SOA INTEGRATION
> SAP AG Bulgaria
>
>
>
> On Fri, Mar 5, 2010 at 11:47 AM, Ruwan Linton <ruwan.linton@gmail.com
> >wrote:
>
> > Hi Angel,
> >
> > Please use the following parameters in the http transport sender
> > configuration in the axis2.xml;
> >
> > <transportSender name="http"
> > class="org.apache.synapse.transport.nhttp.HttpCoreNIOSender">
> > <parameter name="non-blocking" locked="false">true</parameter>
> > <parameter name="http.proxyHost" locked="false">$host</parameter>
> > <parameter name="http.proxyPort" locked="false">$port</parameter>
> > <parameter name="http.proxyUser" locked="false">$user</parameter>
> > <parameter name="http.proxyPassword"
> locked="false">$pwd</parameter>
> >
> > </transportSender>
> >
> > Thanks,
> > Ruwan
> >
> > On Fri, Mar 5, 2010 at 1:26 PM, Angel Tcholtchev <
> > a.tcholtchev@googlemail.com> wrote:
> >
> > > Hi,
> > > I'm using synapse as proxy service. The actual back-end requires http
> > basic
> > > authentication. The endpoint is also not directly reachable from my
> > > network,
> > > so I have to set a http proxy to successfully call it.
> > > I searched through the synapse documentation but I could not find how
> to
> > > set
> > > "out of the box" these properties to the axis2 http transport. Can you
> > > please help me?
> > >
> > >
> > > Regards,
> > > Angel
> > >
> >
> >
> >
> > --
> > Ruwan Linton
> > Technical Lead & Product Manager; WSO2 ESB; http://wso2.org/esb
> > WSO2 <http://wso2.org/esb%0AWSO2> Inc.; http://wso2.org
> > email: ruwan@wso2.com; cell: +94 77 341 3097
> > blog: http://ruwansblog.blogspot.com
> >
>
--
Ruwan Linton
Technical Lead & Product Manager; WSO2 ESB; http://wso2.org/esb
WSO2 Inc.; http://wso2.org
email: ruwan@wso2.com; cell: +94 77 341 3097
blog: http://ruwansblog.blogspot.com
Re: Synapse http basic auth & http proxy
Posted by Angel Tcholtchev <a....@googlemail.com>.
Hi,
regarding the http proxy. I've tried out the your suggestion.
I also found this jira https://issues.apache.org/jira/browse/SYNAPSE-481.
Look like the issue was closed on 12/Mar/09 04:58 PM and the latest release
is from 9-Jun-2008.
It looks to me that the fix is not included in any official release.
I've got one additional question - how do I turn on logging in different
locations around the project(for example the NIO HTTP sender)?
Regards Regards,
Angel Tcholtchev
STREAM SOA INTEGRATION
SAP AG Bulgaria
On Fri, Mar 5, 2010 at 11:47 AM, Ruwan Linton <ru...@gmail.com>wrote:
> Hi Angel,
>
> Please use the following parameters in the http transport sender
> configuration in the axis2.xml;
>
> <transportSender name="http"
> class="org.apache.synapse.transport.nhttp.HttpCoreNIOSender">
> <parameter name="non-blocking" locked="false">true</parameter>
> <parameter name="http.proxyHost" locked="false">$host</parameter>
> <parameter name="http.proxyPort" locked="false">$port</parameter>
> <parameter name="http.proxyUser" locked="false">$user</parameter>
> <parameter name="http.proxyPassword" locked="false">$pwd</parameter>
>
> </transportSender>
>
> Thanks,
> Ruwan
>
> On Fri, Mar 5, 2010 at 1:26 PM, Angel Tcholtchev <
> a.tcholtchev@googlemail.com> wrote:
>
> > Hi,
> > I'm using synapse as proxy service. The actual back-end requires http
> basic
> > authentication. The endpoint is also not directly reachable from my
> > network,
> > so I have to set a http proxy to successfully call it.
> > I searched through the synapse documentation but I could not find how to
> > set
> > "out of the box" these properties to the axis2 http transport. Can you
> > please help me?
> >
> >
> > Regards,
> > Angel
> >
>
>
>
> --
> Ruwan Linton
> Technical Lead & Product Manager; WSO2 ESB; http://wso2.org/esb
> WSO2 <http://wso2.org/esb%0AWSO2> Inc.; http://wso2.org
> email: ruwan@wso2.com; cell: +94 77 341 3097
> blog: http://ruwansblog.blogspot.com
>
Re: Synapse http basic auth & http proxy
Posted by Ruwan Linton <ru...@gmail.com>.
Hi Angel,
Please use the following parameters in the http transport sender
configuration in the axis2.xml;
<transportSender name="http"
class="org.apache.synapse.transport.nhttp.HttpCoreNIOSender">
<parameter name="non-blocking" locked="false">true</parameter>
<parameter name="http.proxyHost" locked="false">$host</parameter>
<parameter name="http.proxyPort" locked="false">$port</parameter>
<parameter name="http.proxyUser" locked="false">$user</parameter>
<parameter name="http.proxyPassword" locked="false">$pwd</parameter>
</transportSender>
Thanks,
Ruwan
On Fri, Mar 5, 2010 at 1:26 PM, Angel Tcholtchev <
a.tcholtchev@googlemail.com> wrote:
> Hi,
> I'm using synapse as proxy service. The actual back-end requires http basic
> authentication. The endpoint is also not directly reachable from my
> network,
> so I have to set a http proxy to successfully call it.
> I searched through the synapse documentation but I could not find how to
> set
> "out of the box" these properties to the axis2 http transport. Can you
> please help me?
>
>
> Regards,
> Angel
>
--
Ruwan Linton
Technical Lead & Product Manager; WSO2 ESB; http://wso2.org/esb
WSO2 Inc.; http://wso2.org
email: ruwan@wso2.com; cell: +94 77 341 3097
blog: http://ruwansblog.blogspot.com