netconfcentral logo


  module ietf-voucher {

    yang-version 1.1;


    prefix vch;

    import ietf-yang-types {
      prefix yang;
        "RFC 6991: Common YANG Data Types";

    import ietf-restconf {
      prefix rc;
        "This import statement is only present to access
the yang-data extension defined in RFC 8040.";
        "RFC 8040: RESTCONF Protocol";


    organization "IETF ANIMA Working Group";

      "WG Web:   <>
    WG List:  <>
    Author:   Kent Watsen
    Author:   Max Pritikin
    Author:   Michael Richardson
    Author:   Toerless Eckert

      "This module defines the format for a voucher, which is produced by
    a pledge's manufacturer or delegate (MASA) to securely assign a
    pledge to an 'owner', so that the pledge may establish a secure
    connection to the owner's network infrastructure.

    The key words 'MUST', 'MUST NOT', 'REQUIRED', 'SHALL', 'SHALL NOT',
    the module text are to be interpreted as described in RFC 2119.

    Copyright (c) 2017 IETF Trust and the persons identified as
    authors of the code. All rights reserved.

    Redistribution and use in source and binary forms, with or without
    modification, is permitted pursuant to, and subject to the license
    terms contained in, the Simplified BSD License set forth in Section
    4.c of the IETF Trust's Legal Provisions Relating to IETF Documents

    This version of this YANG module is part of RFC XXXX; see the RFC
    itself for full legal notices.";

    revision "2017-10-25" {
      description "Initial version";
        "RFC XXXX: Voucher Profile for Bootstrapping Protocols";


    rc:yang-data "voucher-artifact";

    uses voucher-artifact-grouping;

    grouping voucher-artifact-grouping {
        "Grouping to allow reuse/extensions in future work.";
      container voucher {
          "A voucher assigns a pledge to an owner (pinned-domain-cert).";
        leaf created-on {
          type yang:date-and-time;
          mandatory true;
            "A value indicating the date this voucher was created.  This
           node is primarily for human consumption and auditing. Future
           work MAY create verification requirements based on this

        leaf expires-on {
          type yang:date-and-time;
          must "not(../nonce)";
            "A value indicating when this voucher expires.  The node is
           optional as not all pledges support expirations, such as
           pledges lacking a reliable clock.

           If this field exists, then the the pledges MUST ensure that
           the expires-on time has not yet passed. A pledge without
           an accurate clock cannot meet this requirement.

           The expires-on value MUST NOT exceed the expiration date
           of any of the listed 'pinned-domain-cert' certificates.";

        leaf assertion {
          type enumeration {
            enum "verified" {
              value 0;
                "Indicates that the ownership has been positively
               verified by the MASA (e.g., through sales channel
            enum "logged" {
              value 1;
                "Indicates that this ownership assignment has been
               logged into a database maintained by the MASA, after
               first verifying that there has not been a previous
               claim in the database for the same pledge (voucher
            enum "proximity" {
              value 2;
                "Indicates that this assertion is made based on
               the proximity of the signer as determined by
               local network information. This is useful for
               a pledge device to indicate it 'sees' a specific
               registrar on a TLS connection, or for a registrar
               to indicate it 'sees' a pledge.";
          mandatory true;
            "The assertion is a statement from the MASA regarding how
           the owner was verified.   This statement enables pledges
           to support more detailed policy checks.  Pledges MUST
           ensure that the assertion provided is acceptable before
           processing the voucher.";

        leaf serial-number {
          type string;
          mandatory true;
            "The serial number of the hardware.  When processing a
           voucher, a pledge MUST ensure that its serial number
           matches this value.  If no match occurs, then the
           pledge MUST NOT process this voucher.";

        leaf idevid-issuer {
          type binary;
            "The RFC5280 Authority Key Identifier OCTET STRING
           from the pledge's IDevID certificate.  Optional since some
           serial-numbers are already unique within the scope of a
           MASA.  Inclusion of the statistically unique key identifier
           ensures statistically unique identification of the hardware.
           When processing a voucher, a pledge MUST ensure that its
           IDevID Authority Key Identifier matches this value.  If no
           match occurs, then the pledge MUST NOT process this voucher.

           When issuing a voucher, the MASA MUST ensure that this field
           is populated for serial numbers that are not otherwise unique
           within the scope of the MASA.";

        leaf pinned-domain-cert {
          type binary;
          mandatory true;
            "An X.509 v3 certificate structure as specified by RFC 5280,
           Section 4 encoded using the ASN.1 distinguished encoding
           rules (DER), as specified in ITU-T X.690.

           This certificate is used by a pledge to trust a public key
           infrastructure, in order to verify a domain certificate
           supplied to the pledge separately by the bootstrapping
           protocol.  The domain certificate MUST have this certificate
           somewhere in its chain of certificates.  This certificate
           MAY be an end-entity certificate, including a self-signed
            "RFC 5280:
              Internet X.509 Public Key Infrastructure Certificate
              and Certificate Revocation List (CRL) Profile.
            ITU-T X.690:
               Information technology - ASN.1 encoding rules:
               Specification of Basic Encoding Rules (BER),
               Canonical Encoding Rules (CER) and Distinguished
               Encoding Rules (DER).";


        leaf domain-cert-revocation-checks {
          type boolean;
          must "../expires-on";
            "A processing instruction to the pledge that it MUST verify
           the revocation status for the domain certificate.  This
           instruction is only available for vouchers that expire. If
           this field is not set, then normal PKIX behaviour applies
           to validation of the domain certificate.";

        leaf nonce {
          type binary {
            length "8..32";
          must "not(../expires-on)";
            "A value that can be used by a pledge in some bootstrapping
           protocols to enable anti-replay protection.  This node is
           optional because it is not used by all bootstrapping

           When present, the pledge MUST compare the provided nonce
           value with another value that the pledge randomly generated
           and sent to a bootstrap server in an earlier bootstrapping
           message.  If the values do not match, then the pledge MUST
           NOT process this voucher.";

        leaf last-renewal-date {
          type yang:date-and-time;
          must "../expires-on";
            "The date that the MASA projects to be the last date it
           will renew a voucher on. This field is merely informative, it
           is not processed by pledges.

           Circumstances may occur after a voucher is generated that
           may alter a voucher's validity period.  For instance, a
           vendor may associate validity periods with support contracts,
           which may be terminated or extended over time.";
      }  // container voucher
    }  // grouping voucher-artifact-grouping
  }  // module ietf-voucher