nemo
nemo

Reputation: 12728

SOAP web service behind proxy, access using python-suds

I have this strange case scenario with python suds.

I have a soap service (java) running on a local ip, say http://10.0.0.1:8080/services/

I use suds http base auth within the local network and it's working fine.

from suds.client import Client
c = Client(url, username="user", password="pass")

But I want to make it accessible from outside, so I asked the system admin : "Can you set up a external IP use reverse proxy for this soap service"

"Yes, but the company firewall doesn't allow port 8080, so your rule will be:

http://10.0.0.1:8080/services/* <-> https://example.com/services/*

Then the rule is setup but I just can't make the client to work. I tried all kinds of transport:

from suds.transport.https import WindowsHttpAuthenticated
from suds.transport.http import HttpAuthenticated
#from suds.transport.https import HttpAuthenticated
from suds.client import Client

http = HttpAuthenticated(username="jlee", password="jlee")
#https = HttpAuthenticated(username="jlee", password="jlee")
ntlm = WindowsHttpAuthenticated(username="jlee", password="jlee")
url = "https://example.com/services/SiteManager?wsdl"
c = Client(url, transport = http)

it always returns:

suds.transport.TransportError: HTTP Error 403: Forbidden ( The server denied the specified Uniform Resource Locator (URL). Contact the server administrator.  )

I tried to access the URL https://example.com/services/SiteManager?wsdl from chrome, it returns 403 too!

But if I sign in first using other routes (my server is running other http pages on tomcat), and then access the URL again the wsdl desc page shows up!

Can anybody tell me what's wrong with this? is it to do with the configuration of the reverse proxy server or the suds transport?

Thanks very much! Jackie

Upvotes: 0

Views: 2231

Answers (1)

nemo
nemo

Reputation: 12728

Found the solution by talking to system admin(who's in charge of setting up the reverse proxy), he said there is an checkbox option in MS DMZ(reverse proxy server) for allow http base auth.

Upvotes: 0

Related Questions