octodns / octodns-cloudflare

Cloudflare DNS provider for octoDNS
MIT License
24 stars 18 forks source link

Support TLSA Record #30

Closed felixoi closed 1 year ago

felixoi commented 1 year ago

Source of support (type also available in dashboard): https://blog.cloudflare.com/additional-record-types-available-with-cloudflare-dns/. Mostly used for DANE support in mail servers.

args:

Currently my workflow fails because of

AttributeError: 'CloudflareProvider' object has no attribute '_data_for_TLSA'. Did you mean: '_data_for_A'?

There is nothing configured in octodns for TLSA just a manual dns record using the dashboard.

ross commented 1 year ago
AttributeError: 'CloudflareProvider' object has no attribute '_data_for_TLSA'. Did you mean: '_data_for_A'?

How'd you hit that error? I just created a TLSA record in my test setup and it's skipped/ignored as expected/:

I can only get that to happen when TLSA is added to the SUPPORTS list on the provider. Support for the type can be added, but obviously isn't included currently.

felixoi commented 1 year ago

@ross As I didn't edit the list, I've checked some other things and it seems like the error started because of an unescaped IPv6 address (introduced in https://github.com/felixoi/dns/commit/c8e1eb5c0159f305483ab5b60a7cf10f6761934d). After wrapping it in " it now works again. Still I don't expect the TLSA error when having something unescaped. It happend randomly again after it worked before when escaping an IPv6 address (https://github.com/felixoi/dns/commit/e55dabd78deb4e024f553ce73b7f54c98899c240). Thanks for the support PR, as this enabled me to manage the TLSA record using octodns.

ross commented 1 year ago

It happend randomly again after it worked before when escaping an IPv6 address (felixoi/dns@e55dabd).

Hrm, I'll have to take another look at the provider. I didn't see a way for it to get to the point of trying to call that method, but regardless the PR should address it.

ross commented 1 year ago

Fixed by https://github.com/octodns/octodns-cloudflare/pull/31