-
Notifications
You must be signed in to change notification settings - Fork 4.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add configuration entry to control including TXT records for node meta in DNS responses #4215
Conversation
…a in DNS responses If set to false, the only way to retrieve TXT records for node meta is to specifically query for TXT records.
One question I have is whether this configuration name is okay. I cant say I am completely sold on it but figured I would throw it out there and if anyone else has an idea for a better name please let me know. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I wonder if we should default this to false in 1.3.0 and add a note in the docs here about the upcoming change. This feels like kind of a niche thing that most people wouldn't be able to use without custom DNS logic.
Overall though, looks great and I'm wondering what others think about the default 👍
@mkeeler looks awesome. I'll bite on the naming bikeshed:
Given those, we could consider something like But I don't really know if either point matters, I think it needs documentation either way, maybe look in docs and see how out of place a bool without enable/disable prefix is? |
@kyhavlov This seems like a sane default. Unless you are issuing DNS queries yourself (not using the OS resolver like getaddrinfo on linux) then you wont be able to see any of the data anyways. For those people that do rely on the text records they can just flip the switch and have it be on. @banks two issues with disable_srv_node_meta_txt. 1) it applies to ANY queries in addition to SRV so the _srv is unneeded there. Secondly it makes it seem like the TXT records are completely unavailable which they are not. You can still do a TXT query and get them. Thats where additional came from. When the are in addition to other RRs in the response. disable_extra_node_meta_txt has similar issues in that sometimes the TXT RRs were returned in the answer section, so that could be misleading. |
It seems a little strange to me that So I given that you called it I still think having |
…ional section ANY queries are no longer affected.
The latest update makes it so that the TXT RRs are only filtered out when 1) they would end up in the Additional section of the DNS response and 2) Consul is configured to do that. Also the configuration parameter is now |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Great!
@kyhavlov If we want to set different defaults or update documentation saying we will do that in the future we can do that in a separate PR. |
Previously doing ANY or SRV queries for nodes/services would tack on extra TXT records (1 for each entry of node metadata). The changes in this PR allow for disabling that behavior and making those TXT records only accessible via requests with a query type of TXT.
Adds configuration like:
This new configuration entry defaults to
true
to preserve existing behavior.