terricain / certbot-dns-azure

AzureDNS Certbot plugin
Other
33 stars 16 forks source link

certbot renewal config #33

Closed Scifire closed 1 year ago

Scifire commented 1 year ago

Hi,

I´m currently facing the issue that certbot renew will fail with error: Failed to renew certificate bag.software with error: Missing command line flag or config entry for this setting: Input the path to your Azure config INI file

My /etc/letsencrypt/renewal/domain.conf looks like:

# renew_before_expiry = 30 days
version = 1.11.0
archive_dir = /etc/letsencrypt/archive/domain
cert = /etc/letsencrypt/live/domain/cert.pem
privkey = /etc/letsencrypt/live/domain/privkey.pem
chain = /etc/letsencrypt/live/domain/chain.pem
fullchain = /etc/letsencrypt/live/domain/fullchain.pem

[renewalparams]
authenticator = dns-azure
dns-azure-config = /etc/default/certbot/azure.ini
server = https://acme-v02.api.letsencrypt.org/directory
manual_public_ip_logging_ok = None

When running certbot renew --dns-azure-config /etc/default/certbot/azure.ini the renewal is working fine.

Is the config wrong or does this setting not work?

Thanks

terricain commented 1 year ago

https://github.com/certbot/certbot/blob/7a68b2914007133ca517b0e5d945a45db7f5212b/certbot/certbot/_internal/renewal.py#L40

This line in certbot makes me think only specific values are passed into the client config object.

How did dns-azure-config get into that file, did you add it manually or did certbot itself add it there?

Scifire commented 1 year ago

How did dns-azure-config get into that file, did you add it manually or did certbot itself add it there?

I´ve added it manually. We´re switching from NS1 to Azure so my idea was just to change the config for the domain. For NS1 there was an entry --dns-nsone-credentials which was pointing to the respective file that´s why I thought I could replace it. https://certbot-dns-nsone.readthedocs.io/en/stable/

terricain commented 1 year ago

Try with dns_azure_config using _ instead of -

Scifire commented 1 year ago

Works like a charm, thank you very much :)