go-acme / lego

Let's Encrypt/ACME client and library written in Go
https://go-acme.github.io/lego/
MIT License
8.05k stars 1.02k forks source link

ionos: follow CNAME #2281

Closed ldez closed 2 months ago

ldez commented 2 months ago

Ping @markusm7, can you run the command (with your domain, email, credentials, etc.)?

make build
rm -rf .lego

IONOS_API_KEY=xxxxxxxx \
./dist/lego -m your@email.com --dns ionos -d *.example.com -d example.com -s https://acme-staging-v02.api.letsencrypt.org/directory run

Note the wildcard domain is important.

Fixes https://github.com/go-acme/lego/discussions/2280

markusm7 commented 2 months ago

Tested it, I think there is still a problem as the FQDN returned from my CNAME record ends with a . as a termination sign for the domain name (e.g. customer.challenge.example.com.) and the check in the findZone seems to neglect that possibility as the zones returned from ionos don't have that https://github.com/ldez/lego/blob/dee89eea7dc2cd4b0b452b2c736819b07fbe47ad/providers/dns/ionos/ionos.go#L188-L194

I can't remove the dot in the CNAME record and if I remember correctly it's a common practive to terminate domains with a dot

ldez commented 2 months ago

I updated to PR, can you try again?

markusm7 commented 2 months ago

It works 👍

ldez commented 2 months ago

I hope you enjoyed my work, please consider donating or asking your company to do so. This will be appreciated, thank you :heart:

https://github.com/sponsors/ldez