(Migrated) Basic Auth not working for outgoing connections in Zato 2.0.2

(This message has been automatically imported from the retired mailing list)

Hello,

I have a service that I need to connect to and the api uses basic_auth, on zato 1.1 is working fine, but on zato 2.0.2 it doesn’t, this are the steps I did on zato 2.0.2

Created a new HTTP Basic Auth definition on Security -> HTTP Basic Auth
Created a new Plain HTTP outgoing connection setting as security definition the one I’ve created above
Created a new service and calling the connection I’ve created.

From the logs I can see the auth is there

2015-03-04 12:41:28,804 - INFO - 29246:Dummy-4544 - zato.server.connection.http_soap.outgoing:22 - CID:[K06MF624CJBNG3D0YXKVZ35HKZJ7], address:[http://apidev.xxx.net/webscreenshot.json/changestatus/], qs_params:[{}], auth:[(u’ivan’, u’123’)], kwargs:[{}]

But the Api returns Invalid Auth.

So I did a dump in the API to see what was receiving and here are the headers from the zato 2.0.2 call:

[headers] => Slim\Http\Headers Object
    (
        [data:protected] => Array
            (
                [Host] => apidev.xxx.net
                [Content-Length] => 73
                [Accept-Encoding] => gzip, deflate
                [Accept] => */*
                [User-Agent] => python-requests/2.3.0 CPython/2.7.3 Linux/3.2.0-23-generic
                [X-Zato-Msg-Ts] => 2015-03-04T21:03:20.556063
                [X-Zato-Component] => parallel/aito/10-229-11-13.cloud.opsource.net/29245/Dummy-5473
                [X-Zato-Cid] => K043CXB2HP4C3ZT55T3BFJMZ0QKR
            )

I ran the same service on Zato 1.1 and here are the headers:

[headers] => Slim\Http\Headers Object
    (
        [data:protected] => Array
            (
                [Host] => apidev.xxx.net
                [Content-Length] => 73
                [Accept-Encoding] => gzip, deflate, compress
                [Accept] => */*
                [User-Agent] => python-requests/0.14.2 CPython/2.7.3 Linux/3.2.0-23-generic
                [X-Zato-Msg-Ts] => 2015-03-04T21:04:43.288043
                [X-Zato-Component] => parallel/esb-dev/ip6-localhost/7341/Dummy-1
                [X-Zato-Cid] => K304593037285802861097418382953451921424
                [Php-Auth-User] => ivan
                [Php-Auth-Pw] => 123
            )

    )

So what am I missing? settings on both are the same, using the same name for each definition

On 04/03/15 22:15, Ivan Villareal wrote:

I have a service that I need to connect to and
the api uses basic_auth, on zato 1.1 is working fine, but on zato 2.0.2 it doesn’t,

Hi Ivan,

thanks for reporting it, it has been fixed in this commit …

… and will be released in 2.0.3.