Saturday, April 4, 2015

Create self-signed cert, upload to Azure and check req/res with Curl and Soap UI


1.      Create a self-signed certificate.

openssl req -x509 -nodes -days 365 -newkey rsa:2048 -keyout dp-azure-soapui-cert.pem -out dp-azure-soapui-cert.pem

Important: The “Common Name (eg, your name or your server's hostname)” appears in the display name in management portal.

a.      Verify

Both private key and the certificate  are in the file. You can verify with “cat dp-azure-soapui-cert.pem”

2.      Create a file with public key

openssl x509 -outform der -in dp-azure-soapui-cert.pem -out dp-azure-soapui-cert.cer

3.      Upload the .cer file to Azure management portal


Verify:

Method 1:


Test using curl


 

Send request header:

x-ms-version: 2011-02-25 (https://msdn.microsoft.com/en-us/library/azure/gg592580.aspx )

 

curl -E <path>/dp-azure-soapui-cert.pem -H "x-ms-version: 2011-02-25" https://management.core.windows.net/<subscription id>/services/storageservices

Method 2:


Test using SoapUI

1.      Create a “New REST project” with the REST API to list storage accounts.
 

     Provide the REST API url to list Storage accounts.
 

2.      Provide the .pem file

 
 
3.      Provide x-ms-version


4.      Fire request and check response


 

No comments:

Post a Comment