Skip to content

Feature request: DNS TXT resource records #2709

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

Closed
sodre opened this issue Feb 3, 2017 · 9 comments
Closed

Feature request: DNS TXT resource records #2709

sodre opened this issue Feb 3, 2017 · 9 comments
Labels
theme/service-metadata Anything related to management/tracking of service metadata type/enhancement Proposed improvement or new feature

Comments

@sodre
Copy link
Contributor

sodre commented Feb 3, 2017

@sean-

As discussed, It would be useful for Consul to serve TXT records at multiple levels in the domain hierarchy. One use-case in mind is a Kerberized cluster configured purely through DNS. This requires that the DNS server respond to TXT _kerberos[.data center]<.domain> with the configured realm name.

One thought is to store this information is in the key-value store, perhaps in a format such as...
key: /service/dns/req=TXT/<FQDN> value: TXTDATA.

@sodre sodre changed the title Feature Request DNS TXT Request Feature request: DNS TXT Request Feb 3, 2017
@sodre sodre changed the title Feature request: DNS TXT Request Feature request: DNS TXT Request [RFC1464](https://www.ietf.org/rfc/rfc1464.txt) Feb 3, 2017
@sodre sodre changed the title Feature request: DNS TXT Request [RFC1464](https://www.ietf.org/rfc/rfc1464.txt) Feature request: DNS TXT Request RFC1464 Feb 3, 2017
@sodre sodre changed the title Feature request: DNS TXT Request RFC1464 Feature request: DNS TXT resource records Feb 3, 2017
@slackpad slackpad added type/enhancement Proposed improvement or new feature post-0.9 labels May 2, 2017
@slackpad
Copy link
Contributor

slackpad commented May 2, 2017

There might be a nice path for this now that we have node metadata, and we plan on service metadata as well.

@sodre
Copy link
Contributor Author

sodre commented May 2, 2017 via email

@slackpad
Copy link
Contributor

slackpad commented May 2, 2017

Node metadata is configured in https://www.consul.io/docs/agent/options.html#node_meta, and is exposed in all the catalog and health APIs.

@slackpad slackpad added the theme/service-metadata Anything related to management/tracking of service metadata label May 25, 2017
magiconair pushed a commit that referenced this issue Sep 26, 2017
  - Lookup TXT records using recursive lookups
  - Expect TXT record equal to value if key starts with rfc1035-
  - Expect TXT record in rfc1464 otherwise, i.e. (k=v)

ref #2709
magiconair pushed a commit that referenced this issue Sep 28, 2017
  - Lookup TXT records using recursive lookups
  - Expect TXT record equal to value if key starts with rfc1035-
  - Expect TXT record in rfc1464 otherwise, i.e. (k=v)

ref #2709
@slackpad
Copy link
Contributor

slackpad commented Jan 5, 2018

Closed via #3343.

@slackpad slackpad closed this as completed Jan 5, 2018
@sodre
Copy link
Contributor Author

sodre commented Jan 6, 2018

This is not fully addressed yet. For example, there is no way to assign TXT records to the base domain yet.

@slackpad slackpad reopened this Jan 6, 2018
@neurostream
Copy link

neurostream commented Apr 19, 2018

In case anyone else also arrives here wondering about how the DNS API for a TXT record might translate to the HTTP API, here were a couple related thoughts I've discussed with other colleagues/Consul fans:

The basic feature model of Consul that circles around one's head is, especially from the HTTP API perspective, primarily:

- Nodes
- Services
- KV

From the DNS API perspective, it might seem to follow such that:

- Nodes    = DNS Resource Record Type: "A" 
- Services = DNS Resource Record Type: "SRV"
- KV       = DNS Resource Record Type: "TXT"

First consider the way "Nodes" are mapped under .node.consul, and the way "Services" are mapped under .service.consul. And then consider that a "Value" of a Consul K:V pair would fit naturally into a TXT record - but mapping the kv/path/for/the/Key to a ( for example ) .kv.consul domain name doesn't quite hold up.

key.the.for.path.kv.consul or path-for-the-key.kv.consul would seem to be a bit presumptuous - either for subdomain levels that are too deep or to presume it OK re-format the kv/path/for/the/Key with some other DNS domain -friendly delimiter in order to key in from a single domain name level below .kv.consul. base64 encoding the URL KV path/for/the/key into a single DNS domain name level might end up with an '=' sign or other non-DNS friendly DNS record names.

As mentioned, Node meta data comes through in a DNS TXT record lookup, i.e.:

dig pvclaims.kubeworker2.node.consul. txt

kubeworker2.node.consul.    0   IN  TXT "provisioner=kubernetes.io/iscsi-targetd"

It would be snazzy if ServiceMeta could be mapped into the DNS TXT record lookup the same way that NodeMeta, but for the :

dig iscsi.targetd.service.consul. txt

But service meta data seems to only be retrievable through the HTTP interface.

@rtbellows
Copy link

Any chance of getting servicemeta returned as TXT records through consul dns? This would be very useful for DNS-01 letsencrypt challenges, for example.

@sodre
Copy link
Contributor Author

sodre commented Apr 21, 2018 via email

@hanshasselberg
Copy link
Member

I am closing this issue since the corresponding PR was also closed. We don't have time to add this feature, but I would be happy to review a PR and provide feedback. Thanks all!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
theme/service-metadata Anything related to management/tracking of service metadata type/enhancement Proposed improvement or new feature
Projects
None yet
Development

No branches or pull requests

5 participants