[yang-doctors] policy for administrative key leaf values

Andy Bierman <andy@yumaworks.com> Fri, 17 March 2023 14:42 UTC

Return-Path: <andy@yumaworks.com>
X-Original-To: yang-doctors@ietfa.amsl.com
Delivered-To: yang-doctors@ietfa.amsl.com
Received: from localhost (localhost [127.0.0.1]) by ietfa.amsl.com (Postfix) with ESMTP id 93928C14CE39 for <yang-doctors@ietfa.amsl.com>; Fri, 17 Mar 2023 07:42:29 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -7.095
X-Spam-Level:
X-Spam-Status: No, score=-7.095 tagged_above=-999 required=5 tests=[BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, HTML_MESSAGE=0.001, RCVD_IN_DNSWL_HI=-5, RCVD_IN_ZEN_BLOCKED_OPENDNS=0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, URIBL_BLOCKED=0.001, URIBL_DBL_BLOCKED_OPENDNS=0.001, URIBL_ZEN_BLOCKED_OPENDNS=0.001] autolearn=ham autolearn_force=no
Authentication-Results: ietfa.amsl.com (amavisd-new); dkim=pass (2048-bit key) header.d=yumaworks.com
Received: from mail.ietf.org ([50.223.129.194]) by localhost (ietfa.amsl.com [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id oNh7cJdIDdUX for <yang-doctors@ietfa.amsl.com>; Fri, 17 Mar 2023 07:42:25 -0700 (PDT)
Received: from mail-lj1-x234.google.com (mail-lj1-x234.google.com [IPv6:2a00:1450:4864:20::234]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by ietfa.amsl.com (Postfix) with ESMTPS id 8B7EDC14CEFC for <yang-doctors@ietf.org>; Fri, 17 Mar 2023 07:42:25 -0700 (PDT)
Received: by mail-lj1-x234.google.com with SMTP id a32so5314813ljr.9 for <yang-doctors@ietf.org>; Fri, 17 Mar 2023 07:42:25 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yumaworks.com; s=google; t=1679064142; h=to:subject:message-id:date:from:mime-version:from:to:cc:subject :date:message-id:reply-to; bh=rLuxGUR4Ejh2LRd2MKUU6hNuf2alxKRdNt2cnW5lrnU=; b=K76YbNMJBZvH0447+Zma5scHSrs8uabrjOx4s4NcebKJ507lAIqbPMT/tSjEIAwKuy TiYZ5aG0Gne7CfVV6dfZ4JqGRDqXV/6BS9SNwXoXC5HWa325rF1UvCz0KYexuAG/E8wG NTTHckTly+iRpMyOKWj7Mitva5+fuOOm4GrQgcWFHKo7yUYz98Yr9hNMp9yq5ZOGTmCm FiURHLnCzzmXtVn/2cPYeFGueLGJ5Yq15ksQmgVdqHdYuPZphoxZ7kxRTD7sSoe3l7bL aADCVmbdjoFwXIGylL8jM1J3Nxrwn1WNPqMS3XEHbENrZwehwxQlEn2gETdo3t0h5f0/ BqWw==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; t=1679064142; h=to:subject:message-id:date:from:mime-version:x-gm-message-state :from:to:cc:subject:date:message-id:reply-to; bh=rLuxGUR4Ejh2LRd2MKUU6hNuf2alxKRdNt2cnW5lrnU=; b=jbv4FpJ/775lsGgKUXFR+gmBqS+5wPvXA883D28cqI4cIFlQEk4H1MHrCF106A6jwn cAKoinpG58vrDMdk2v++iyIivD3KiQlCr55RocdqNpuZQ+UJpcMeDm0cRybaEHFraQbe LAmOlLBtp79TfncGGGcVCGXgVJU/1qP4PqTZfZCvrvwYRJiP/O3vdkGCQPxs0DO+dbRx n0xaywop5RhrNluSrByypqsP3YGMFBTjcHK3ciWuilYJqZTR8O7uuoaXowUAFpAR9+CO 3hlhjBH1OYZIOCzfzVf7BIdFv39nt9obvqEmXRnyMjppsB85tRUCvnIm98J8FMGmPRib FofQ==
X-Gm-Message-State: AO0yUKWT+R7nPld3yp//CjNo40NsEopPeawNBksEy/dr+Ua4LdV8DFyj HZ3vNIk/YH9FdleUEjB5kDsVQvb9UtdBmNYF+i92/2Q1HPy2ocJ8
X-Google-Smtp-Source: AK7set+4XjK7F/njSthTW0nakDLSzL6gjfQzJ5x37g9sHZKR71cp6wTMn3YZeILMkiZW6SjL4BmSfF52J1sBw3iyYDI=
X-Received: by 2002:a2e:909a:0:b0:298:b32c:e4f0 with SMTP id l26-20020a2e909a000000b00298b32ce4f0mr2940546ljg.8.1679064142360; Fri, 17 Mar 2023 07:42:22 -0700 (PDT)
MIME-Version: 1.0
From: Andy Bierman <andy@yumaworks.com>
Date: Fri, 17 Mar 2023 07:42:11 -0700
Message-ID: <CABCOCHQh4DaN-iqpRo-LMOS3U0BO3HDV6NL4qoyA9zOzfw3WdA@mail.gmail.com>
To: YANG Doctors <yang-doctors@ietf.org>
Content-Type: multipart/alternative; boundary="000000000000c2c45805f71995c7"
Archived-At: <https://mailarchive.ietf.org/arch/msg/yang-doctors/Ajb0-tKtbH9R1gSoNngj2uIG2uc>
Subject: [yang-doctors] policy for administrative key leaf values
X-BeenThere: yang-doctors@ietf.org
X-Mailman-Version: 2.1.39
Precedence: list
List-Id: Email list of the yang-doctors directorate <yang-doctors.ietf.org>
List-Unsubscribe: <https://www.ietf.org/mailman/options/yang-doctors>, <mailto:yang-doctors-request@ietf.org?subject=unsubscribe>
List-Archive: <https://mailarchive.ietf.org/arch/browse/yang-doctors/>
List-Post: <mailto:yang-doctors@ietf.org>
List-Help: <mailto:yang-doctors-request@ietf.org?subject=help>
List-Subscribe: <https://www.ietf.org/mailman/listinfo/yang-doctors>, <mailto:yang-doctors-request@ietf.org?subject=subscribe>
X-List-Received-Date: Fri, 17 Mar 2023 14:42:29 -0000

Hi,

It would be nice to have a consistent guideline for designing admin keys.
This would improve interoperability

 Many modules use:

    leaf name { type string; }

There are many problems with this design, starting
with the fact that not one implementation in the world actually
supports the full 'string' character set. Developers must
use external info (not YANG) to know what is supported.

IMO the guidelines need to be updated and module
designers need to document the policies for a particular key leaf.
YD should refine and reach consensus on the guideline first.

Guidelines:
 - A typedef SHOULD be used for the key leaf type that
   specifies the following naming policies;

1) semantic policy
     It should be clear if the string has any semantics
     or is it purely an administrative string?

2) whitespace policy (leading, internal, trailing)

3) minimum length policy
   SHOULD be at least '1'.
   Need to justify need for zero-length identifiers.

4) maximum length policy
    - minimum max length (SHOULD be at least 64)
    - Use upper bound or 'max' in the length range.
       Use of 'max' can cause a too-big' error from a server.

5) special character policy
    - Are there any characters allowed by 'string' that can
      cause implementation-related problems or increase
      security risks?


Andy