Commit Graph

3 Commits (717a8f90c69b627fae43bd7406cbb5c52de997d5)

Author SHA1 Message Date
Dustin 4218137e1e r/minio-backups-cert: Fix nsupdate kinit for f42
The version of Samba in Fedora 42 has got some really weird bugs.  In
this case, it seems `net ads kerberos kinit -P` no longer works.  It
prints a vague `NT_STATUS_INTERNAL_ERROR` message, with no other
indication of what went wrong.  Fortunately, it's still possible to get
a ticket-granting ticket for the machine account using the host keytab.
2025-07-12 16:08:21 -05:00
Dustin 9e610eaf11 r/minio-backups-cert: Enable/start cerbot timer
Forgot to ensure the _certbot-renew.timer_ unit was enabled and started,
so the MinIO certificate did not get renewed the first time.
2024-09-08 09:15:36 -05:00
Dustin 77ce7aa5e7 r/minio-backups-cert: Certbot for MinIO+nginx
The MinIO server for backups has special requirements for HTTPS.  I want
to use subdomains for bucket names, so the certificate must have a
wildcard name, which requires using the DNS-01 challenge.  Fortunately,
it is actually pretty easy to use `nsupdate` with GSS-TSIG
authentication to automate DNS record creation, and by default, all
domain-member machines can create any records.  Thus, using the `manual`
auth plugin for `certbot` and a script to run `nsupdate`, obtaining the
wildcard certificate is fairly straightforward.

The biggest issue I encountered while developing this feature was
caching of NXDOMAIN responses.  There doesn't seem to be a way to change
the TTL of the SOA record of the Active Directory DNS domain, which
defaults to 3600, meaning NXDOMAIN responses are always cached for an
hour.  When adding a record using `nsupdate -g`, the tool always
performs a SOA lookup of new name to find the target zone for it.  Since
the name does not exist yet, the domain controller responds with
NXDOMAIN, which gets cached by the main DNS server.  Thus, even after
adding the record, the ACME server will not be able to resolve the
name for up to an hour.  We can a void this by explicitly setting the
target zone.  That would not work in a multi-domain forest, but
fortunately, we do not have to worry about that.

This role borrows some logic from the *postgresql-cert* role.
Eventually, I probably want to combine some of the steps from both of
these roles, possibly replacing the old *certbot* role.
2024-09-01 08:59:28 -05:00