<?xml version="1.0" encoding="utf-8"?>
<?xml-stylesheet type="text/xsl" href="../../assets/xml/rss.xsl" media="all"?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>Sig-I/O (Berichten over acme-challenge)</title><link>https://sig-io.nl/</link><description></description><atom:link href="https://sig-io.nl/nl/categories/acme-challenge.xml" rel="self" type="application/rss+xml"></atom:link><language>nl</language><copyright>Contents © 2024 &lt;a href="mailto:mark@sig-io.nl"&gt;Mark Janssen&lt;/a&gt; </copyright><lastBuildDate>Sun, 21 Jul 2024 16:00:28 GMT</lastBuildDate><generator>Nikola (getnikola.com)</generator><docs>http://blogs.law.harvard.edu/tech/rss</docs><item><title>Automating (Wildcard) certificate renewal with Acme.sh, DeSec.io and some DNS magic</title><link>https://sig-io.nl/nl/posts/acmesh-desec-dns-acme-challenge-cname/</link><dc:creator>Mark Janssen</dc:creator><description>&lt;p&gt;Automatically requesting TLS/SSL certificates using the ACME protocol is quite nice.
Usually to just get a regular TLS certificate, you just have to run an ACME capable tool
or webserver, which will place a textfile in /.well-known/acme-challenge on your
webserver, which is then used to validate control over the domain.&lt;/p&gt;
&lt;p&gt;Alternatively you can use DNS based validation. This is even required when requesting
wildcard certificates, for example, when requesting a certificate for '*.sig-io.nl'.&lt;/p&gt;
&lt;p&gt;When validating using DNS, you need to have your ACME client create a DNS record
'_acme-challenge' in your DNS domain. This can be done using various ACME clients, and I
myself have written modules/plugins for Dehydrated for various DNS providers over the
years.&lt;/p&gt;
&lt;p&gt;Recently I've switched from Dehydrated as my preferred ACME client to Acme.sh. This client
has a massive amount of DNS providers supported in the main codebase. So it will usually
have an interface to whatever DNS system you might use.&lt;/p&gt;
&lt;p&gt;Some of my customers however use domains hosted by (for example) TransIP.nl, which does
have an API to update DNS-records, but usually takes very long (5-10 minutes) to update
records, and also has no granulated access-control to their API. If you have API access,
you can do everything with all domains under that account. This means you can't really
leave credentials to this account in config-files somewhere.&lt;/p&gt;
&lt;p&gt;However, I've now found a solution to these problems that I'm quite satisfied with. I'm
using deSEC.io, a new non-profit, community-oriented DNS provider, with a nice API to do
DNS validations. With deSEC I can create an API key that is limited in time and
source-network. And since deSEC is free, I can create a seperate account just for
acme-validation on an otherwise unused domain.&lt;/p&gt;
&lt;p&gt;So to create a certificate for a customer-domain, I just have them create a CNAME entry in
whatever DNS system they use, which points to my acme-validation only domain-name hosted
at deSEC.io.&lt;/p&gt;
&lt;p&gt;For example, for sig-io.nl I could create a CNAME record '_acme-challenge.sig-io.nl'
pointing to '_acme-challenge.sig-io.nl.acme.example.com'. And then (given that example.com
is a domain I manage with deSEC.io) use Acme.sh to create certificates using this alias
domain using:&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;export DOMAIN="sig-io.nl"
acme.sh --issue -d "*.${DOMAIN}" --challenge-alias "${DOMAIN}.acme.example.com" --server letsencrypt --dns dns_desec&lt;/p&gt;
&lt;/blockquote&gt;</description><guid>https://sig-io.nl/nl/posts/acmesh-desec-dns-acme-challenge-cname/</guid><pubDate>Tue, 11 Jul 2023 16:15:26 GMT</pubDate></item></channel></rss>