Re: [kitten] Finding Kerberos Realm Descriptors in secure DNS

Viktor Dukhovni <viktor1dane@dukhovni.org> Tue, 15 September 2015 14:47 UTC

Return-Path: <viktor1dane@dukhovni.org>
X-Original-To: kitten@ietfa.amsl.com
Delivered-To: kitten@ietfa.amsl.com
Received: from localhost (ietfa.amsl.com [127.0.0.1]) by ietfa.amsl.com (Postfix) with ESMTP id 7DBC91A910B for <kitten@ietfa.amsl.com>; Tue, 15 Sep 2015 07:47:28 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -102.6
X-Spam-Level:
X-Spam-Status: No, score=-102.6 tagged_above=-999 required=5 tests=[BAYES_00=-1.9, RCVD_IN_DNSWL_LOW=-0.7, USER_IN_WHITELIST=-100] autolearn=ham
Received: from mail.ietf.org ([4.31.198.44]) by localhost (ietfa.amsl.com [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id m0UY9gd2-Zm4 for <kitten@ietfa.amsl.com>; Tue, 15 Sep 2015 07:47:26 -0700 (PDT)
Received: from mournblade.imrryr.org (mournblade.imrryr.org [38.117.134.19]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ietfa.amsl.com (Postfix) with ESMTPS id 3B5CA1B4F6E for <kitten@ietf.org>; Tue, 15 Sep 2015 07:47:26 -0700 (PDT)
Received: by mournblade.imrryr.org (Postfix, from userid 1034) id 02842284B70; Tue, 15 Sep 2015 14:47:24 +0000 (UTC)
Date: Tue, 15 Sep 2015 14:47:24 +0000
From: Viktor Dukhovni <viktor1dane@dukhovni.org>
To: kitten@ietf.org
Message-ID: <20150915144724.GJ21942@mournblade.imrryr.org>
References: <55F686EA.30206@openfortress.nl> <55F6EA7C.8070608@mit.edu> <20150914161100.GC13294@localhost> <55F6F843.2070609@openfortress.nl> <55F7C3FA.5090802@openfortress.nl> <20150915073030.GD21942@mournblade.imrryr.org> <55F7CB98.6060300@openfortress.nl>
MIME-Version: 1.0
Content-Type: text/plain; charset="us-ascii"
Content-Disposition: inline
In-Reply-To: <55F7CB98.6060300@openfortress.nl>
User-Agent: Mutt/1.5.24 (2015-08-30)
Archived-At: <http://mailarchive.ietf.org/arch/msg/kitten/xo8H_Hfir4Fm21MIm4-qhbTRMLE>
Subject: Re: [kitten] Finding Kerberos Realm Descriptors in secure DNS
X-BeenThere: kitten@ietf.org
X-Mailman-Version: 2.1.15
Precedence: list
Reply-To: kitten@ietf.org
List-Id: Common Authentication Technologies - Next Generation <kitten.ietf.org>
List-Unsubscribe: <https://www.ietf.org/mailman/options/kitten>, <mailto:kitten-request@ietf.org?subject=unsubscribe>
List-Archive: <https://mailarchive.ietf.org/arch/browse/kitten/>
List-Post: <mailto:kitten@ietf.org>
List-Help: <mailto:kitten-request@ietf.org?subject=help>
List-Subscribe: <https://www.ietf.org/mailman/listinfo/kitten>, <mailto:kitten-request@ietf.org?subject=subscribe>
X-List-Received-Date: Tue, 15 Sep 2015 14:47:28 -0000

On Tue, Sep 15, 2015 at 09:41:12AM +0200, Rick van Rein wrote:

> Hi Viktor,
> 
> > Text strings used to be handy for realm names in DNS when associated
> > SRV records were plausibly optional.  These days, the REALM *should*
> > be a DNS name.
> 
> If that's not MUST then I don't think it's a safe assumption to make.

The proposal need not support all legacy options.  Folks who want
non-DNS name realms can manage the mapping outside DNS.

> > Therefore, a simpler design would be:
> >
> >     ; Realm mapping per-host reduces lookup latency
> >     ;
> >     _kerberos.host.name.example.com. IN PTR EXAMPLE.COM.
> 
> The value of PTR is a <domain-name> rather than a binary <character-string>,
> which makes it case-insensitive and I wouldn't be surprised if some name
> server mangled the case of PTR records to all-lowercase.

No, it is not "case-insensitive".  The value of PTR records is
returned verbatim by nameservers.  What's case insensitive is
lookups derived from that name when you use it in a query string.

> Also, the trailing dot is not the only form that may be used;
> there can be relative names.

You're confused.  DNS wire format carries fqdns, as a sequence of
length-encoded labels, with the last length set to 0 (there is no
trailing ".", there's an empty label).  There might be "relative"
names in zone files, but none will appear on the wire.

> And, you are using PTR in forward DNS, which may upset people.

There's no such thing as "forward" vs. "reverse" DNS.  All zones
are just zones.  There's nothing magic about in-addr.arpa or
ip6.arpa.  Plus there are frequently CNAMEs from these into other
zones allowing users to manage their own PTRs.

> Finally, the PTR record already has its meaning, and that is not the one
> we have in mind.

It it *exactly* the meaning you have in mind.  A DNS name that is
not an alias.  A pointer to another place in the DNS.

> I've initially proposed overloading TXT and that gave strong responses to
> instead register a new RRtype, and nobody on DNSEXT is questioning that
> change.  I therefore propose to not follow your idea.  It made me smile
> though, because it is an interesting find.

You haven't seen my battle scars fighting broken nameservers that
block TLSA queries.

Try the following experiment:

    $ dig +short -t mx disa.mil | sort -n
    0 pico.disa.mil.
    5 indal.disa.mil.
    10 dnipro.disa.mil.

    $ dig +short -t a pico.disa.mil
    214.36.3.4

Now the fun bits, first a PTR lookup, which works as expected:

    $ dig +noedns +noall +comment +ans +nocl +nottl -t ptr pico.disa.mil
    ;; Got answer:
    ;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 37990
    ;; flags: qr rd ra ad; QUERY: 1, ANSWER: 0, AUTHORITY: 1, ADDITIONAL: 0

Now a TLSA lookup:

    $ dig +noedns +noall +comment +ans +nocl +nottl -t tlsa pico.disa.mil
    ... long delay ...
    ;; connection timed out; no servers could be reached

Now some brand new RRtype:

    $ dig +noedns +noall +comment +ans +nocl +nottl -t TYPE12345 pico.disa.mil
    ... long delay ...
    ;; connection timed out; no servers could be reached

Many firewalls mistakenly filter "exotic" DNS queries.  The KREALM
RRtype will encounter unnecessary friction.

With the PTR record, UTF-8 labels in Kerberos realms can be converted
to A-labels in zone files and on the wire, with the client mapping
them back to U-labels to reconstruct the realm name, and using the
A-labels directly to locate SRV records, ...

Kerberos realms in DNS should be DNS names, the PTR record will
work much better, is supported by existing zone management tools,
and is not blocked by firewalls.

-- 
	Viktor.