Skip to content
This repository was archived by the owner on Aug 14, 2020. It is now read-only.
This repository was archived by the owner on Aug 14, 2020. It is now read-only.

spec: use TXT dns records for discovery #3

Open

Description

@philips

From @philips on December 8, 2014 21:3

@blalor said "I feel like there should be a DNS component to this, as well. Perhaps a TXT record?" in #210.

Lets discuss that topic here.

/cc @geekgonecrazy

Copied from original issue: rkt/rkt#242

Activity

  1. philips commented on Dec 9, 2014

    @philips
    ContributorAuthor

    From @geekgonecrazy on December 8, 2014 21:24

    For me there are a few reasons for a DNS record.

    • I prefer to keep un-needed tags out of my website markup.
    • I compile my website / web app. So my sites markup is actually in a docker container currently and versioned. So i'd have to bake it in there.
    • I can update my DNS via a REST api.
    • Already partially using DNS for service discovery.
    • Running internal DNS for intranet. Could keep info completely private with out having to maintain 2 versions of my site, or have to use a different domain.
  2. philips commented on Dec 9, 2014

    @philips
    ContributorAuthor

    From @blalor on December 8, 2014 21:25

    All of those things. Said far better than I could do it. :-)

  3. philips commented on Dec 9, 2014

    @philips
    ContributorAuthor

    @geekgonecrazy @blalor Can you provide some example TXT record formats to consider for this? I don't have a good first-hand experience with the constraints or features of the format.

  4. philips commented on Dec 9, 2014

    @philips
    ContributorAuthor

    From @robszumski on December 8, 2014 21:39

    TXT record would also mean you're not spinning up extra infrastructure just to serve a few meta tags on a certain domain.

  5. philips commented on Dec 9, 2014

    @philips
    ContributorAuthor

    From @geekgonecrazy on December 8, 2014 21:42

    I'm in no way qualified to give a definitive answer. But here's what my google-fu gives me.

    From RFC1464

    The general syntax is:
    
            <owner> <class> <ttl> TXT "<attribute name>=<attribute value>"
    

    From reading the App container spec i'd guess something like this:

    ac-discovery content="prefix-match url-tmpl"
    ac-discovery-pubkeys content="prefix-match url"

    or

    ac-discovery="prefix-match url-tmpl"
    ac-discovery-pubkeys="prefix-match url"

    Records could be separate or in the same record. If i'm not mistaken you're limited to 255 characters.

    If you wanted to squeeze them all in the same record could do:

    app-container discovery="prefix-match url-tmpl" discovery-pubkeys="prefix-match url"

  6. philips commented on Dec 9, 2014

    @philips
    ContributorAuthor

    @miekg You are a DNS expert, any suggestions on resources to help us design a TXT record format. Essentially we want to have the same thing as these HTTP meta tags only for TXT records:

    https://github.com/coreos/rocket/blob/master/app-container/SPEC.md#meta-discovery

    Any help would be greatly appreciated.

  7. philips commented on Dec 9, 2014

    @philips
    ContributorAuthor

    From @geekgonecrazy on December 8, 2014 22:26

    Just realized i'm using " inside the example records. Looks like they'd have to be escaped which would be messy. So would have to break it up a bit.

    ac-discovery:
    example.com. 730 IN TXT "ac-discovery prefix=example.com url-tmpl=https://example.com/{os}/{arch}/{name}-{version}.{ext}?torrent"

    ac-discovery-pubkeys:
    example.com. 730 IN TXT "ac-discovery-pubkeys prefix=example.com url=https://example.com/pubkeys.gpg"

    But yeah a DNS expert would know.

  8. philips commented on Dec 9, 2014

    @philips
    ContributorAuthor

    From @miekg on December 8, 2014 22:31

    Just pulled in, haven't read the spec. This is all new, so a client needs to understand the records? If so, don't, DON'T use a TXT record, invent a new type (it's easy and the best thing to do - I can help). You can copy the TXT semantics but they are not great. If you only need two elements, just define the new RR to do so.

  9. philips commented on Dec 9, 2014

    @philips
    ContributorAuthor

    From @geekgonecrazy on December 8, 2014 22:42

    don't, DON'T use a TXT record, invent a new type (it's easy and the best thing to do - I can help)

    @miekg Correct me if i'm wrong.. But wouldn't this require us to be running our own DNS servers so that we could then add this new type in?

    If so, that'd defeat the usefulness of using a DNS record, right?

  10. philips commented on Dec 9, 2014

    @philips
    ContributorAuthor

    From @miekg on December 8, 2014 22:46

    Not per se, as all dns servers should support unknown records (but yes some
    don't support those)
    On 8 Dec 2014 22:42, "Aaron Ogle" [email protected] wrote:

    don't, DON'T use a TXT record, invent a new type (it's easy and the
    best thing to do - I can help)

    @miekg https://github.com/miekg Correct me if i'm wrong.. But wouldn't
    this require us to be running our own DNS servers so that we could then add
    this new type in?

    If so kinda defeats the usefulness of using a DNS record, right?

    —
    Reply to this email directly or view it on GitHub
    rkt/rkt#242 (comment).

  11. philips commented on Dec 9, 2014

    @philips
    ContributorAuthor

    From @geekgonecrazy on December 8, 2014 23:5

    If this is to be added to part of the App Container spec i'd think we would want to only use established DNS records. So that it could be used regardless of the DNS server used.

    I don't think i've personally ever seen one that would allow you to feed an unknown record type. Other then maybe a bind9 server. Definitely not something like Amazon's Route 53 or any other DNS service.

  12. philips commented on Dec 9, 2014

    @philips
    ContributorAuthor

    From @blalor on December 8, 2014 23:10

    Yeah, that's why I suggested TXT: universality. Unless there's another suitable record type. IANADNSE. (I am not a DNS expert)

  13. philips commented on Dec 9, 2014

    @philips
    ContributorAuthor

    From @miekg on December 9, 2014 9:9

    Also see http://miek.nl/posts/2013/Oct/12/What%20to%20put%20in%20the%20DNS/

    TXT can work, but when requesting the record you can all TXT records under that name, so maybe it is prudent to use a special sub domain? Also just put base64 data in the record if you're scared of encoding issues (which will be plenty full). Just make sure that you split the fragments on the 255 per-text limit boundery.

    I will check the spec and send a longer reply this evening (GMT)

  14. 37 remaining items

  15. miekg commented on Mar 1, 2015

    @miekg

    I'm sorry, but regarding the length of TXT records you have it wrong:
    https://www.ietf.org/rfc/rfc1035.txt, section "3.3.14. TXT RDATA format"

    TXT-DATA One or more <character-string>s.

    Where <character-string>s. is defined as:

    is a single
    length octet followed by that number of characters.
    is treated as binary information, and can be up to 256 characters in
    length (including the length octet).

    And yes firewalls would drop larger packets, with the advent of DNSSEC this has become less and less (luckily).

    And yes, existing types would work, but in the longer run a new RR type would work just so much better. It is easy to do and any nameserver support unknown RRs (https://tools.ietf.org/html/rfc3597) can support it.

  16. b commented on Mar 1, 2015

    @b

    No, I have it right. That 256 characters including the length octet? That's 255 character strings, just like I said. TXT-DATA is one OR MORE of those 255 character strings. The limit on the length of RDATA is 65535. The RDATA for a TXT RR is up to 65535 octets of 255 octet strings, just like I said. I did not use the pedantic terminology because it is unnecessary to this discussion.

    There are still an unfortunately large number of those older devices dropping EDNS0 responses. The default image discovery mechanism should not rely on an extension we know to not yet be universal. Suggesting we layer on an additional requirement for both EDNS0 and unknown RRs is just asking for trouble.

    Please quantify "would work so much better" given there are multiple IETF protocols that behave in exactly the way being proposed and which don't rely on anything but basic resolver behavior. If this is merely a question of personal aesthetics, then we can agree to disagree.

  17. geekgonecrazy commented on Mar 2, 2015

    @geekgonecrazy

    Every dns provider i've tried limits it to 255 characters.. We can't just assume that because it can technically be done that it should.

    If i'm not mistaken compatibility is the key here.

  18. b commented on Mar 2, 2015

    @b

    Limits a single TXT record in the zone file to 255 characters, right?

  19. geekgonecrazy commented on Mar 2, 2015

    @geekgonecrazy

    Limits a single TXT record in the zone file to 255 characters, right?

    Correct. I intentionally have avoided trying custom dns services run locally. Because not everyone is going to be running their own dns.

  20. b commented on Mar 2, 2015

    @b

    You may be misunderstanding. That is the single 255 byte string per entry
    part of what I said above. You can have multiple TXT records for the same
    label. That is actually required by SPF.

    On Monday, March 2, 2015, Aaron Ogle [email protected] wrote:

    Limits a single TXT record in the zone file to 255 characters, right?

    Correct. I intentionally have avoided trying custom dns services run
    locally. Because not everyone is going to be running their own dns.

    —
    Reply to this email directly or view it on GitHub
    #3 (comment).

  21. geekgonecrazy commented on Mar 2, 2015

    @geekgonecrazy

    I apologize I articulated it poorly. But yes that is what I meant. They allow for multiple 255 byte strings, or multiple TXT records.

    Either way. If its multiple chunks in one TXT record or multiple TXT records. Both are easier for then a new RR. Simply because they already exist and are widely used for this exact sort of thing.

    If splitting it up into multiple records makes it easier for the DNS client to load. I say this should be the recommended approach.

  22. changed the title [-]appc: use TXT dns records for discovery[/-] [+]spec: use TXT dns records for discovery[/+] on Apr 23, 2015
  23. modified the milestone: v2.0.0+ on Jun 10, 2015
  24. geekgonecrazy commented on Dec 1, 2015

    @geekgonecrazy

    Any more thoughts on doing it using TXT? This has been stale for a while. I'd love to see this implemented.

  25. jonboulle commented on Dec 9, 2015

    @jonboulle
    Contributor

    This is still on the cards as something we might consider implementing, but
    work on discovery is a little stalled right now as we figure out the next
    steps for appc + cncf.

    On Tue, Dec 1, 2015 at 11:40 AM, Aaron Ogle [email protected]
    wrote:

    Any more thoughts on doing it using TXT? This has been stale for a while.
    I'd love to see this implemented.

    —
    Reply to this email directly or view it on GitHub
    #3 (comment).

  26. geekgonecrazy commented on Dec 9, 2015

    @geekgonecrazy

    @jonboulle perfect, I'll stay tuned. Thanks for the update!

  27. added a commit that references this issue on May 10, 2019
    ff49af6
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions