Open mrdomino opened 8 years ago
agreed, it would be even better if letencrypt supported wildcards, but this looks unlikely at the moment.
I haven't looked at this in much detail, but it looks like Certbot might make this easier somehow.
@mischief points out that https://traefik.io/ exists.
Hello, in order to make letsencrypt work with sandstorm I've a question about this: there's a way for sandstorm to know which subdomain will be generated for every grains and run an action before of this ?
if so, we can try to run a cmd like:
certbot -d $FQDN -i $EMAIL certonly
before to generate the grains and create a specific letsencrypt cert for this every subdomain in sandstorm.
is it possible?
@opensamba Please see the docs on wildcard hosts, especially the FAQ: https://docs.sandstorm.io/en/latest/administering/wildcard/
Unfortunately it's really not feasible to use Let's Encrypt with a Sandstorm server. We've talked directly to people who work on Let's Encrypt about this but there's currently no timeline for anything changing (they would have to add support for wildcard certs).
However, @mrdomino's question was different: He wants to use Let's Encrypt for sites published using certain Sandstorm apps (e.g. the Wordpress). That is entirely feasible.
Seems like wildcards are supported in Let's Encrypt.
Lets Encrypt wildcard support would be awesome.
Let's Encrypt wildcard renew requires updating domain TXT records with Certbot (Nginx, Apache) or Caddy's similar autoupdate features, to get wildcard verified. I'm not a Sandstorm developer so I don't know how this would work on Sandstorm, and is it related to Sandstorm at all. If some webserver in front of Sandstorm provides Let's Encrypt wildcard, and proxies to Sandstorm, is it any different from having normal wildcard cert. Someone could try.
Letsencrypt wilcard certs work just as any other wildcards do. They are fine to use with a reverse proxy infront of Sandstorm (I have tested with Apache as a proxy). There are a number of ways to deploy using the wilcard certs but the following is required:
docker-compose run certbot certonly --manual -d *.sandstorm.server.net -d sandstorm.server.net --server https://acme-v02.api.letsencrypt.org/directory
The things we still need are:
We may want to verify somehow that the hostname's public-facing DNS is really pointing to the Sandstorm server before making a Let's Encrypt request, so that this can't be exploited to spam Let's Encrypt with bogus certificate requests. We could maybe deploy a pretty simple Cloudflare Worker to do such verification...
With only this check, an attacker could create DNS entries pointing at your server, then visit them, to cause your server to flood Let's Encrypt. How about verifying that the name is one the server thinks belongs to it (i.e. there is static publishing data present for that name)? That will limit the set of names requested, which will keep things under control if paired with an outgoing request rate limit (which you need anyway to avoid tripping Let's Encrypt's maximum verification attempt rate in case of networking/DNS problems).
Seeing as I've been exploring re-working static publishing to use the powerbox anyway, that may have implications for when we can check for the cert. It might be nice to find a way to do the check and acquire the cert when the static host is set up, rather than on first access.
I want to static publish a bunch of stuff over https. Right now, my janky solution to this is to have nginx proxy to sandstorm and stick a letsencrypt certificate on it. This forces nginx and sniproxy into my configuration (to also serve sandstorm's https from the same host.)
It'd be cool if Sandstorm could just get a cert from letsencrypt and do the whole approval dance on its own.