Azure Traffic Manager and SSL Certificates - azure

I have 6 different micro services with an Azure Traffic Manager setup for each of them. The services are running in 3 different regions to improve their performance but I need to come up with the certificates for the Azure Traffic Manager.
I have seen that there are two options available in the Azure Portal: The Standard and the Wild Card. While the latter is much more expensive, I was wondering if the same SSL Certificate can be used in all my 6 services so in the end, I will save money.
All my sites are like this:
http://foo1.trafficmanager.net
http://foo2.trafficmanager.net
http://foo3.trafficmanager.net
http://foo4.trafficmanager.net
http://foo5.trafficmanager.net
http://foo6.trafficmanager.net
As you can see the, the domain is the same (I do not have any custom domain, just the by default trafficmanager.net), so I am wondering whether one certificate will be enough. I have not seen any information about the wildcard certificate and it is pretty expensive to just give it a try...
Also, is there any security concern if I use the same certificate for all the sites? Is there a best practice recommendation? 1 certificate per site vs. 1 certificate for multiple sites.
Lastly, if I decide to use Custom Domains in the future, will I be able to reuse the issued certificate? (the domain will not be trafficmanager.net anymore)

Actually, a valid SSL certificate must match the access FQDN domain name. One Standard certificate only could be used for one FQDN domain name, such as "foo1.trafficmanager.net" while one WildCard certificate could be used for all like "*.trafficmanager.net" FQDN domain name, so usually we use the same WildCard certificate for all different services.
If you use Custom Domains in the future, you need to deploy new certificate to match the new Custom domain.
You can get more details about SSL Certificate Names

Related

Can I get SSL certificate for website running in Azure VM at westeurope.cloudapp.azure.com subdomain

I have created Windows Server VM in Azure and deployed my site to IIS, which is now accessible at https://mysite.westeurope.cloudapp.azure.com/
however I get certificate error when I try to visit it from outside the vm.
how do I configure the VM to have proper https without certificate errors (just like app service - mysite.azurewebsites.net)?
As the comments from micker #micker, you can't get an SSL certificate for this subdomain westeurope.cloudapp.azure.com which is owned by Microsoft.
Since you host your websites on Azure VM, you could purchase a domain then get an SSL certificate for your own domain, then bind the SSL certificate to your custom domain in IIS on the Azure VM. You can either purchase that certificate through Azure or an external provider or get a free SSL cert from Let's Encrypt.
However, if you just want to have a test in your test environment, you can use a self-signed certification with this DNS name like vma.centralus.cloudapp.azure.com. You can follow steps in How To Create A SHA-256 Self-Signed Certificate on the Azure VM then export this cert .cer format file on the Azure VM and import the .cer cert under the mmc---certificate---local machine---Trusted root certification Authorities on the machine where you want to access the websites. Please note this It's not recommended to use self-signed cert in your production environment.
I had same issue, and I found resolution without custom domain using following additional azure settings.
create Azure WAF, add custom rules to deny if not in IP list - this is if you need ip whitelisting, useful if your main domain uses akamai or other edge routing to point to external hosting of subdomains, you can use whitelist to restrict access to the akamai or other servers, though this takes some big lists you must paste of ranges one row at a time. Set any other web app firewall rules you want enforced for allow/deny.
Create Azure Front Door named like you want as an endpoint url e.g. myappfrontdoor will make myappfrontdoor.azurefd.net. in backend pool specify the your public-ip shared dns name (see step 3) like myapptest..cloudapp.azure.com.
This is the important step : in Settings at top of front door designer, disable cert validation. in routing rules config, no condition, forward to backend pool setup in prior step. This ignores the fact that you cannot cert your cloudapp.azure.com endpoint, and wraps it with a *.azurefd.net certificate.
In your azure firewall, Edit NAT rules, set rule name myapp-web-fd-... , tcp, ip address, 147.243.0.0/16 (this is Azure's front door backend ip range). destination should be the firewall's own public ip. destination port 443, translated address should be the target vm's azure internal ip, target port - service port.
Now you will have a site like myappfrontdoor.azurefd.net.
Note that Azure Front Door and WAF have their own pricing costs, so maybe it is cheaper for you to buy a domain. Hopefully you are also using Azure Firewall, though expensive. If not, one could point to public ip directly on NSG or on vm itself but I wouldn't skip having a firewall for a public server. There is a standing Azure enhancement request to get Azure Front Door to recognize certificates, but it was triaged 2 years ago and still not added, so not sure if it will be worked. If it ever does get worked, devs could make own cert auth and self-signed cert with expirations to more securely hook front door to azure internal vm. For now, have to rely on the front door backend setting, waf, and azure firewall to have these things routed.
There are some options in Akamai and other edge routing systems to import cert and self-created authority sort of, but I've not tried that yet, so cannot confirm this would cleanly wrap your azure site without cert errors. You can make a self-signed authority using openssl commands as noted in other posts out and about on the web.
The simplest and cheapest option is to purchase a domain and use a cname dns record to map your new domain to your Azure subdomain address - an "A" record is not required. Also per answer above, a WAF is expensive and possibly unnecessary for a test set up (but a requirement for a production website). You can use Certbot and NGINX to create a free Lets Encrypt certificate for your domain and assign it to your website.
Adding a Public IP Address, Load Balancer, and Network Security Group to your Azure Resource Group may also be required to provide access to your website. This is largely how my test configuration is set up except I'm using a Linux VM, have a single wildcard certificate, and use NGINX to reverse proxy 3 websites.

Is it possible to associate a single wildcard SSL certificate with multiple separate App Service instances?

We have a number of discrete App Service Plan instances (separated to simplify tenant billing), each hosting a number of Web App instances. Each App is on a subdomain of the same parent:
AppService-1:
subone.mydomain.com
subtwo.mydomain.com
AppService-2:
subthree.mydomain.com
&c...
Can we purchase a single wildcard SSL certificate (from Azure, or elsewhere) for *.mydomain.com and apply it to all three subdomains in the example above, or do we need a separate certificate for each App Service Plan?
YES. You have a valid scenario where you can use a single wild card domain for multiple sub-domains. I am attaching a screenshot of my setup below. If you see I have mapped the same certificate for multiple domains.
This will also work with another App Service Plan. These are the things to note though:
If the second app service plan is in the same resource group, then you need not Import/Upload the certificate.
If the second app service plan is in a different resource group, then you will have to again Import/Upload the certificate.
Certificates are specific to Resource Group and are visible to all the web apps in that resource group.
Also I have my certificate issued for both root domain and Wildcard. This way I can cover more scenarios.
NOTE: Even though there are multiple IP-Based SSL bindings in the screenshot below, there is only IP assigned to the webapp. As there is
only certificate which meets all the requirements, the bindings are simple
re-using the existing resource (IP).
Yes, it is possible to associate a single wildcard SSL certificate with multiple separate App Service.
You do not need to purchase an individual SSL Certificates.
Get a Wildcard SSL Certificate for *.domain.com.
It will allow you to secure anything.domain.com, means security for the unlimited number of sub-domains.
But make sure the Certificate Authority from where you have purchased the Wildcard SSL should offering unlimited server license.
Certificate Authorities like Comodo, RapidSSL, Thawte, and GeoTrust are offering unlimited server license along with their Wildcard SSL.
Yes, you can do that. What you would do is create a certificate resource and assign that resource to the Web Apps. You might need a separate certificate resource for each app service plan.
Yes, you can use same wildcard SSL certificate for your web app services, but make sure that all AppServices are hosted under the same domain. Major certificates authorities are offering unlimited server licenses with their wildcard certificate, you have to configure your certificate on your multiple servers.
AppService-1:
sub1.mydomain.com
sub2.mydomain.com
AppService-2:
sub3.mydomain.com
sub4.mydomain.com
AppService-3:
sub5.mydomain.com
sub9999.mydomain.com
AlphaSSL, Comodo, RapidSSL offers domain validated low-cost wildcard certificate where Thawte, GlobalSign, and GeoTrust offers organization validated certificate at the higher prices.

Can a Domain Name purchased through another vendor be used with an SSL Certificate purchased from Azure?

We purchased a domain name from Network Solutions, and set up our website as two App Services in Azure (one within US East and one within US West). Our domain name purchased from Network Solutions is assigned as a hostname in Azure, and a traffic manager balances the traffic between the two App Services. I have two questions...
Azure offers SSL Certficates. If I purchase an SSL Certificate from Azure, is there anything I need to do in Network Solutions to update the site?
Do I need to purchase two SSL Certificates since I am using two App Services?
I have looked at these articles, but unfortunately, they did not answer my questions:
https://learn.microsoft.com/en-us/azure/app-service-web/web-sites-configure-ssl-certificate
https://learn.microsoft.com/en-us/azure/app-service-web/web-sites-purchase-ssl-web-site
Thank you!
If you already have a custom domain associated with your Web Apps (both deployments Region #1 and #2), then no. You're all set.
E.g. www.example.com pointing to {TrafficManagerName}.trafficmanager.net
No. Just one TLS certificate valid for www.example.com or *.example.com
See my answer here for more:
https://stackoverflow.com/a/40399500/4148708

Azure Websites SSL - Price per certificate or per binding?

I have a wildcard SSL certificate for *.mydomain.com
I have 20 subdomains that I would like to secure using Azure Websites.
Will I be charged £5.4981/month or £109/month (20 x £5.4981/month)
On the pricing page it says ' £5.4981/month (per certificate supported)'
http://azure.microsoft.com/en-gb/pricing/details/websites/
But when you add a new binding in Azure for each subdomain it says this might affect your pricing.
Thanks in advance.
You are using a wildcard certificate. You are only going to pay for the certificate and not for each individual sub domain that you want to use. The number of websites that you want to host is not going to affect the price that you will need to pay for the certificate.
Do note that creating web sites in azure does come with additional costs. They can be found here.

Multiple SSL Certificates for Different domain on IIS (Amazon EC2)

I have multiple sites that need to have SSL certs installed on them but Amazon EC2 only allows one public IP. I can't use SNI since I need to support IE 7 and up. Is there a way I can have one instance with multiple domains each having SSLs?
Here is what I followed. I made a Private IP and another Elastic IP address that points to that private IP on the same Instance and followed these instructions
http://docs.aws.amazon.com/AWSEC2/latest/WindowsGuide/config-windows-multiple-ip.html
One way around this is to use a UCC Certificate which will validate multiple domains.
This is very simple to set up as you serve up the same certificate for every domain but there a couple of wrinkles that may or may not matter in your case:
The certificate "Issued To" information will only list the primary domain name. A user would have to view the detailed certificate information to see this - the browser will correctly show the current domain as "verified".
All of the domains are listed in the certificate, so if you do not want sites to appear 'connected' to each other, you should not use this type of certificate. Once again, the user would have to display the certificate details to notice this.

Resources