SSL Archives - RuslanY Blog Azure App Service Features and Best Practices Sun, 02 Jun 2019 22:03:37 +0000 en-US hourly 1 https://wordpress.org/?v=6.2.16 https://ruslany.net/wp-content/uploads/2019/05/cropped-web-32x32.png SSL Archives - RuslanY Blog 32 32 How to buy a certificate for an Azure Web App https://ruslany.net/2016/04/how-to-buy-a-certificate-for-an-azure-web-app/ https://ruslany.net/2016/04/how-to-buy-a-certificate-for-an-azure-web-app/#comments Tue, 05 Apr 2016 18:55:25 +0000 http://ruslany.net/?p=397342 If you have tried to enable SSL for your Azure Web App you know that the steps to do that are: Purchase certificate and export it into a PFX file Upload PFX file to a resource group that contains your web app Bind the web app’s hostnames to the certificate Out of those steps the … Continue reading "How to buy a certificate for an Azure Web App"

The post How to buy a certificate for an Azure Web App appeared first on RuslanY Blog.

]]>
If you have tried to enable SSL for your Azure Web App you know that the steps to do that are:

  1. Purchase certificate and export it into a PFX file
  2. Upload PFX file to a resource group that contains your web app
  3. Bind the web app’s hostnames to the certificate

Out of those steps the step #1 is the most non-obvious. Just by looking through the instructions in this article you can see that the process is complex and error prone.

Recently the Azure team has released an improved support for buying certificates for Azure Web Apps. Now it is possible to purchase a certificate without ever leaving the Azure Portal UI experience. In this blog post I’ll show how easy it is to buy a certificate and enable SSL for a Web App. As an example I will walk through the process of buying a certificate and enabling SSL for my web site http://ruslany.net/

To start the process of buying a cert in Azure Portal click on Browse > and select “App Service Certificates“.

Then click Add and specify the certificate properties, most importantly the Naked Domain Host Name (e.g. ruslany.net in my case):

The certificate purchase process starts and at some point you will be asked to configure a Key Vault service which will store the purchased cert.

If you do not have a Key Vault configured then add a new Key Vault Repository and once it is provisioned click on the “Store” button:

After the Key Vault has been linked to your certificate then next step is to verify the domain ownership. Azure Portal makes this verification very simple. If you already have a Web App that uses the same domain name as in the certificate then you can chose “App Service Verification” method and the corresponding App will be listed below. Just click on “Verify” button and give it 5 to 10 minutes for verification process to complete.

Assuming the verification was successful the certificate will be issued and will be stored in the Key Vault repository from where it can be used by other App Services within your subscription:

To use the certificate in the Web App, select the Web App in the portal, then select “Custom domains and SSL” and then click on “Import Certificate”

This will ask you to pick the certificate from the Key Vault repository:

After that the certificate information should show up in the “Custom Domains and SSL” page where you can configure SSL bindings to use that certificate:

How to rekey a certificate

One nice feature that is included in the certificate management functionality is the ability to rekey a certificate. If for any reason you believe your certificate got compromised or if you need to rotate the certificate for security compliance reasons you can easily rekey it. This will result in a new certificate with a different thumbprint issued for your domain.

In addition, once the rekey’ed certificate has been issued you can click on “Sync” button and all the web apps that use the old certificate will be updated to use the rekey’ed certificate. Note that you can rekey these certificates as many times as you need as long as they are not expired.

The post How to buy a certificate for an Azure Web App appeared first on RuslanY Blog.

]]>
https://ruslany.net/2016/04/how-to-buy-a-certificate-for-an-azure-web-app/feed/ 5
How to setup IP SSL on Windows Azure Web Sites https://ruslany.net/2013/07/how-to-setup-ip-ssl-on-windows-azure-web-sites/ https://ruslany.net/2013/07/how-to-setup-ip-ssl-on-windows-azure-web-sites/#comments Mon, 01 Jul 2013 18:50:07 +0000 http://ruslany.net/?p=3881 The information in this post is out of date and should not be used as a guidance when configuring IP SSL for Azure Web Apps. Specifically if your custom domain is a CNAME to the default web app domain (e.g. contoso.azurewebsites.net) then it is not necessary to do any A record or CNAME changes as … Continue reading "How to setup IP SSL on Windows Azure Web Sites"

The post How to setup IP SSL on Windows Azure Web Sites appeared first on RuslanY Blog.

]]>

The information in this post is out of date and should not be used as a guidance when configuring IP SSL for Azure Web Apps. Specifically if your custom domain is a CNAME to the default web app domain (e.g. contoso.azurewebsites.net) then it is not necessary to do any A record or CNAME changes as described in this article. The web app domains will be automatically remapped to the dedicated IP address when you enable IP SSL.

Azure Web Sites started to support custom domains SSL functionality recently. There are two SSL modes supported:

  1. SNI based SSL. This is an extension to SSL and Transport Layer Security (TLS) that allows multiple domains to share the same IP address, with separate security certificates for each domain. Most modern browsers (including Internet Explorer, Chrome, Firefox and Opera) support SNI, however older browsers may not support SNI.
  2. IP based SSL. This mode associates a certificate with a domain name by mapping the dedicated public IP address of the server to the domain name. This requires each domain name (contoso.com, fabricam.com, etc.) associated with your service to have a dedicated IP address. This is the traditional method of associating SSL certificates with a web server.

The SNI SSL setup is pretty simple and is documented in “How to enable SSL web site“.  The IP SSL setup is more tricky, and unfortunately an important step is missing from that article. Without performing that step the domain name configured for IP SSL will continue to work as SNI SSL. The Windows Azure team is looking into fixing the documentation and UI workflow to prevent this confusion going forward. Meanwhile this blog post explains how to make sure IP SSL is configured correctly.

How to check if IP SSL is working

After enabling IP SSL for your custom domain the simplest way to test it is working is to use IE with TLS 1.0 option DISABLED. Open IE then go to Internet Options –> Advanced and uncheck the “Use TLS 1.0” checkbox.

This basically emulates the behavior of web browsers that do not support SNI. Browse to your site using the custom domain name. Check which certificate is used. If IP SSL was not configured correctly then you will see the certificate error as below. If you do not see this error then IP SSL is working correctly.

How to fix IP SSL configuration

IP SSL requires a dedicated public IP address to be associated with a domain name. So when you enable an IP SSL binding for a custom domain name in Windows Azure Portal:

a dedicated IP address is assigned to your site. You can find this IP address on the site’s dashboard page in Windows Azure Portal (look for “VIRTUAL IP ADDRESS:“).

This dedicated IP address is different from the default Azure Web Sites IP address that was used when you’ve configured custom domain A record or CNAME. Any HTTP traffic that arrives on this new IP address will be using your custom SSL certificate. Any HTTP traffic that still arrives on the default Windows Azure IP address will continue to use SNI SSL (or default Azure Web Sites SSL certificate if HTTP client does not support SNI).

So to have IP SSL working properly you’ll need to update an A record for your domain name so that it points to the dedicated IP address assigned to your site instead of the default Azure Web Sites IP address. To do that logon to your DNS registrar’s web site, go to the page for managing DNS and configure the domain and IP address as follows:

 AliasTTLTypeValue
contoso.com7200A<Dedicated IP address assigned to your site>

Note that if your custom domain had a CNAME record pointing to yoursite.azurewebsites.net then you need to remove that CNAME record.

The post How to setup IP SSL on Windows Azure Web Sites appeared first on RuslanY Blog.

]]>
https://ruslany.net/2013/07/how-to-setup-ip-ssl-on-windows-azure-web-sites/feed/ 6