• Stars
    star
    744
  • Rank 60,965 (Top 2 %)
  • Language
    C#
  • Created almost 9 years ago
  • Updated about 1 year ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

Azure Web App Site Extension for easy installation and configuration of Let's Encrypt issued SSL certifcates for custom domain names.

Let's Encrypt Site Extension

Build status

This Azure Web App Site Extension enables easy installation and configuration of Let's Encrypt issued SSL certificates for you custom domain names.

The site extension requires that you have configured a DNS entry for your custom domain to point to Azure Web App.

November 2019 - Microsoft finally acknowledge that maybe it is in due time that they add first level support for free SSL certificates, see this announcement about App Service Managed Certificates, be aware that it is in preview and currently doesn't support the apex/naked domain.

How to install

https://github.com/sjkp/letsencrypt-siteextension/wiki/How-to-install

Known Issues

  • This site-extension is NOT supported by Microsoft it is my own work based on https://github.com/fszlin/certes - this means don't expect 24x7 support, I use it for several of my own smaller sites, but if you are running sites that are important you should consider spending the few $ on a certificate and go with a Microsoft supported way of enabling SSL, so you have someone to blame :)
  • Note that Let's Encrypt works by providing automated certificates of a short (currently three month) duration. This extension is BETA SOFTWARE. You will need to keep this extension updated or risk losing SSL access when your certificate expires.
  • There are presently no email notifications for certificate renewal problems, but Lets Encrypt will email you weeks in advance of certificate expiration, when the extension is running properly the certificate should have been renewed before Let's Encrypt send the reminder email.
  • Due to rate limiting of Let's Encrypt servers, you can only request five certificates per domain name per week. Configuration errors or errors in this site extension may render you unable to retrieve a new certificate for seven days. If up-time is critical, have a plan for deploying a SSL certificate from another source in place.
  • No support for multi-region web apps, so if you use traffic manager or some other load balancer to route traffic between web apps in different regions please dont use this extension.
  • If you publish your project from Visual Studio with the "Delete Existing files" option, you will remove the web jobs the site extension uses to renew the certificate once they expire every 3 months (you can renew them manually or install the site extension again after publish).
  • The site-extension can now work with Azure App Service Local Cache, however you must do a little manual work, see https://github.com/sjkp/letsencrypt-siteextension/wiki/Azure-Function,-Multi-Region,-Local-Cache-support
  • If you use the "Run From Zip" deployment method, please take a look at this: #239 (comment)
  • Wildcard domains are not supported, (and will not be supposed in the site-extension), if you are interested in wildcard support check https://github.com/sjkp/letsencrypt-azure
  • If you have picked .net core as the runtime on a brand new web site, the extension will not work properly #349

How to troubleshoot

https://github.com/sjkp/letsencrypt-siteextension/wiki/Troubleshoot

This is Beta Software

Please take note that this Site-Extension is beta-software, so use at your own risk.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYLEFT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

Semi-Automated Installation

With the semi-automated installation you manually add the site extension to your web app. Open the extension and manually click through the 3 step dialog.

Once this process is complete your custom domain for the site is setup with a Let's Encrypt issued SSL certificate.

Fully-Automated Installation

To use the Fully Automated Installation the following Web App settings must be added.

Key Value
letsencrypt:Tenant The tenant name e.g. myazuretenant.onmicrosoft.com
letsencrypt:SubscriptionId The subscription id
letsencrypt:ClientId The value of the clientid of the service principal
letsencrypt:ClientSecret The secret for the service principal
letsencrypt:ResourceGroupName The name of the resource group this web app belongs to
letsencrypt:ServicePlanResourceGroupName The name of the resource group with the app service plan that hosts the web app, if the app service plan is in the same plan as the web app, then this property is optional.
letsencrypt:AcmeBaseUri The url to Let's Encrypt servers e.g. https://acme-v02.api.letsencrypt.org/directory or https://acme-staging-v02.api.letsencrypt.org/directory (defaults to this)
letsencrypt:Email The Email used for registering with Let's Encrypt
letsencrypt:Hostnames Comma separated list of custom hostnames (externally hosted setup with CNames), that should automatically be configured for the site.
letsencrypt:WebRootPath Use this setting, if you are not serving the website from site\wwwroot, then you can specify the other folder that serves your website here - should be in the format d:\home\site\wwwroot\public or where ever your files are located on the web server.
letsencrypt:DisableWebConfigUpdate true / false, defaults to false, set this to true if you don't want the site extension to write the default webconfig to wwwroot.well-known\acme-challenge
letsencrypt:SiteSlot Use this setting if you want to use the extension to setup SSL certificate for deployment slots, the value should be the name of the slot (and the extension should be installed in that slots kudu portal)
letsencrypt:UseIPBasedSSL Set to true if you want to use IP Based SSL (required by some older clients). Defaults to false, which results in SNI.
letsencrypt:RenewXNumberOfDaysBeforeExpiration Set to an integer defining the number of days before expiration the certificates should be renewed. Defaults to 22 days before expiration, as letencrypt sends reminder emails 20 days before
letsencrypt:AuthorizationChallengeBlobStorageAccount (Optional) Set this setting to the connection string of a storage account, if you want to persist the http challenge file to an external azure blob storage, and serve it yourself when let's encrypt request it from the http://yourdomain/.well-known/acme-challenge/{filename} path. (Can be used when local file system cache is enabled or the web app is deployed to multiple region behind traffic manager etc.)
letsencrypt:AuthorizationChallengeBlobStorageContainer Used in conjuction with letsencrypt:AuthorizationChallengeBlobStorageAccount if you want to specify the name of the container that is used, if not specified then letsencrypt-siteextension is used

As it can be seen from the list of App Settings a service principal is needed. The service principal must be assigned permissions to the web app, that is required as the extension use it for installing and updating the certificate. (If two resource groups are used, the app service principal must have access to both).

Besides the App Settings, the two Azure Web Job required connection strings AzureWebJobsStorage and AzureWebJobsDashboard must also exists, as the extension relies on an internal Web Job to renew the certificates once they expire.

To see an example of an ARM template installation look at azuredeploy.json

More Repositories

1

letsencrypt-azure

The easiest way to use lets encrypt certificates on Azure
C#
109
star
2

azure-localhost-tunnel

JavaScript
23
star
3

heatmap

The PowerBI Heatmap Visual enables users to draw a heatmap overlay from a X, Y coordinate set on to an existing image. The user specify the image, and provide a data set of X, Y coordinates and optionally an intensity for each data point. The radius and the bluriness of the heatmap bubbles can be customized as well as the max value for the intensity.
TypeScript
20
star
4

UrlShortener

A Url Shortener service build with Azure Functions in less than 100 lines of code
C#
17
star
5

Azure.ARM.ServiceBus

Example of deploying service bus with ARM templates
PowerShell
8
star
6

sjkp.livechatmsteams

Live customer support chat control for your web sites, that uses Microsoft Teams as the backend admin interface
6
star
7

Azure.ARM.LinuxWebApp.Docker

Azure Resource Manager template for deploying an Linux Azure Web App with a Docker container (nginx)
PowerShell
4
star
8

azure-arm-hol

Hands-on labs for Azure Resource Manager.
Batchfile
4
star
9

requestbininazure

4
star
10

Azure.ARM.LinuxWebApp.Docker.PhantomJS

ARM template for running Docker container hosting PhantomJS in Azure Web App
PowerShell
3
star
11

Delegate.SPA.Template

A Visual Studio Template for creating single page applications
C#
3
star
12

azure-arm-aci-minecraft-server

3
star
13

Azure.ARM.EventHub

Example template for provisioning an Azure EventHub with Azure Resource Manager template
PowerShell
3
star
14

AzureFileSync

Synchronize a onpremise directory with the Azure File Service, that can be mounted in VMs in the cloud.
F#
3
star
15

azure-container-instances-sample

C#
2
star
16

Microsoft-teams-docs

Developer platform documentation for Microsoft Teams
PowerShell
2
star
17

yammer.downloader

Simple console app that can be used to download all data from Yammer (as a user)
C#
2
star
18

azure-gallery-templates

Azure Gallery Templates downloaded with Get-AzureResourceGroupGalleryTemplate on the 30-08-2015
2
star
19

SJKP.KeyVault

Example project on how to gain a secret from Azure Key Vault from an Azure Web Job using certificate authentication
C#
2
star
20

node-red-docker-azurewebapp

2
star
21

sjkp-sharepoint-app-ts

SharePoint SPA App written in TypeScript
TypeScript
2
star
22

proffdkscraper

A node.js express application that scrapes proff.dk for company information and exposes it as rest services.
JavaScript
2
star
23

azure-arm-static-webpage

Shell
2
star
24

powerbi-cors-app-ts

This is a sample application that shows how to use AngularJS, TypeScript and the ADAL.js to display tiles from PowerBI in a single page web application.
TypeScript
2
star
25

docker-workshop

C#
2
star
26

SJKP.AzureSearch.PdfIndexer

Example showing how Azure WebJob can be used with the new Azure.Search API to index PDF documents
C#
2
star
27

azure-arm-multiregion-website-template

Azure Resource Manager template, that can provision a storage account, multiple azure websites in different regions with an appsetting pointing to the storage account and with application insights.
PowerShell
1
star
28

ODataConverter

C#
1
star
29

outlook-addin-installer

JavaScript
1
star
30

onelogin-oauth-angular2-webapi

TypeScript
1
star
31

Oyster.LoRaWAN

C#
1
star
32

Azure.ARM.CustomHostnameFunction

Custom hostname for Azure Function using Azure Web App as a reverse proxy
PowerShell
1
star
33

LightSwitchCRMOnlineDemo

Demo project showing how to connect a LightSwitch application to CRM online data.
JavaScript
1
star
34

deno-azd-template

Template for creating a Deno application in Azure Container Apps using the Azure Developer CLI
Bicep
1
star
35

marinemap

PowerBI Custom visual for showing marine traffic
TypeScript
1
star
36

flightradar24

C#
1
star
37

Azure.ARM.Ubuntu-Simple-Docker

Simple VM for running docker on ubuntu, with scheduled shutdown
1
star
38

Azure.ARM.Dashboards

Azure Resource Manager template that deploys dashboards to the ibiza portal
1
star
39

devopsai

C#
1
star
40

Bosch.ParkingLotSensor

C#
1
star
41

SharePointPagesInDocumentLibrary

Chrome extension that counts the number of pages in all documents in a document library.
JavaScript
1
star
42

webapitutorial

This is a simple sample project, that show what you need to add Cors support to WebAPI.
C#
1
star
43

SJKP.OutlookAppointmentPlanner

Outlook App written in TypeScript/C# that allow appointment scheduling like known from doodle
JavaScript
1
star