Giter Club home page Giter Club logo

letsencryptwebapp's Introduction

Azure Web App with Let's Encrypt Certificate

This repository contains example code for creating an Azure Web App with a Let's Encrypt SSL Certificate. It uses the ACMESharp Powershell module. This certificate is valid for 90 days.

Requirements:

Installation instructions

  1. Install the Azure Resource Manager modules from the PowerShell Gallery
Install-Module AzureRM -AllowClobber
  1. Install the ACMESharp Module:
Install-Module ACMESharp -AllowClobber

All the code needed to set up a Web App, generate the certificate, and bind the certificate is contained in the CreateLetsEncryptWebApp.ps1 script. The script does the following:

  1. Creates a Web App with an App Service plan, if it doesn't exist already.
  2. Pauses to allow the user to set a CNAME to point to the Web App. It is important to complete this step before continuing or the Web App will not allow the custom DNS name.
  3. Creates an ACME Vault and registration (if it doesn't exist).
  4. Generates a new ACME identifier for the DNS name.
  5. Starts an HTTP challenge.
  6. Uploads appropriate challenge reponse to the Web App.
  7. Submits the challenge.
  8. Waits for challenge validation.
  9. Generates certificate.
  10. Binds certificate to the Web App

If the Web App already exists, it will simple generate a new cert and bind it, effectively renewing the certificate.

To call the script:

.\CreateLetsEncryptWebApp.ps1 -ResourceGroupName "RESOURCE-GROUP-NAME" `
-WebAppName "WEB-APP-NAME" -Fqdn "DOMAIN NAME" -Location "LOCATION (e.g. eastus)" `
-ContactEmail "EMAIL ADDRESS FOR REGISTRATION"

letsencryptwebapp's People

Contributors

hansenms avatar davevoyles avatar

Watchers

David Guerin avatar James Cloos avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.