dshop
dshop copied to clipboard
[Deployment UX] Investigate ogn.app wildcard on CDN
Investigate if it's possible to create a wildcard cert for the default subdomains(e.g. ogn.app
for our mainnet backend). This would save time waiting for SSL provisioning for a user's first deployment.
Replaces #117
Google-managed SSL certificates don't support using wildcards
From the GCP load balancing documentation
Can we generate one manually and use that?
May be do doable via self-managed certs but not clear what needs to be done for that yet.
I'm just leaving notes in the issue here as I go.
Looks like we're going to need to build a custom integration with Let's Encrypt for this using their ACME protocol/REST API. There doesn't appear to be any friendly nodejs clients right now. The process will likely go something like this during node setup:
- Configure network settings including node
domain
- Configure DNS, or at least verify control of previously mentioned
domain
- Start ACME process, get DNS verification token (bit of guesswork here, need more research)
- Update DNS with verification token to prove control
- Issue cert request
- Store key+cert into encrypted network config on backend
- Create
sslCertificates
object in GCP for the wildcard cert fordomain
using predictable name and the generated cert - When creating new CDNs, use wildcard
sslCertificates
cert for*.[domain]
This will also need a Bull queue job to run every N minutes/hours to deal with renewal.
Going to try and press through #697 first and return back to this as this won't be a quick & simple solution.
There do appear to be standardized ACME clients, though, which should speed up implemetntion a bit, as long as they support v2 with DNS.
- https://github.com/publishlab/node-acme-client
- https://github.com/buschtoens/acme-v2
@mikeshultz is this something you're working on or finished? If not, shall we move it to the backlog?
Backlog, I guess