Quantcast
Channel: Symantec Connect - Security
Viewing all articles
Browse latest Browse all 5755

Authentication Failed while requesting Vontu API using Python 3 suds library

$
0
0
I need a solution

Hello, I am trying to use the Vontu incident report and update API from python 3 and keep getting authentication failed error:

urllib.error.HTTPError: HTTP Error 500: Internal Server Error

suds.WebFault: Server raised fault: 'Authentication failed'

Here is the code:

from suds.client import Client

import suds

proxies = {"http": proxy_http, "https": proxy_https}

url = "https://{}:{}/ProtectManager/services/v2011/incidents?wsdl".format(host, port)

t = suds.transport.https.HttpAuthenticated(username=user, password=passwd, proxy = proxies )

client = Client(url=url,  transport = t)

#couple of other options that I tried

#client = Client(url=url,  proxy = proxies, username= user, password= passwd)

#client = Client(url=url, proxy = proxies,  headers = {'username': user, 'password': passwd}) 

print(client) # this outputs the wsdl file successfully 

inclistreq = client.factory.create("ns3:IncidentListRequest")
inclistreq.savedReportId = 1

inclistreq.incidentCreationDateLaterThan = 0

print(inclistreq) # this outputs a well-formed  inclistreq object

result = client.service.incidentList(inclistreq)

The credentials are fine, I can login from the web console and can see the report. Can anyone please help here. Thanks in advance! 

-

BR
Zawoad

0

Viewing all articles
Browse latest Browse all 5755

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>