I am using this guide,https://docs.mender.io/1.3/apis/device-apis/device-authentication#auth_requests-post, to get this to work but I am having difficulty.
I am able to get the X-MEN-signature by following these steps:
- Generate Public key from deviceauth, openssl rsa -in private.key -pubout -out pubkey.pem
- Sign and output to SHA256, openssl dgst -sha256 -sign private.key -out request.sha256 request.txt
- Use Base64 to output the results, openssl base64 -in request.sha256 -out request.signature.sha256
I call the request via a ARC chrome add on and I get the following message:
“error”: “signature verification failed”,
The documentation says to use the The device’s public key, generated by the device or pre-provisioned by the vendor, but I am not sure what private / public key pair to use. Also, the documentation has the json object malformatted, which is odd.