PowerShell API Client

Hello,

I am attempting to write a PowerShell client for Chef so that I can retrieve configuration information about nodes in native PowerShell.

I thought I had got to the point where I was signing the request properly, but the server rejects my request each time stating an invalid signature.

I am trying to replicate how the chef-client does the initial communication and creates the header signatures to the API. To that end I have used Fiddler2 and also looked at the code for Chef in GitHub. I know that the 'hashed path' and 'hashed content' attributes are correct as I have been checking the headers from chef-client for the same request.

Now obviously I am not able to do a straight comparison of the signatures between the two clients as it will change everytime. So I am now trying to find out how to debug this some more.

I notice that in the Mixlib::Authentication Gem it has got some logging about the signature but only for debug. How can I turn on debugging on the Chef server so I can see the authentication requests come in and try to work out what is going on? I am using Chef server 11.4.0.

I am 99% sure it is a problem with the way in which the signature is being encrypted, indeed I can encrypt and decrypt the signature in PowerShell without issue. But I need to verify if Ruby can do the decryption as well, which I am working on.

Thanks very much,

Russell

Russell Seymour
Senior Platform Engineer

07526 495 178 - Mobile
020 7756 1000 - Reception

ASOS is a CarbonNeutral(r) company

[Description: ASOS]http://www.asos.com/[Description: Facebook]https://www.facebook.com/ASOS?ref=tn_tnmn[Description: cid:image003.png@01CE0EEA.D66CE540]https://plus.google.com/+ASOS/[Description: cid:image004.png@01CE0EEA.D66CE540]http://instagram.com/asos[Description: cid:image005.png@01CE0EEA.D66CE540]http://pinterest.com/asos/[Description: cid:image006.png@01CE0EEA.D66CE540]https://twitter.com/asos[Description: cid:image007.png@01CE0EEA.D66CE540]http://asoslive.tumblr.com/

Registered Office: ASOS.com Ltd, Greater London House, Hampstead Road, London, NW1 7FB
ASOS.com Ltd is a wholly owned subsidiary of ASOS plc. Registered in England 3584121.
The information in this internet email is confidential and is intended solely for the addressee. Access copying or re-use of information in it by anyone else is unauthorised. Any views or opinions presented are solely those of the author and do not necessarily represent those of ASOS plc or any of its affiliates. If you are not the intended recipient please contact the sender.