Re: [netmod] rfc6991bis: inet:host

Juergen Schoenwaelder <j.schoenwaelder@jacobs-university.de> Sun, 26 July 2020 20:24 UTC

Return-Path: <j.schoenwaelder@jacobs-university.de>
X-Original-To: netmod@ietfa.amsl.com
Delivered-To: netmod@ietfa.amsl.com
Received: from localhost (localhost [127.0.0.1]) by ietfa.amsl.com (Postfix) with ESMTP id 7C7BB3A1430 for <netmod@ietfa.amsl.com>; Sun, 26 Jul 2020 13:24:34 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -1.899
X-Spam-Level:
X-Spam-Status: No, score=-1.899 tagged_above=-999 required=5 tests=[BAYES_00=-1.9, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, URIBL_BLOCKED=0.001] autolearn=ham autolearn_force=no
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 0C9vYujjhKmN for <netmod@ietfa.amsl.com>; Sun, 26 Jul 2020 13:24:31 -0700 (PDT)
Received: from atlas5.jacobs-university.de (atlas5.jacobs-university.de [212.201.44.20]) (using TLSv1.2 with cipher ADH-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ietfa.amsl.com (Postfix) with ESMTPS id 8A8473A142F for <netmod@ietf.org>; Sun, 26 Jul 2020 13:24:30 -0700 (PDT)
Received: from localhost (demetrius5.irc-it.jacobs-university.de [10.70.0.222]) by atlas5.jacobs-university.de (Postfix) with ESMTP id 29EA8814; Sun, 26 Jul 2020 22:24:29 +0200 (CEST)
X-Virus-Scanned: amavisd-new at jacobs-university.de
Received: from atlas5.jacobs-university.de ([10.70.0.198]) by localhost (demetrius5.jacobs-university.de [10.70.0.222]) (amavisd-new, port 10032) with ESMTP id fl7cYX5p_fPO; Sun, 26 Jul 2020 22:24:28 +0200 (CEST)
Received: from hermes.jacobs-university.de (hermes.jacobs-university.de [212.201.44.23]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "hermes.jacobs-university.de", Issuer "DFN-Verein Global Issuing CA" (verified OK)) by atlas5.jacobs-university.de (Postfix) with ESMTPS; Sun, 26 Jul 2020 22:24:28 +0200 (CEST)
Received: from localhost (demetrius5.irc-it.jacobs-university.de [10.70.0.222]) by hermes.jacobs-university.de (Postfix) with ESMTP id B093F20154; Sun, 26 Jul 2020 22:24:28 +0200 (CEST)
X-Virus-Scanned: amavisd-new at jacobs-university.de
Received: from hermes.jacobs-university.de ([212.201.44.23]) by localhost (demetrius5.jacobs-university.de [10.70.0.222]) (amavisd-new, port 10028) with ESMTP id 25KQ5hMkbgNS; Sun, 26 Jul 2020 22:24:28 +0200 (CEST)
Received: from localhost (anna.jacobs.jacobs-university.de [10.50.218.117]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by hermes.jacobs-university.de (Postfix) with ESMTPS id 4F03E200E4; Sun, 26 Jul 2020 22:24:28 +0200 (CEST)
Date: Sun, 26 Jul 2020 22:24:27 +0200
From: Juergen Schoenwaelder <j.schoenwaelder@jacobs-university.de>
To: tom petch <ietfc@btconnect.com>, "netmod@ietf.org" <netmod@ietf.org>
Message-ID: <20200726202427.oqythl6sggm4uzxe@anna.jacobs.jacobs-university.de>
Reply-To: Juergen Schoenwaelder <j.schoenwaelder@jacobs-university.de>
Mail-Followup-To: tom petch <ietfc@btconnect.com>, "netmod@ietf.org" <netmod@ietf.org>
References: <20200717191717.u5a3wv4nbajjdcaj@anna.jacobs.jacobs-university.de> <87ft9mzhe0.fsf@nic.cz> <20200721194434.pvekzgxaus43iihg@anna.jacobs.jacobs-university.de> <AM7PR07MB62482ED4917241DBCD08E7B7A0790@AM7PR07MB6248.eurprd07.prod.outlook.com> <20200722110030.6c7r6utxgjbsilkq@anna.jacobs.jacobs-university.de> <ff42e4cb-957c-a4f0-a88b-333a6565ed8e@nic.cz> <20200724083617.u3wkr34ehjezmusq@anna.jacobs.jacobs-university.de> <87a6zmifpo.fsf@nic.cz>
MIME-Version: 1.0
Content-Type: text/plain; charset="us-ascii"
Content-Disposition: inline
In-Reply-To: <87a6zmifpo.fsf@nic.cz>
Archived-At: <https://mailarchive.ietf.org/arch/msg/netmod/n1Q3HHYH17YQSoh3F5jdT-U7NVk>
Subject: Re: [netmod] rfc6991bis: inet:host
X-BeenThere: netmod@ietf.org
X-Mailman-Version: 2.1.29
Precedence: list
List-Id: NETMOD WG list <netmod.ietf.org>
List-Unsubscribe: <https://www.ietf.org/mailman/options/netmod>, <mailto:netmod-request@ietf.org?subject=unsubscribe>
List-Archive: <https://mailarchive.ietf.org/arch/browse/netmod/>
List-Post: <mailto:netmod@ietf.org>
List-Help: <mailto:netmod-request@ietf.org?subject=help>
List-Subscribe: <https://www.ietf.org/mailman/listinfo/netmod>, <mailto:netmod-request@ietf.org?subject=subscribe>
X-List-Received-Date: Sun, 26 Jul 2020 20:24:35 -0000

So would the following do the right thing?

    typedef host-name {
      type domain-name {
	pattern	'[a-zA-Z0-9\-\.]+';
        length "2..max";
      }
      description
        "Host names must be at least two characters long (see RFC 952)
         and they are restricted to labels consisting of letters, digits
       	 and hyphens separated by dots (see RFC1123 and RFC 952).";
      reference
        "RFC  952: DoD Internet Host Table Specification
	"RFC 1123: Requirements for Internet Hosts: Application and Support";
    }

/js

On Sun, Jul 26, 2020 at 03:11:15PM +0200, Ladislav Lhotka wrote:
> Juergen Schoenwaelder <j.schoenwaelder@jacobs-university.de> writes:
> 
> > On Wed, Jul 22, 2020 at 01:46:38PM +0200, Ladislav Lhotka wrote:
> >> 
> >> 
> >> On 22. 07. 20 13:00, Juergen Schoenwaelder wrote:
> >> > Tom,
> >> > 
> >> > my understanding is that Lada is now proposing something slightly
> >> > different but I am not sure what exactly, hence I asked again.
> >> 
> >> Oh yes, I messed it up by mixing different things together, sorry. I
> >> checked again the ML archive, and the message that is relevant to this
> >> thread is this:
> >> 
> >> https://mailarchive.ietf.org/arch/msg/netmod/PISOifrtow4oWLGW7meBBSri7nM/
> >> 
> >> The aim of that proposal was to limit the "inet:host" type to DNS names
> >> that are reasonable as host names, i.e. eliminate values like "." or "_".
> >
> > You are proposing to change the length restriction from 1..253 to
> > 2..253 following RFC 952:
> >
> >    [...] Single character names
> >    or nicknames are not allowed.
> >
> > And you add
> >
> >         pattern '(.*\.)?..\-\-.*' {
> >           modifier invert-match;
> >         }
> >
> > to restrict things to non-reserved letter-digit-hyphen labels as per
> > RFC 5890. Is it clear that this second restriction applies to host
> > names? How do you represent internationalized host names? Perhaps we
> > need a collection of examples? And is the pattern correct? RFC 5890
> > says:
> >
> >    Reserved LDH labels, known as "tagged domain names" in some other
> >    contexts, have the property that they contain "--" in the third and
> >    fourth characters but which otherwise conform to LDH label rules.
> >
> > What is the '(.*\.)?' part doing in your pattern?
> >
> > Finally, would it be useful to derive a host-name type from the
> > domain-name type (if host-names are really a strict subset of what
> > domain-name allows), e.g.:
> 
> The current definition of "inet:domain-name" in 6991bis also permits the underscore character in labels, so it is not LDH.
> 
> Lada
> 
> >
> >   typedef host-name {
> >     type domain-name {
> >       pattern '(.*\.)?..\-\-.*' {
> >         modifier invert-match;
> >       }
> >       length "2..max";
> >     }
> >     description
> >       "Host names  must be at least two characters long (see RFC 952)
> >        and they are restricted to non-reserved letter-digit-hyphen
> >        (NR-LDH) labels (see RFC ????).";
> >     reference
> >       "RFC  952: DoD Internet Host Table Specification
> >        RFC ????: ????";
> >   }
> >
> > /js
> >
> > -- 
> > Juergen Schoenwaelder           Jacobs University Bremen gGmbH
> > Phone: +49 421 200 3587         Campus Ring 1 | 28759 Bremen | Germany
> > Fax:   +49 421 200 3103         <https://www.jacobs-university.de/>
> 
> -- 
> Ladislav Lhotka 
> Head, CZ.NIC Labs
> PGP Key ID: 0xB8F92B08A9F76C67

-- 
Juergen Schoenwaelder           Jacobs University Bremen gGmbH
Phone: +49 421 200 3587         Campus Ring 1 | 28759 Bremen | Germany
Fax:   +49 421 200 3103         <https://www.jacobs-university.de/>