All Projects → pteich → caddy-tlsconsul

pteich / caddy-tlsconsul

Licence: Apache-2.0 license
🔒 Consul K/V storage for Caddy Web Server / Certmagic TLS data

Projects that are alternatives of or similar to caddy-tlsconsul

souin
An HTTP cache system, RFC compliant, compatible with @TykTechnologies, @traefik, @caddyserver, @go-chi, @bnkamalesh, @beego, @devfeel, @labstack, @gofiber, @go-goyave, @gin-gonic, @zalando, @zeromicro, @nginx and @apache
Stars: ✭ 269 (+202.25%)
Mutual labels:  caddy, caddyserver
vscode-caddyfile-support
Rich Caddyfile support for Visual Studio Code
Stars: ✭ 30 (-66.29%)
Mutual labels:  caddy, caddyserver
caddy-crowdsec-bouncer
A Caddy module that blocks malicious traffic based on decisions made by CrowdSec.
Stars: ✭ 40 (-55.06%)
Mutual labels:  caddy, caddyserver
Loginsrv
JWT login microservice with plugable backends such as OAuth2, Google, Github, htpasswd, osiam, ..
Stars: ✭ 1,835 (+1961.8%)
Mutual labels:  caddy, caddyserver
ssss
Stupid Simple Seedbox Script
Stars: ✭ 19 (-78.65%)
Mutual labels:  caddy, caddyserver
caddy-exec
Caddy v2 module for running one-off commands
Stars: ✭ 48 (-46.07%)
Mutual labels:  caddy, caddyserver
coraza-caddy
OWASP Coraza middleware for Caddy. It provides Web Application Firewall capabilities
Stars: ✭ 75 (-15.73%)
Mutual labels:  caddy, caddyserver
caddy-json-schema
JSON schema generator for Caddy v2
Stars: ✭ 63 (-29.21%)
Mutual labels:  caddy, caddyserver
caddy-esi
Middleware for Caddy Server integrating ESI (edge side includes) tags with parallel loading. Able to connect to HTTP/S/2, Memcache, Redis, shell scripts, gRPC and SQL backends 🐜🐜🐜
Stars: ✭ 28 (-68.54%)
Mutual labels:  caddy, caddyserver
Diplomat
A HTTP Ruby API for Consul
Stars: ✭ 358 (+302.25%)
Mutual labels:  consul, cluster
Firecamp
Serverless Platform for the stateful services
Stars: ✭ 194 (+117.98%)
Mutual labels:  consul
Remco
remco is a lightweight configuration management tool
Stars: ✭ 200 (+124.72%)
Mutual labels:  consul
Awesome Consul
A list of awesome consul projects, libraries
Stars: ✭ 245 (+175.28%)
Mutual labels:  consul
Magento-2-aws-cluster-terraform
Magento 2 AWS autoscaling cluster with Terraform and Packer or ImageBuilder. Adobe Commerce Cloud alternative. The best ecommerce infrastructure. Drive more sales online. Transparent billing. Developer-friendly. No hidden bottlenecks.
Stars: ✭ 107 (+20.22%)
Mutual labels:  cluster
Panteras
PanteraS - PaaS - Platform as a Service in a box
Stars: ✭ 189 (+112.36%)
Mutual labels:  consul
Winton.extensions.configuration.consul
Enables Consul to be used as a configuration source in dotnet core applications
Stars: ✭ 239 (+168.54%)
Mutual labels:  consul
Ansible Vault
🔑 Ansible role for Hashicorp Vault
Stars: ✭ 189 (+112.36%)
Mutual labels:  consul
Consul
Development repository for the consul cookbook
Stars: ✭ 188 (+111.24%)
Mutual labels:  consul
Wehousing
Golang微服务+区块链实战---go+micro+fabric实现租房上链系统
Stars: ✭ 182 (+104.49%)
Mutual labels:  consul
docker-ssl-reverse-proxy
Easy-to-use auto-SSL reverse proxy as a Docker container based on Caddy and Let’s Encrypt
Stars: ✭ 22 (-75.28%)
Mutual labels:  caddy

Caddy 2 cluster / Certmagic TLS cluster support for Consul K/V

Consul K/V Storage for Caddy TLS data.

This cluster plugin enables Caddy 2 to store TLS data like keys and certificates in Consul's K/V store so you don't have to rely on a shared filesystem. This allows you to use Caddy 2 in distributed environment and use a centralized storage for auto-generated certificates that is shared between all Caddy instances.

With this plugin it is possible to use multiple Caddy instances with the same HTTPS domain for instance with DNS round-robin. All data that is saved in the KV store is encrypted using AES.

The version of this plugin in the master branch supports Caddy 2.0.0+ using CertMagic's Storage Interface

Older versions

  • For Caddy 0.10.x to 0.11.1 : use the old_storage_interface branch.
  • For Caddy 1.x : use the caddy1 branch.

Docker Image

You can use my Docker image pteich/caddy-tlsconsul (https://hub.docker.com/r/pteich/caddy-tlsconsul) to get an image of Caddy including this Consul TLS plugin build in. It is based on the official caddy:2 image and will be build automatically on changes in this repo.

Available tags are pteich/caddy-tlsconsul:latest or semver compatible version tags like 1.4 or 1.4.1 referencing the versions of this plugin.

Configuration

Caddy configuration

ATTENTION: The name of the storage module in configurations has been changed to consul to align with other storage modules.

You need to specify consul as the storage module in Caddy's configuration. This can be done in the config file of using the admin API.

JSON (reference)

{
  "admin": {
    "listen": "0.0.0.0:2019"
  },
  "storage": {
    "module": "consul",
    "address": "localhost:8500",
    "prefix": "caddytls",
    "token": "consul-access-token",
    "aes_key": "consultls-1234567890-caddytls-32"
  }
}

Caddyfile (reference)

{
    storage consul {
           address      "127.0.0.1:8500"
           token        "consul-access-token"
           timeout      10
           prefix       "caddytls"
           value_prefix "myprefix"
           aes_key      "consultls-1234567890-caddytls-32"
           tls_enabled  "false"
           tls_insecure "true"
    }
}

:443 {
}

Consul configuration

Because this plugin uses the official Consul API client you can use all ENV variables like CONSUL_HTTP_ADDR or CONSUL_HTTP_TOKEN to define your Consul address and token. For more information see https://github.com/hashicorp/consul/blob/master/api/api.go

Without any further configuration a running Consul on 127.0.0.1:8500 is assumed.

There are additional ENV variables for this plugin:

  • CADDY_CLUSTERING_CONSUL_AESKEY defines your personal AES key to use when encrypting data. It needs to be 32 characters long.
  • CADDY_CLUSTERING_CONSUL_PREFIX defines the prefix for the keys in KV store. Default is caddytls

Consul ACL Policy

To access Consul you need a token with a valid ACL policy. Assuming you configured caddytls as your K/V path prefix you can use the following settings:

key_prefix "caddytls" {
	policy = "write"
}
session_prefix "" {
	policy = "write"
}
node_prefix "" {
	policy = "read"
}
agent_prefix "" {
	policy = "read"
}
Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].