Import public certificate to Azure Website - azure

We need to use in our Azure Website a public certificate (.cer) from a 3rd party so we encrypt a message which they would decrypt with their private key.
It seems this is only supported for Cloud Services: from portal go to Cloud Services->Pick Cloud Service->Certificates->Upload. Message is: Upload a certificate file (.pfx or .cer).
For Azure Websites this option is not available: from portal go to Websites->Pick Website->Configure->Upload a certificate, then the message is: Upload a certificate file (.pfx) for use in your website. No .cer option and it also asks for the password.
Is there any way we can upload a certificate so our Azure website can use in the same manner we do on-premise by taking the public certificate from the certificate store?

From your on premise website export the certificate with all path and enable export features. You will be asked to provide a password and location on disk. Use this pfx for Azure. ;)

Related

How to add Secure Certificate to App Service

I am somewhat new to websites and I have created a Wordpress website from marketplace on azure app service.
Can someone help me on how to add SSL certificate to it?
I have no way so war but I want to add SSL certificate added to Website.
If you have purchased an App Service certificate which is private certificate that's managed by Azure. It combines the simplicity of automated certificate management and the flexibility of renewal and export options. Refer to these step by step document: Import an App Service Certificate
If you already have a private certificate from a third-party provider, you can upload by following this document:
Upload a private certificate Also, See Private certificate requirements.

Cannot connect to external https from Azure SF due to untrusted certificate

I have an application, deployed in Azure Service Fabric.
The application connects to external web service which has an untrusted SSL certificate and fails.
I solved problem by implementing custom cert validation logic in "ServerCertificateCustomValidationCallback" method of HttpClient, however this is not an ideal solution.
How to install external SSL certificate into the trusted store on VMs in VMSS, so that any app in ASF can consume external web services without additional efforts?
Additional notes
Certificate contains no private key, so it cannot be imported into Azure key vault and used in ARM template (or I didn't find a way how to achieve this)
Certificate cannot be installed manually via RD, because this doesn't support autoscaling
It is possible to import .pfx certificate without password into Azure Key Valut. Certificate should be imported into Secrets (not into Certificates). Azure portal says, that this feature is deprecated but it works.
When certificate is in key valut, then ARM template can be used to deploy it onto VMs.
To get pfx certificates, I downloaded root and intermediate certificates in browser. Then converted .cer to .pfx via small .net console, written by myself - check X509Certificate class, it has all necessary methods.

Installing certificates to the trusted root certificate store on azure web apps

How can I install a certificate into an Azure Web App so that my azure webapp can communicate with a remote service via SSL (this particular certificate is not signed by a public CA)
I generated an ssl certificate with openssl and when I install it to the trusted root certificate authentication store on my local computer the runs fine. However when I upload the cert via the management portal I get errors that the certificate isn't trusted (which is correct) and the correct error for when a certificate is not installed.
How can I install a private SSL certificate into the trusted root certificate store on an azure web app?
Unfortunately, we cannot add a certificate to the trusted certificate authority on an Azure Web App. The security implications would be quite bad if that were possible. More detail info please refer to another SO thread.
But We can use Azure Cloud Service that allowed us to do that. More info please refer to the document.
If we want to install certificates to Personal certificate store , we could upload a .pfx file to the Azure App, and add an App setting named WEBSITE_LOAD_CERTIFICATES with its value set to the thumbprint of the certificate will make it accessible to your web application. Then the certificates will be installed to the Personal certificate store . More detail please refer to Using Certificates in Azure Websites Applications.
How to obtained an SSL certificate please refer to the official document Secure your app's custom domain with HTTPS.
 
The easiest way to get an SSL certificate that meets all the requirements is to buy one in the Azure portal directly. This article shows you how to do it manually and then bind it to your custom domain in App Service.

Configure SSL on Windows Azure

i am having issue in configuring SSL on cloud app. i do the following steps in sequence
generate create certificate request from VM hosted on azure enviroment
a text file with CSR hash is created.
i send the hash to certificate issuing authority and i upload the new release in
the mean while on cloud
certificate issing authority send me 4 files with crt extension.
i import the .crt file in certificate manager console (certmgr.msc)
export the file in cer format.
update web role properties in VS 2012. add certificate and update endpoints.
upload cer file on cloud
publish the package and update the package on cloud.
update is not completed becasue of
certificate with thumbprint associated with HTTPS input endpoint https does not contain private key
can any one help me out how i configure SSL on cloud app.
regards,
Zeeshan
As Gaurav mentioned, in step 6, you want to export the certificate and include private key. This will generate a .PFX file and ask you to provide a password.
Furthermore, when you have the .PFX file - you will want to take care as to where you upload it to. Make sure that you upload it to Certificates area under the Web Role - the portal should ask you for a password to the .PFX file.
Management Certificates area that expects .CER files is not the right place to upload SSL certificates to. I am guessing it is likely where uploaded the .CER file from step 6
I followed the following step process when I was setting up SSL in Azure using GoDaddy as CA:
Create a Certificate Signing Request (CSR) on the web server (local IIS, not Azure)
Send CSR to CA (Certificate Authority – GoDaddy) and specify alternative domain names (if you've paid for that possibility)
Download certificate from CA
Import certificate to web server (local IIS, not Azure)
Import the intermediate certificates from CA into local computer (where you have IIS)
Export the certificate as PFX file from IIS and give it a password
Import PFX file into Azure together with password
Bind configured domain names to the certificate in Azure
There are a few different ways to create the CSR file. I used IIS Manager on my local developer computer.
You can read an extended version of the list here where all the steps are more thoroughly explained.
Have you checked the requirements for uploading and using certificate on windows azure?
The requirements is:
You need to include a certificate that must have a minumium of 2048 bit in keysize.
The certificate must be exported with Personal Information Exchange.
When creating the cerificate your subject name must match the domain name of you cloud service.
You have to include a private key.

Creating Azure Self Signed Certificate

We have an on premise web site which needs to communicate with windows azure service and sql azure service.
I need to create a self signed certificate but makecer.exe is not available on web service. Could someone please confirm whether I must create the self signed on specific on premise web server or I can create on any machine and install on web server?
Thanks.
You can create the self signed certificate on any machine and install it on any other.
You can use this free Self Signed Certificate Generator (http://www.itiverba.com/en/software/itisscg.php) to create self-signed certificates.
If you create the certificate on another comuter than your server, just export the certificate in a PFX file including the private Key and then copy the PFX on your server and install the certificate AND its private key.
If you use a Linux server, the tool allows you to export the certificate in PEM files.

Resources