Files
nginx-proxy-manager/backend
Shawn Hank 918728fcac Remove DNS provider credentials from disk after certbot runs
The credentials file written for a DNS-01 challenge was only cleaned up when
certbot failed - the unlink sat in a catch block. On success the file stayed in
/etc/letsencrypt/credentials for the entire life of the certificate, holding a
live DNS provider API token in plaintext.

The file cannot simply be deleted at issuance, because certbot records its path
in the renewal config and reads it back on every `certbot renew`. So the renew
path now writes the file itself immediately before invoking certbot, and both
paths remove it in a finally block.

Net effect: the credentials exist on disk for the duration of a certbot run
rather than permanently. The value still lives in the certificates table, which
is unavoidable - it has to come from somewhere to be written at all.

renewLetsEncryptSslWithDnsChallenge reads the row directly from the model
because renew() sources its certificate from internalCertificate.get(), which
strips meta.dns_provider_credentials via omissions().
2026-08-28 17:40:21 -06:00
..
2026-08-22 23:10:26 +10:00
2026-08-22 23:10:26 +10:00
2026-05-25 07:37:24 +10:00
2026-03-03 08:44:42 +10:00
2026-08-22 23:10:26 +10:00
2026-08-22 23:10:26 +10:00
2025-10-02 08:10:18 +10:00
2026-08-22 23:10:26 +10:00
2026-08-22 23:10:26 +10:00
2026-08-22 23:10:26 +10:00
2025-10-02 08:10:18 +10:00
2026-08-22 23:10:26 +10:00