dotps1 / HPWarranty

PowerShell module to help retrieve Hewlett-Packard Warranty Information
https://www.powershellgallery.com/packages/HPWarranty/
43 stars 17 forks source link

Unauthorized error when using the script #43

Open slaydeapl opened 3 years ago

slaydeapl commented 3 years ago

The script now seems to be returning nothing, everything is blank on the return. Investigating here is the output from the soap request:

{ "status": "error", "faultcode": "30120", "message": "Backend service returned a non HTTP-2xx status.", "target": "/gw/hpit/egit/obligation.sa/1.1", "httpResponse": "500", "httpContentType": "text/xml;charset=UTF-8", "httpContent": "<soap:Envelope xmlns:soap='http://schemas.xmlsoap.org/soap/envelope/'><soap:Body><soap:Fault><faultcode>soap:Server</faultcode><faultstring>401 : Unauthorized</faultstring></soap:Fault></soap:Body></soap:Envelope>", "latency": "748" }

Maybe they changed the credentials or took down the API?

beanska commented 3 years ago

I haven't used the script in years since I moved to a Dell shop. Last time it changed I just installed Fiddler, enabled https capture in fiddler, downloaded the HP support tool and captured the warranty request. HP might also have better tools for this by now.

slaydeapl commented 3 years ago

I haven't used the script in years since I moved to a Dell shop. Last time it changed I just installed Fiddler, enabled https capture in fiddler, downloaded the HP support tool and captured the warranty request. HP might also have better tools for this by now.

Interesting, I'll give this a try. The script actually has been working flawlessly up until this week :/ . As far as I know, there is nothing that matches the speed of using this script for now.

Thanks!

hgpot commented 3 years ago

I wonder if it is related to this API: https://developers.hp.com/hp-product-warranty . I was researching this issue as I have noticed it failing starting this week as well, and came across that HP page in hopes that maybe that an official API was available. But this one is down right now, I wonder if this script uses it in some way?

" Existing API users will get a 400 level response from the API. We apologize for any inconvenience. "

hgpot commented 3 years ago

enabled https capture in fiddler, downloaded the HP support tool and captured the warranty request

I tried that, it does seem like hpwarrantychecker.exe included in that support tool reaches out to http://hpsa-redirectors.hpcloud.hp.com:443 and does get a HTTP 200, but I don't see much more detail on what it did. The tool itself also returns "Unknown" in the warranty status, so I bet that it is down too. I think the Support Tool, the official HP Warranty API, and this PowerShell script all use the same service that is down. Hopefully very temporary...

slaydeapl commented 3 years ago

I could be wrong, but I believe AWS is being used to secure their requests now. At least briefly looking at the post requests there are AWS authorization signatures.