Giter Club home page Giter Club logo

keyvault-acmebot's Introduction

Key Vault Acmebot

Build Status Release License

This function provide easy automation of Let's Encrypt for Azure Key Vault. This project started to solve some problems.

  • Store certificates securely with Key Vault
  • Centrally manage many certificates with one Key Vault
  • Simple deployment and configuration
  • Robustness of implementation
  • Easy monitoring (Application Insights, Webhook)

Use Key Vault for secure and centralized management of Let's Encrypt certificates.

Table Of Contents

Feature Support

  • All Azure App Service (Web Apps / Functions / Containers, any OS)
  • Azure CDN / Front Door
  • Azure Application Gateway v2
  • Subject Alternative Names (SANs) certificates (multi-domains support)
  • Wildcard certificates

Requirements

  • Azure Subscription
  • Azure DNS and Key Vault resource
  • Email address (for Let's Encrypt account)

Getting Started

1. Deploy to Azure Functions

2. Add application settings key

  • LetsEncrypt:SubscriptionId
    • Azure Subscription Id
  • LetsEncrypt:Contacts
    • Email address for Let's Encrypt account
  • LetsEncrypt:VaultBaseUrl
    • Azure Key Vault DNS name (Only when using an existing Key Vault)
  • LetsEncrypt:Webhook
    • Webhook destination URL (optional, Slack recommend)

3. Enable App Service Authentication (EasyAuth) with AAD

Open Authentication / Authorization from Azure Portal and turn on App Service Authentication. Then select Log in with Azure Active Directory as an action when not logging in.

Enable App Service Authentication with AAD

Set up Azure Active Directory provider by selecting Express.

Create New Azure AD App

4. Assign role to Azure DNS

Assign DNS Zone Contributor role to Azure DNS zone or Resource Group.

temp

5. Add a access policy (Only when using an existing Key Vault)

Add the created Azure Function to the Key Vault Certificate management access policy.

image

Usage

Adding new certificate

Go to https://YOUR-FUNCTIONS.azurewebsites.net/add-certificate. Since the Web UI is displayed, if you select the target DNS zone and input domain and execute it, a certificate will be issued.

Add certificate

If nothing is displayed in the dropdown, the IAM setting is incorrect.

App Service (Web Apps / Functions / Containers)

Select "Import Key Vault Certificate" button to import the certificate from Key Vault into App Service.

image

After that, the certificate will automatically be renewed from Key Vault.

Application Gateway v2

Azure CDN / Front Door

Thanks

License

This project is licensed under the Apache License 2.0

keyvault-acmebot's People

Contributors

shibayan 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.