Enabling HTTPS for a Azure blob static website - azure

I have an Azure storage account with a static website on the blob service enabled. I also have configured custom domain for my blob service. To be able to serve my website over HTTPS on the custom domain I need to somehow apply my certificate. How can I do it?
p.s.
I don't want no CDN

To be able to serve my website over HTTPS on the custom domain I need
to somehow apply my certificate. How can I do it?
Unfortunately it is not possible as of writing this answer because Azure Storage still doesn't have the ability to allow you to bring your own certificates. You will need to use CDN if you want HTTPS enabled custom domain mapped to your static website hosted in Azure Blob Storage.
From this link:
It's easier to enable HTTP access for your custom domain, because
Azure Storage natively supports it. To enable HTTPS, you'll have to
use Azure CDN because Azure Storage does not yet natively support
HTTPS with custom domains. see Map a custom domain to an Azure Blob
Storage endpoint for step-by-step guidance.

You can use an application gateway instead of CDN, here is a recipe:
https://github.com/easkerov/azure-sa-custom-domain-ssl-sample

Related

Add SSL to Azure Portal Storage

My website and my domain are hosted on a different service provider from azure. I created a CNAME record and I have added my custom domain to the azure. So right now I can go to http://images.mysite.com/images/myimage.png. The image that loads comes from the blob storage from azure. However, if I try to do this via https, I get NET::ERR_CERT_COMMON_NAME_INVALID error.
I've been through many guides, and seen just about every setting in azure portal and I can't figure out how to import my ssl into azure so that this will work. I have a feeling it has to do something with Azure CDN option, which I don't have configured and don't want to pay extra just for this one feature. Can I do this without it somehow?
I've been through many guides, and seen just about every setting in
azure portal and I can't figure out how to import my ssl into azure so
that this will work.
Simple answer to your question is that it is not possible as of today. Azure Storage still doesn't support HTTPS with custom domain. You'll need to use CDN if you wish to use your SSL certificates to facilitate secure connection.
From https://learn.microsoft.com/en-us/azure/storage/blobs/storage-custom-domain-name:
Azure Storage does not yet natively support HTTPS with custom domains.
You can currently Use Azure CDN to access blobs by using custom
domains over HTTPS.

How to use Origin Types in Azure CDN endpoings?

I just need to know when to use the Origin Types in Azure CDN endpoints.
I have already created a Web App service and when I create an endpoint, i am presented with a list of Origin Types: Storage,Web App,Cloud service,Custom origin. If I choose Web App, I see my Web App. If I choose Storage, I see the storage account i created. My purpose is to have a fast web app by caching all "cachable" assets.
When creating an Azure CDN endpoint, what or when should I use the following Origin Types :Storage,Web App,Cloud service,Custom origin?
I have not seen any documentation that provides any guidance on this.
For Azure service like Storage, Web App, Cloud service, you can use that respective origin type, for other public custom name or IP address, you can select Custom origin. See the process of creating a CDN endpoint.
Especially, if you host a static website on the Azure storage account. To make your static website files available over your custom domain and HTTPS, see Using the Azure CDN to access blobs with custom domains over HTTPS. As a part of this process, you need to point your CDN to the primary static website endpoint as opposed to the primary blob service endpoint. If so, you can select primary static website endpoint in the custom origin, see details here.

Hosting ClickOnce in Azure Blob storage and using custom domain

I am using Clickonce for deploying my WPF application and this is being done in Azure Blob storage. Since this is a custom URL it won't be white listed in many of the client machines and hence I mapped a custom domain for the same. I was able to access the HTML page and download the setup file but download of .application file is not being done as connection could not establish a trust relationship for the SSL/TLS secure channel.
Is there a way to overcome this? Can I map SSL certificates to my custom domain.
Taken from the documentation page:
Azure Storage does not yet natively support HTTPS with custom domains.
You can currently Use Azure CDN to access blobs by using custom
domains over HTTPS.

Is Azure or Google Cloud natively support to serve content using custom domain over https

I'm trying to serve my cloud storage content using custom domain over https. Currently, I'm using Amazon S3 with CloudFront to deliver the content using custom domain over https. But S3 with CloudFront is costly, So I'm now searching for an alternative.
Is Azure or Google Cloud natively support to serve content using custom domain over https. Without using CDN?
At the moment, google cloud storage only support HTTP. As per documentation To serve your content through a custom domain over SSL, set up a load balancer, use a third-party Content Delivery Network with Cloud Storage, or serve your static website content from Firebase Hosting instead of Cloud Storage.
I was able to find this blog which might help you on the setup.
With that being said, if you are looking for functionality like this you may also try with App Engine, as by default, HTTPS connections on your custom domain will automatically be enabled using managed SSL certificates. You can visit this link for more details. Also, there is a there is a feature request submitted to support auto managed SSL with GCLB.
Is Azure or Google Cloud natively support to serve content using
custom domain over https. Without using CDN?
Azure allows you to map a custom domain to your blob storage endpoint. Using this, you can serve the content stored in blob storage using a custom domain. You can read more about it here: https://learn.microsoft.com/en-us/azure/storage/blobs/storage-custom-domain-name
However please note that this will not work over https. For https, you will need to use Azure CDN.
The OP's needs will be met by using Firebase as mentioned in passing by #KarthickN.
Firebase is a Google product which deploys your own domain name site automatically through SSL (https). You can first push your site onto one of the remote git repositories and use CI/CD for Firebase to deploy. You don't need to worry about CDN as firebase will use Google's global edge servers. Small usage is free then move onto paid plans as your needs grow plans
I answered a similar question here.

Custom Domain SSL for azure blob

Anyone can find a workaround for having custom domain pointing to azure blob? Can application gateway pointed to there? how?
Facts :
- Azure blob does not support custom domain for SSL
- Using custom domain with SSL will prompt security concern due to the assets is from different SSL cert.
No. Currently there is no support for custom domains with SSL on Azure Storage services.
Give your vote here to help get this prioritised!
I have been using Application Gateway with my custom SSL to access BLOB.
Create a Application Gateway instance.
Add your custom SSL inside the SSL Settings in the App Gateway.
Configure backend pool and listener in App gateway.
Create a container and upload an image into it, copy the image URL. Replace the image domain BLOB URL with the Application Gateway IP. Request the image.
For retrieving sensitive files: Once you get the image, remember to turn off the Allow Blob public access toggle in your Storage Account settings.

Resources