Subject: Proposed updates for domain-based drafts

From: Nicolas Williams <[email-masked]>
Date: Tue, 29 Aug 2006 15:57:24 -0500

Issues that came up:

 - Sam wanted a better outline of how applications might use
   domain-based names.  I'm not sure whether Sam wants text for the
   drafts or merely discussion on the list.

 - Sam and Jeff H. were concerned about the SASL framework vis-a-vis
   domain-based names.

 - Jeff Hutzelman wanted

    - A clarification on just what is a "domain"

    - A new feature in the Kerberos V GSS-API mechanism relating to
      domain-based names: initiator-side fallback on hostbased naming
      with domainnames as hostnames with acceptor-side acceptor
      credential sharing.

To address Sam's main comment I propose re-writing the introduction to
explain that domain-based names are intended to provide protection to
applications utilizing insecure service discovery methods.  Additionally
the specification of what domainname to be used in the domain part of
domain-based names will be left to applications.  Some applications may
use SRV RR names as domainnames (e.g., _tcp._foosvc.example.com), others
may use plain domainnames (e.g., example.com).  Finally, I propose a new
section containing Informative descriptions of how NFSv4 and LDAP
clients (ignoring SASL naming issues; see below) would perform service
discovery using DNS SRV RR queries and domain-based service names for
servers named in the SRV RRs.  I will send text tonight, hopefully.

With respect to SASL I believe there is nothing for either of these two
I-Ds to say on the matter.  I believe applications and SASL/GS1 and/or
SASL/GS2 will require updating to specify use of domain-based names in
SASL contexts.  I don't believe that we absolutely must update the SASL
base specification to introduce new kinds of server names, but I don't
mind us doing so -- either way the I-Ds we're considering in this WGLC
are unaffected.

After some off-line discussion with Jeff about his proposed new feature
we reached a compromise.  We propose the following change to
draft-ietf-kitten-krb5-gssapi-domain-based-names-02.txt:

-   GSS_C_NT_DOMAINBASED_SERVICE name are mapped to Kerberos V principal
-   names as follows:
+   GSS_C_NT_DOMAINBASED_SERVICE name SHOULD be mapped to Kerberos V
+   principal names as follows:

This will allow for a future document that specifies Jeff's fallback
feature.

Nico
--

---

From: Jeffrey Hutzelman <[email-masked]>
Date: Tue, 29 Aug 2006 20:38:06 -0400

>    drafts or merely discussion on the list.

Neither am I, but I thought the original point was to demonstrate that 
domain-based names as specified are workable in practice.  To that end, I 
will note that there is an existing widely-deployed implementation of LDAP 
using GSS-krb5 with domain-based service names substantially as specified 
here.  We've also discussed how to make use of them in SSH and in NFSv4, 
and in neither case is the answer Kerberos-specific.

It seems clear that the determination of when to use the domain-based name 
form must be made by the application.  In the case of NFSv4, the client 
knows a priori whether it is supposed to be mounting an individual 
fileserver or the root of a namespace belonging to some domain, and 
domain-based names are used only in the latter case.  Referrals always list 
the names of one or more specific servers, and the mounts resulting from 
them would always use host-based names.

In the case of SSH, the use of domain-based names for key exchange would be 
negotiated by the use of an alternate family of algorithm names; an SSH 
server would be required to know whether it possesses suitable acceptor 
credentials for use with domain-based names, and only advertise the 
mechanism in that case.  This is similar to the current model, in which an 
SSH server only advertises support for GSS-API mechanisms for which it has 
acceptor credentials.

I don't think it's necessary for this document to describe how domain-based 
names might be used in existing protocols.  In fact, I believe that doing 
so may be actively harmful, because it may lead to people treating such 
text as if it were a mature protocol specification rather than a 
proof-of-concept, possibly even after a real spec has been published.

>     - A clarification on just what is a "domain"

You haven't actually said anything here in response to this, but we 
discussed this offline and I believe we came to the conclusion that the 
determination of the correct domain to use is up to the application.  In 
particular, we have between us seen at least three possible choices, 
depending on the intended use:

- For services for which service for a specified domain is provided by
  one or more servers identified by SRV records or some similar mechanism,
  you probably want to use the same base domain name used to construct the
  names of SRV records.  For example, if you are connecting to the LDAP
  service for the domain EXAMPLE.ORG, you'd look for DNS SRV records under
  the name _ldap._tcp.EXAMPLE.ORG, and use a domain-based service name like
  [email-masked]@ldap1.example.org.  This is probably the correct model
  for LDAP, and also for NFSv4.

- For services for which service for a single name may be provided by one
  or more servers sharing a name, you probably want to use the shared name
  as the domain name, and obtain hostnames by reverse resolution.  This is
  the model I'd expect to see used for SSH (for example, to provide a pool
  of time-sharing machines behind a single hostname).

- Nico envisioned services in which one might provide different "instances"
  for the same domain name, which would necessitate building domain-based
  service names using the full name used to construct SRV records (for
  example, [email-masked]@foobar1.example.com) and/or
  attach some instance designator to the domain name.  I can't think of
  any concrete examples where this is needed, but that doesn't mean that
  there aren't any, or that there can't be any in the future.

Essentially, the correct choice of name form really needs to be up to the 
application, or at least to something above the GSS-API layer.  We might 
provide examples like the ones I just gave, but I don't think that's 
necessary, either; the existing text seems fine on this point.

> mind us doing so -- either way the I-Ds we're considering in this WGLC

I believe there is clearly work to be done in this area as it relates to 
SASL.  The question of whether and when to use domain-based names and of 
what domain name to use needs to be answered, and in the case of SASL, it 
is likely to be application-specific.  However, we need to be careful not 
to introduce unnecessary complexity or a need for applications to have 
mechanism-specific knowledge.

In any event, I agree with Nico that neither of Kitten's domain-based name 
drafts need to address the SASL question.

> This will allow for a future document that specifies Jeff's fallback

In fact, it retains nearly all the strength of the original statement, 
while still allowing for compliant implementations that can be configured 
to map domain-based names differently.  I believe that SHOULD as defined in 
RFC2119 is quite strong enough for this purpose.

-- Jeff

---

From: Nicolas Williams <[email-masked]>
Date: Thu, 31 Aug 2006 12:12:40 -0500

Proposed changes to draft-ietf-kitten-gssapi-domain-based-names-02.txt
below.

The changes amount to:

 - recast the purpose of domain-based names, namely: protecting
   applicationst that use insecure server discovery

 - clarify that the meaning of "domain" here is application specific

 - Provide non-normative examples

 - Add references

Comments?

 Abstract
 
    This document describes domainname-based service principal names and
    the corresponding name type for the Generic Security Service
    Application Programming Interface (GSS-API).
 
    Domain-based service names are similar to host-based service names,
    but using a domain name (not necessarily an Internet domain name)
    instead of or in addition to a hostname.  The primary purpose of
-   domain-based service names is to provide a way to name clustered
-   services after the domain which they service, thereby allowing their
-   clients to authorize the service's servers based on authentication of
-   their names.
+   domain-based names is to provide a measure of protection to
+   applications that utilize insecure service discovery protocols.  This
+   is achieved by providing a way to name clustered services after the
+   domain which they service, thereby allowing their clients to
+   authorize the service's servers based on authentication of their
+   service names.

 Table of Contents
 
    1.    Conventions used in this document  . . . . . . . . . . . . .  3
    2.    Introduction . . . . . . . . . . . . . . . . . . . . . . . .  4
    3.    Name Type OID and Symbolic Name  . . . . . . . . . . . . . .  5
    4.    Query and Display Syntaxes . . . . . . . . . . . . . . . . .  6
-   5.    Examples . . . . . . . . . . . . . . . . . . . . . . . . . .  7
+   4.1.  Examples of domain-based names . . . . . . . . . . . . . . .  6
+   5.    Application protocol examples  . . . . . . . . . . . . . . .  7
+   5.1.  NFSv4 domain-wide namespace root server discovery  . . . . .  7
+   5.2.  LDAP server discovery  . . . . . . . . . . . . . . . . . . .  7
    6.    Security Considerations  . . . . . . . . . . . . . . . . . .  8
    7.    References . . . . . . . . . . . . . . . . . . . . . . . . .  9
    7.1.  Normative  . . . . . . . . . . . . . . . . . . . . . . . . .  9
    7.2.  Informative  . . . . . . . . . . . . . . . . . . . . . . . .  9
          Author's Address . . . . . . . . . . . . . . . . . . . . . . 10
          Intellectual Property and Copyright Statements . . . . . . . 11
 
[...]

 2.  Introduction
 
-   The use of hostbased principal names for domain-wide services
-   presents the problem of how to distinguish between an instance of a
-   hostbased service that is authorized to respond for a domain and one
-   that isn't.
+   Some applications need to discover the names of servers for a
+   specific resource.  Some common methods for server discovery are
+   insecure, e.g., queries for DNS [RFC1035] SRV resource records
+   [RFC2782] without using DNSSEC [RFC4033] and subject to attacks
+   whereby a client can be re-directed to incorrect and possibly
+   malicious servers.  A client may even be re-directed to a server that
+   has credentials for itself and may thus authenticate itself to the
+   client, and yet it could be incorrect or malicious (because it has
+   been compromised, say).
 
-   Consider LDAP.  LDAP [RFC3377] with SASL [RFC2222] and the Kerberos V
-   mechanism [RFC1964] for the GSS-API [RFC2743] uses a hostbased
-   principal with a service name of "ldap", a reasonable approach,
-   provided there is only one logical LDAP directory in a Kerberos
-   realm's domain, and that all ldap servers in that realm serve that
-   one LDAP directory.  An network might have multiple, distinct LDAP
-   services, but only one LDAP "name service"; if so then clients could
-   not tell which LDAP service principals are authorized to serve which
-   directory, not without assuming a secure method for finding LDAP
-   servers (e.g., DNSSEC).  This is a significant, and oft-unstated
-   restriction on users of LDAP.
+   Domain-based names allow for GSS-API [RFC2743] initiator applications
+   (clients) to authorize acceptor principals (servers) to serve the
+   resource for which the client used insecure server discovery without
+   either securing the server discovery method nor requiring an
+   additional protocol for server authorization -- either a discovered
+   server has credentials for authenticating the domain-based service
+   names that it is intended to respond to, or it does not.
+   Availability of valid credentials for authenticating domain-based
+   names embodies the authorization of a given server to a domain-wide
+   service.
 
-   Domain based names can eliminate this problem: the use of domain-
-   based names should imply that the given host is a server for the
-   official LDAP name service of the given domain.
-
-   Notwithstanding the LDAP example the use of domain-based principal
-   names for LDAP is not actually specified here and will be specified
-   in a separate document.
-
    A domain-based name consists of three required elements:
 
    o  a service name
 
    o  a domain name
 
    o  a hostname
 
+   For the purposes of domain-based names a "domain" is defined by the
+   applications that use domain-based names.  An application protocol
+   might use a simple DNS domainname, such as "example.com" for naming,
+   while another it might use the DNS domainname of the SRV RRs it
+   queries (e.g., "_tcp._foo.example.com"), and yet another may use
+   something that does not resemble a DNS domainname.  Application
+   protocol specifications that provide for use of domain-based service
+   names MUST define the domain-portion of their domain-based names.
 
[...] 

 4.  Query and Display Syntaxes
 
    There is a single name syntax for domain-based names.
 
    The syntax is:
 
       domain-based-name :=
 
-         | <service> '@' <domain> '@' <hostname>
+         <service> '@' <domain> '@' <hostname>
 
-   Note that for Internet domain names the trailing '.' is not and MUST
-   NOT be included in the domain name (or hostname) parts of the display
-   form GSS-API domain-based MNs.
+   Note that for Internet domain names the trailing '.'  MUST NOT be
+   included in the hostname part of the display form GSS-API domain-
+   based MNs; hostnames MUST NOT contain '@'.
 
+4.1.  Examples of domain-based names
 
+   These examples are not normative:
 
+   o  [email-masked]@ds1.example.tld
 
+   o  [email-masked]@nfsroot1.example.tld
 
-5.  Examples
+5.  Application protocol examples
 
-   o  [email-masked]@ds1.example.tld
+   The following examples are not normative.  They describe how the
+   author envisions two applications' use of domain-based names.
 
-   o  [email-masked]@kdc1.example.tld
+5.1.  NFSv4 domain-wide namespace root server discovery
 
+   Work is ongoing to provide a method for constructing domain-wide
+   NFSv4 [RFC3530] filesystem namespaces where there is a single "root"
+   with one or more servers (replicas) and multiple filesystems glued
+   into the namespace through use of "referrals."  Clients could then
+   construct a "global" namespace through use of the DNS domain
+   hierarchy.
 
+   Here clients would always know, from context, when they need to find
+   the root servers for a given DNS domain.  Root server discovery would
+   be performed using DNS SRV RR lookups, without using DNSSEC where
+   DNSSEC has not been deployed.
 
+   When using RPCSEC_GSS [RFC2203] for security NFSv4 clients would then
+   use domain-based names to ensure that that the servers named in the
+   SRV RRs are in fact authorized to be the NFSv4 root servers for the
+   target domain.
 
+5.2.  LDAP server discovery
 
+   LDAP clients using the GSS-API through SASL too would benefit from
+   use of domain-based names to protect server discovery through
+   insecure DNS SRV RR lookups, much as described above.
 
+   Unlike NFSv4 clients, not all LDAP clients may always know from
+   context when they should use domain-based names.  That's because
+   existing clients may use host-based naming to authenticate servers
+   discovered through SRV RR lookups.  Changing such clients to use
+   domain-based naming when domain-based acceptor credentials have not
+   been deployed to LDAP servers, or when LDAP servers have not been
+   modified to allow use of domain-based naming, would break
+   interoperability.  That is, there is a legacy server interoperability
+   issue here.  Therefore LDAP clients may require additional
+   configuration at deployment time to enable (or disable) use of
+   domain-based naming.
 
+   Note: whether SASL [RFC4422] or its GSS-API bridges [I-D.ietf-sasl-
+   gssapi] [I-D.josefsson-sasl-gs2] require updates in order allow use
+   of domain-based names is not relevant to the theory of how domain-
+   based naming would protect LDAP clients' server discovery.
 
 6.  Security Considerations
 
    Use of GSS-API domain-based names may not be negotiable by some GSS-
    API mechanisms, and some acceptors may not support GSS-API domain-
    based names.  In such cases initiators are left to fallback on the
    use of hostbased names, in which case the initiators MUST also verify
    that the acceptor's hostbased name is authorized to provide the given
    service for the domain that the initiator had wanted.
 
    The above security consideration also applies to all GSS-API
    initiators who lack support for domain-based service names.

[...]

 7.1.  Normative
 
+   [RFC1035]  Mockapetris, P., "Domain names - implementation and
+              specification", STD 13, RFC 1035, November 1987.
+
    [RFC2119]  Bradner, S., "Key words for use in RFCs to Indicate
               Requirement Levels", BCP 14, RFC 2119, March 1997.
 
    [RFC2743]  Linn, J., "Generic Security Service Application Program
               Interface Version 2, Update 1", RFC 2743, January 2000.
 
-7.2.  Informative
+   [RFC2782]  Gulbrandsen, A., Vixie, P., and L. Esibov, "A DNS RR for
+              specifying the location of services (DNS SRV)", RFC 2782,
+              February 2000.
 
-   [RFC1964]  Linn, J., "The Kerberos Version 5 GSS-API Mechanism",
-              RFC 1964, June 1996.
+   [RFC4033]  Arends, R., Austein, R., Larson, M., Massey, D., and S.
+              Rose, "DNS Security Introduction and Requirements",
+              RFC 4033, March 2005.
 
-   [RFC2222]  Myers, J., "Simple Authentication and Security Layer
-              (SASL)", RFC 2222, October 1997.
+7.2.  Informative
 
-   [RFC3377]  Hodges, J. and R. Morgan, "Lightweight Directory Access
-              Protocol (v3): Technical Specification", RFC 3377,
-              September 2002.
+   [I-D.ietf-sasl-gssapi]
+              Melnikov, A., "The Kerberos V5 ("GSSAPI") SASL mechanism",
+              draft-ietf-sasl-gssapi-06 (work in progress), June 2006.
 
+   [I-D.josefsson-sasl-gs2]
+              Josefsson, S., "Using GSS-API Mechanisms in SASL: The GS2
+              Mechanism Family", draft-josefsson-sasl-gs2-00 (work in
+              progress), November 2005.
 
+   [RFC2203]  Eisler, M., Chiu, A., and L. Ling, "RPCSEC_GSS Protocol
+              Specification", RFC 2203, September 1997.
 
+   [RFC3530]  Shepler, S., Callaghan, B., Robinson, D., Thurlow, R.,
+              Beame, C., Eisler, M., and D. Noveck, "Network File System
+              (NFS) version 4 Protocol", RFC 3530, April 2003.
 
+   [RFC4422]  Melnikov, A. and K. Zeilenga, "Simple Authentication and
+              Security Layer (SASL)", RFC 4422, June 2006.