caddy-dns / porkbun

MIT License
28 stars 8 forks source link

Is domain delegation supported for dns-01 challenges? #7

Open guiand888 opened 1 year ago

guiand888 commented 1 year ago

Hi,

Just wanted to check if this plugin supports domain delegation for dns-01 challenges?

I have _acme-challenge.test.example.com with a CNAME pointing to porkbundomain.com yet it seems the plugin is trying to add the TXT verification to the zone _acme-challenge.test instead of the zone of the PorkBun domain.

Logs:

caddy-caddy-1  | {"level":"error","ts":1696569199.9004624,"logger":"tls.obtain","msg":"will retry","error":"[test.example.com] Obtain: [test.example.com] solving challenges: presenting for challenge: adding temporary record for zone \"example.com.\": could not create record:({0xc00077e160 vdFcR7IkcQw0295D0e5P3ftv5u1XcFnmMUOyeofTaI4 _acme-challenge.test 600 TXT}) in Zone: example.com; Status: 400; Body: {\"status\":\"ERROR\",\"message\":\"Invalid domain.\"} (order=https://acme-staging-v02.api.letsencrypt.org/acme/order/120920914/11400135134) (ca=https://acme-staging-v02.api.letsencrypt.org/directory)","attempt":1,"retrying_in":60,"elapsed":4.345143409,"max_duration":2592000}

Cheers!

Niallfitzy1 commented 10 months ago

That wasn't something I'd considered during the implementation

I did base it closely off the CloudFlare implementation, so I'd be curious if that module supports it & this doesn't.

If you manage to spot a fix I'd be happy to review it