kong icon indicating copy to clipboard operation
kong copied to clipboard

fix(conf): remove `CNAME` from default `dns_order` option

Open chobits opened this issue 1 year ago • 4 comments

Summary

DNS servers are capable of performing recursive lookups on behalf of clients and DNS client could directly extract IP addresses from RRs due to https://github.com/Kong/kong/pull/13002. Consequently, clients often don't need to query CNAME records.

The impact on customers is that when they use the default dns_order option without explicit configuration, their local DNS servers won't get any CNAME requests, and there won't be CNAME dereferencing for those queries.

Checklist

  • [x] The Pull Request has tests
  • [x] A changelog file has been created under changelog/unreleased/kong or skip-changelog label added on PR if changelog is unnecessary. README.md
  • [ ] There is a user-facing docs PR against https://github.com/Kong/docs.konghq.com - PUT DOCS PR HERE

Issue reference

Fix KAG-4606

chobits avatar May 29 '24 09:05 chobits

This PR removes Kong's DNS client's handling of CNAME. As a result, the logic for CNAME dereferencing and recursive loop detection becomes unnecessary and can be removed. However, removing them requires some effort, so for now, they're left as is.

chobits avatar May 29 '24 10:05 chobits

isn't this a breaking change?

Tieske avatar May 29 '24 14:05 Tieske

isn't this a breaking change?

I reconsidered it, and changing the default behavior is a breaking change. I'll modify the type in the changelog.

However, users can actually be unaware of this behavior, because CNAME can still be configured in dns_order. This PR does not remove the CNAME-processing logic from DNS client. This means that customers can seamlessly upgrade to this version of the PR, whether they are using the default dns_order or have explicitly configured dns_order with CNAME, such as (dns_order=LAST,A,CNAME).

What users will notice is that when they use the default dns_order option without explicit configuration, their local DNS servers will not receive any CNAME requests and there is no CNAME dereferencing for that query.

chobits avatar May 30 '24 02:05 chobits

hold it , because https://github.com/Kong/kong/pull/13002 has been reverted. We need to fix the regression of https://github.com/Kong/kong/pull/13002, then we could merge this pr.

chobits avatar Jun 24 '24 07:06 chobits