ANIMA Working Group                                            K. Watsen
Internet-Draft                                          Juniper Networks
Intended status: Standards Track                           M. Richardson
Expires: July 8, September 14, 2017                                                SSW                           Sandelman Software
                                                             M. Pritikin
                                                           Cisco Systems
                                                               T. Eckert
                                                         January 4,
                                                          March 13, 2017

              Voucher and Voucher Revocation Profiles Profile for Bootstrapping Protocols
                      draft-ietf-anima-voucher-00
                      draft-ietf-anima-voucher-01

Abstract

   This memo document defines the two artifacts "voucher" and "voucher-
   revocation", which are YANG-defined structures that have been signed
   by a TBD algorithm.

   The voucher artifact is generated by the device's manufacture or
   delegate.  The voucher's purpose is strategy to securely assign one or more
   devices a pledge to an owner.
   owner, using an artifact signed, directly or indirectly, by the
   pledge's manufacturer.  This artifact is known as a "voucher".

   The voucher informs each device which entity it
   should consider to be its owner. artifact is a YANG-defined JSON document that has been
   signed using a PKCS#7 structure.  The voucher revocation artifact is used generated
   by the manufacturer pledge's manufacture or delegate (i.e. the issuer of the voucher) to revoke vouchers, if
   ever necessary.  The voucher revocation format defined herein
   supports both issuer-wide and voucher-specific constructs, enabling
   usage flexibility.

   For both artifacts, this memo MASA).

   This document only defines the voucher artifact, leaving it to future work other
   documents to describe specialized protocols for accessing them. it.

Status of This Memo

   This Internet-Draft is submitted in full conformance with the
   provisions of BCP 78 and BCP 79.

   Internet-Drafts are working documents of the Internet Engineering
   Task Force (IETF).  Note that other groups may also distribute
   working documents as Internet-Drafts.  The list of current Internet-
   Drafts is at http://datatracker.ietf.org/drafts/current/.

   Internet-Drafts are draft documents valid for a maximum of six months
   and may be updated, replaced, or obsoleted by other documents at any
   time.  It is inappropriate to use Internet-Drafts as reference
   material or to cite them other than as "work in progress."

   This Internet-Draft will expire on July 8, September 14, 2017.

Copyright Notice

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

   This document is subject to BCP 78 and the IETF Trust's Legal
   Provisions Relating to IETF Documents
   (http://trustee.ietf.org/license-info) in effect on the date of
   publication of this document.  Please review these documents
   carefully, as they describe your rights and restrictions with respect
   to this document.  Code Components extracted from this document must
   include Simplified BSD License text as described in Section 4.e of
   the Trust Legal Provisions and are provided without warranty as
   described in the Simplified BSD License.

Table of Contents

   1.  Introduction  . . . . . . . . . . . . . . . . . . . . . . . .   2
   2.  Requirements Language  Terminology . . . . . . . . . . . . . . . . . . . . . . . . .   3
   3.  Tree Diagram Notation  Requirements Language . . . . . . . . . . . . . . . . . . . .   3   4
   4.  Survey of Voucher Types . . . . . . . . . . . . . . . . . . .   4
   5.  Voucher . . . . . . . .   4
     4.1.  Tree Diagram . . . . . . . . . . . . . . . . . . .   6
     5.1.  Tree Diagram  . . .   4
     4.2.  Examples . . . . . . . . . . . . . . . . . . .   7
     5.2.  Examples  . . . . .   4
     4.3.  YANG Module . . . . . . . . . . . . . . . . . . .   7
     5.3.  YANG Module . . . .   5
   5.  Voucher Revocation . . . . . . . . . . . . . . . . . . .   8
   6.  Design Considerations . .   9
     5.1.  Tree Diagram . . . . . . . . . . . . . . . . . .  14
     6.1.  Renewals instead of Revocations . . . .   9
     5.2.  Examples . . . . . . . . .  14
     6.2.  Voucher Per Pledge  . . . . . . . . . . . . . . .  10
     5.3.  YANG Module . . . .  16
   7.  Security Considerations . . . . . . . . . . . . . . . . . . .  11
   6.  Security Considerations  16
     7.1.  Clock Sensitivity . . . . . . . . . . . . . . . . . . . .  16
     6.1.  Clock Sensitivity
     7.2.  Protect Voucher PKI in HSM  . . . . . . . . . . . . . . .  16
     7.3.  Test Domain Certificate Validity when Signing . . . . . .  16
   7.
   8.  IANA Considerations . . . . . . . . . . . . . . . . . . . . .  16
     7.1.  17
     8.1.  The IETF XML Registry . . . . . . . . . . . . . . . . . .  16
     7.2.  17
     8.2.  The YANG Module Names Registry  . . . . . . . . . . . . .  17
   8.  Acknowledgements  . . . . . . . . . . . . . . . . . . . . . .  17
   9.  References  . . . . . . . . . . . . . . . . . . . . . . . . .  17
     9.1.  Normative References  . . . . . . . . . . . . . . . . . .  17
     9.2.  Informative References  . . . . . . . . . . . . . . . . .  18
   Appendix A.  Change Log . . .  Acknowledgements . . . . . . . . . . . . . . . . . .  19
   Authors' Addresses  . . . . . . . . . . . . . . . . . . . . . . .  19

1.  Introduction

   This document defines a strategy to securely assign devices a pledge to an
   owner, using an artifact signed, directly or indirectly, by the
   device's manufacturer.
   pledge's manufacturer or delegate (i.e. the MASA).  This artifact is
   known as the voucher.

   The voucher artifact is a JSON document, conforming to a data model
   described by YANG [RFC7950], that has been signed using a PKCS#7
   structure.

   A voucher may be useful in several contexts, but the driving
   motivation herein is to support secure bootstrapping mechanisms, such
   as are defined in [draft-ietf-netconf-zerotouch] and
   [draft-ietf-anima-bootstrapping-keyinfra]. mechanisms.
   Assigning ownership is important to bootstrapping mechanisms so that
   the booting device pledge can authenticate the network that's trying to take control
   of it.

   The lifetimes of vouchers may vary.  In some bootstrapping protocols
   the vouchers may be ephemeral, whereas in others the vouchers may be
   potentially long-lived.  In order to support the second category of
   vouchers, this document also defines a voucher revocation artifact, recommends using short-life vouchers with
   programatic renewal, enabling the manufacturer or delegate MASA to communicate the ongoing
   validity of
   its vouchers.

   For both artifacts, this memo

   This document only defines the voucher artifact, leaving it to future work other
   documents to describe specialized protocols for accessing them.

   This document uses YANG [RFC7950] to define it.  Some
   bootstrapping protocols using the voucher artifact defined in this
   draft include: [I-D.ietf-netconf-zerotouch],
   [I-D.ietf-6tisch-dtsecurity-secure-join], and voucher
   revocation formats.  YANG is
   [I-D.ietf-anima-bootstrapping-keyinfra]).

2.  Terminology

   The following terms are defined for clarity:

   Imprint:  The process where a data modeling language with
   established mappings device obtains the cryptographic key
      material to XML identify and JSON, trust future interactions with mappings to other
   encodings a network.
      This term is taken from Konrad Lorenz's work in progress.  Which encodings biology with new
      ducklings: during a particular solution uses critical period, the duckling would assume
      that anything that looks like a mother duck is in fact their
      mother.  An equivalent for a device is
   outside to obtain the scope fingerprint
      of the network's root certification authority certificate.  A
      device that imprints on an attacker suffers a similar fate to a
      duckling that imprints on a hungry wolf.  Securely imprinting is a
      primary focus of this document.

2.  Requirements Language document.[imprinting].  The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT",
   "SHOULD", "SHOULD NOT", "RECOMMENDED", "MAY", and "OPTIONAL" in the
   sections below are analogy to be interpreted as described
      Lorenz's work was first noted in RFC 2119
   [RFC2119].

3.  Tree Diagram Notation [Stajano99theresurrecting].

   Pledge:  The meaning prospective device attempting to find and join a secure
      remote key infrastructure.  When shipped it only trusts authorized
      representatives of the manufacturer.

   Voucher:  A signed statement from the MASA service that indicates to
      a Pledge the cryptographic identity of the symbols Registrar it should
      trust.  There are different types of vouchers depending on how
      that trust asserted.  This document describes vouchers in detail.

   Domain:  The set of entities that trust a common key infrastructure
      trust anchor.  This includes the above diagram is as follows:

   o  Brackets "[" and "]" enclose list keys.

   o  Braces "{" and "}" enclose feature names, Proxy, Registrar, Domain
      Certificate Authority, Management components and indicate any existing
      entity that is already a member of the
      named feature must be present for the subtree domain.

   Domain CA:  The domain Certification Authority (CA) provides
      certification functionalities to be present.

   o  Abbreviations before data node names: "rw" (read-write) represents
      configuration data and "ro" (read-only) represents state data.

   o  Symbols after data node names: "?" means an optional node, "!"
      means the domain.  At a presence container, and "*" denotes minimum it
      provides certification functionalities to a list Registrar and leaf-list.

   o  Parentheses enclose choice and case nodes, and case nodes are also
      marked with a colon (":").

   o  Ellipsis ("...") stands for contents stores
      the trust anchor that defines the domain.  Optionally, it
      certifies all elements.

   Join Registrar (and Coordinator):  A representative of subtrees the domain
      that are not
      shown.

4.  Voucher

   The voucher is generated by configured, perhaps autonomically, to decide whether a new
      device is allowed to join the device's manufacture or delegate. domain.  The voucher's purpose is administrator of the
      domain interfaces with a Join Registrar (and Coordinator) to securely assign one or more devices
      control this process.  Typically a Join Registrar is "inside" its
      domain.  For simplicity this document often refers to an
   owner. this as just
      "Registrar".  The voucher informs each device which entity it should
   consider to be its owner. term JRC is used in common with other bootstrap
      mechanisms.

   MASA Service:  A third-party Manufacturer Authorized Signing
      Authority (MASA) service on the global Internet.  The voucher MASA signs
      vouchers.  It also provides a repository for audit log information
      of privacy protected bootstrapping events.  It does not track
      ownership.  It is signed trusted by the device's manufacturer or delegate.
   NOTE: AT THIS TIME, THE SIGNING STRATEGY HAS NOT BEEN SELECTED.

4.1.  Tree Diagram

   Following Pledge.

   TOFU:  Trust on First Use. Used similarly to [RFC7435].  This is
      where a Pledge device makes no security decisions but rather
      simply trusts the tree diagram for first Registrar it is contacted by.  This is
      also known as the YANG module specified in
   Section 4.3.  Details regarding each node "resurrecting duckling" model.

3.  Requirements Language

   The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT",
   "SHOULD", "SHOULD NOT", "RECOMMENDED", "MAY", and "OPTIONAL" in the tree diagram
   sections below are
   provided to be interpreted as described in RFC 2119
   [RFC2119].

4.  Survey of Voucher Types

   A voucher is a cryptographically protected statement to the YANG module.  Please see Section 3 for information Pledge
   device authorizing a zero-touch "imprint" on
   tree diagram notation.

   module: ietf-voucher
       +--ro voucher
          +--ro assertion                 enumeration
          +--ro trusted-ca-certificate?   binary
          +--ro certificate-id
          |  +--ro cn-id?    string
          |  +--ro dns-id?   string
          +--ro unique-id*                string
          +--ro nonce?                    string
          +--ro created-on?               yang:date-and-time
          +--ro expires-on?               yang:date-and-time
          +--ro revocation-location?      inet:uri
          +--ro additional-data?

4.2.  Examples the Join Registrar of
   the domain.  The following illustrates an ephemeral specific information a voucher encoded in JSON:

   {
     "ietf-voucher:voucher": {
       "assertion": "logged",
       "trusted-ca-certificate": "base64-encoded X.509 DER",
       "owner-id": "Registrar3245",
       "unique-id": "JADA123456789",
       "created-on": "2016-10-07T19:31:42Z",
       "nonce": "987987623489567"
     }
   } provides is
   influenced by the bootstrapping use case.

   The voucher can impart the following illustrates a long-lived information to the Join
   Registrar and Pledge:

   Assertion Basis:  Indicates the method that protects the imprint
      (this is distinct from the voucher encoded signature that protects the
      voucher itself).  This might include manufacturer asserted
      ownership verification, assured logging operations or reliance on
      Pledge endpoint behavior such as secure root of trust of
      measurement.  The Join Registrar might use this information.  Only
      some methods are normatively defined in XML:

   <voucher
      xmlns="urn:ietf:params:xml:ns:yang:ietf-voucher">
     <assertion>verified</assertion>
     <trusted-ca-certificate>
       base64-encoded X.509 DER
     </trusted-ca-certificate>
     <certificate-id>
       <cn-id>Example Inc.</cn-id>  <!-- maybe this should be document.  Other
      methods are left for future work.

   Authentication of Join Registrar:  Indicates how the Pledge can
      authenticate the Join Registrar.  This might include an indication
      of the private PKIX trust anchor used by the Registrar, or an
      indication of a public PKIX trust anchor and additional CN-ID or
      DNS-ID information to complete authentication.  Symmetric key or
      other methods are left for future work.

   Anti-Replay Protections:  Time or nonce based information to
      constrain the voucher to time periods or bootstrap attempts.

   A number of bootstrapping scenarios can be met using differing
   combinations of this information.  All scenarios address the primary
   threat of a Man-in-The-Middle Registrar gaining control over the
   Pledge device.  The following combinations are "types" of vouchers:

                |Assertion   |Registrar ID    | Validity    |
   Voucher      |Log-|Veri-  |Trust  |CN-ID or| RTC | Nonce |
   Name         | ged|  fied |Anchor |DNS-ID  |     |       |
   ---------------------------------------------------------|
   Audit        |  X |       | X     |        |     | X     |
   -------------|----|-------|-------|--------|-----|-------|
   Nonceless    |  X |       | X     |        | X   |       |
   Audit        |    |       |       |        |     |       |
   -------------|----|-------|-------|--------|-----|-------|
   Owner Audit  |  X |   X   | X     |        | X   | X     |
   -------------|----|-------|-------|--------|-----|-------|
   Owner ID     |    |   X   | X     |  X     | X   |       |
   -------------|----|-------|----------------|-----|-------|
   Bearer       |  X |       |   wildcard     | optional    |
   out-of-scope |    |       |                |             |
   -------------|----|-------|----------------|-------------|

   NOTE: All voucher types include a 'Pledge ID serial number'
         (Not shown for space reasons)

   Audit Voucher:  An Audit Voucher is named after the logging assertion
      mechanisms that the Registrar then "audits" to enforce local
      policy.  The Registrar mitigates a MiTM Registrar by auditing that
      an unknown MiTM registrar does not appear in the log entries.
      This does not direct prevent the MiTM but provides a response
      mechanism that ensures the MiTM is unsuccessful.  This advantage
      is that actual ownership knowledge is not required on the MASA
      service.

   Nonceless Audit Voucher:  An Audit Voucher without a validity period
      statement.  Fundamentally the same as an Audit Voucher except that
      it can be issued in advance to support network partitions or to
      provide a permanent voucher for remote deployments.

   Ownership Audit Voucher:  An Audit Voucher where the MASA service has
      verified the Registrar as the authorized owner.  The MASA service
      mitigates a MiTM Registrar by refusing to generate Audit Voucher's
      for unauthorized Registrars.  The Registrar uses audit techniques
      to supplement the MASA.  This provides an ideal sharing of policy
      decisions and enforcement between the vendor and the owner.

   Ownership ID Voucher:  An Ownership ID Voucher is named after
      inclusion of the Pledge's CN-ID or DNS-ID within the voucher.  An
      example Ownership Voucher is defined in
      [I-D.ietf-netconf-zerotouch].  The MASA service mitigates a MiTM
      Registrar by identifying the specific Registrar authorized to own
      the Pledge.  [DISCUSS: still needed?]

   Bearer Voucher:  A Bearer Voucher is named after the inclusion of a
      Registrar ID wildcard.  Because the Registrar identity is not
      indicated this voucher type must be treated as a secret and
      protected from exposure as any 'bearer' of the voucher can claim
      the Pledge device.  Publishing a nonceless bearer voucher
      effectively turns the specified Pledge into a "TOFU" device with
      minimal mitigation against MiTM Registrars.  Bearer vouchers are
      out-of-scope.

5.  Voucher

   The voucher's purpose is to securely assign a pledge to an owner.
   The voucher informs the pledge which entity it should consider to be
   its owner.

   The voucher is signed a PKCS#7 SignedData structure, as specified by
   Section 9.1 of [RFC2315], encoded using ASN.1 distinguished encoding
   rules (DER), as specified in ITU-T X.690.

   The PKCS#7 structure MUST contain JSON-encoded content conforming to
   the YANG module specified in Section 5.3.

   The PKCS#7 structure MUST also contain a 'signerInfo' structure, as
   described in Section 9.1 of [RFC2315], containing the signature
   generated over the content using the MASA's private key.

   The PKCS#7 structure SHOULD also contain all of the certificates
   leading up to and including the MASA's trust anchor certificate known
   to the pledges.

5.1.  Tree Diagram

   The following tree diagram [I-D.bjorklund-netmod-yang-tree-diagrams]
   illustrates a high-level view of a voucher document.  Each field in
   the voucher is fully described by the YANG module provided in
   Section 5.3.  Please review this YANG module for a detailed
   description of the voucher format.

   module: ietf-voucher
     +--ro voucher
        +--ro authority-key-identifier?         binary
        +--ro created-on                        yang:date-and-time
        +--ro expires-on?                       yang:date-and-time
        +--ro assertion                         enumeration
        +--ro device-identifier                 string
        +--ro trusted-ca-certificate            binary
        +--ro domain-certificate-identifier
        |  +--ro subject?   binary
        |  +--ro cn-id?     string
        |  +--ro dns-id?    string
        +--ro assert-certificate-revocations?   boolean
        +--ro nonce?                            binary
        +--ro last-renewal-date?                yang:date-and-time

5.2.  Examples

   This section provides a couple Voucher examples for illustration
   purposes.

   The following example illustrates an ephemeral voucher (uses a nonce)
   encoded in JSON.  As is expected with a dynamically-generated
   voucher, only a single pledge (device-identifier) is specified.  The
   MASA generated this voucher using the 'logged' assertion type,
   knowing that it would be suitable for the pledge making the request.

   {
     "ietf-voucher:voucher": {
       "assertion": "logged",
       "trusted-ca-certificate": "base64-encoded X.509 DER",
       "device-identifier": "JADA123456789",
       "created-on": "2016-10-07T19:31:42Z",
       "nonce": "base64-encoded octet string"
     }
   }

   The following illustrates a long-lived voucher (no nonce), encoded in
   XML.  This particular voucher applies to more than one pledge
   (unique-id), which might relate to, for instance, they were all
   issued as part of the same purchase order.  This voucher includes
   both a trust anchor certificate (trusted-ca-certificate) as well as
   some additional information (cn-id and dns-id) that can be used to
   identify a DN? -->
       <dns-id>example.com</dns-id>
     </certificate-id>
     <unique-id>AAA123456789</unique-id>
     <unique-id>BBB123456789</unique-id>
     <unique-id>CCC123456789</unique-id>
     <created-on>2016-10-07T19:31:42Z</created-on>
   </voucher>

4.3. specific domain certificate issued, perhaps indirectly, by
   the trust anchor CA.

   {
     "ietf-voucher:voucher": {
       "assertion": "verified",
       "trusted-ca-certificate": "base64-encoded X.509 DER",
       "domain-certificate-identifier": {
         "subject": "base64-encoded Subject DER"
       },
       "device-identifier": "JADA123456789",
       "created-on": "2016-10-07T19:31:42Z"
     }
   }

5.3.  YANG Module

 <CODE BEGINS> file "ietf-voucher@2017-01-04.yang" "ietf-voucher@2017-03-13.yang"

 module ietf-voucher {
   yang-version 1.1;

   namespace
     "urn:ietf:params:xml:ns:yang:ietf-voucher";
   prefix "vch";

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

   import ietf-inet-types ietf-restconf {
     prefix inet; rc;
     description
       "This import statement is only present to access the yang-data
        extension defined in RFC 8040.  The yang-data extension doesn't
        itself have anything to do with RESTCONF, but was placed in the
        that RFC for convenience.  This extension is being tracked to
        be moved to the next version of the YANG modeling language.
        Regardless where or how this extension statement is defined,
        there should not be any impact to a voucher's encoding.";
     reference "RFC 8040: RESTCONF Protocol";
   }

   organization
    "IETF ANIMA Working Group";

   contact
    "WG Web:   <http://tools.ietf.org/wg/anima/>
     WG List:  <mailto:anima@ietf.org>
     Author:   Kent Watsen
               <mailto:kwatsen@juniper.net>
     Author:   Max Pritikin
               <mailto:pritikin@cisco.com>
     Author:   Michael Richardson
               <mailto:mcr+ietf@sandelman.ca>";

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

   revision "2017-01-04" "2017-03-13" {
     description
      "Initial version";
     reference
      "RFC XXXX: Voucher and Voucher Revocation Profiles Profile for Bootstrapping Protocols";
   }

  // top-level container
  container voucher {
    config false;
    description
      "A voucher that can be used to assign one or more devices to
       an owner.";

   rc:yang-data voucher-artifact {
     uses voucher-grouping;
   }

   grouping voucher-grouping {
     description
       "Grouping only exists for pyang tree output...";

     container voucher {
       config false;
       description
         "A voucher that can be used to assign one or more
          pledges to an owner.";

       leaf authority-key-identifier {
         type binary;
         description
          "The Subject Key Identifier of the MASA's leaf certificate.
           Enables the pledge a definitively identify the voucher's
           issuer's certificate.  This field is optional as not all
           vouchers will be signed by a private key associated with
           an X.509 certificate.";
       }

       leaf created-on {
         type yang:date-and-time;
         mandatory true;
         description
           "A value indicating the date this voucher was created.  This
            node is optional because its primary purpose is for human
            consumption.  However, when present, pledges that have
            reliable clocks SHOULD ensure that this created-on value
            is not greater than the current time.";
       }

       leaf expires-on {
         type yang:date-and-time;
         must "not ../nonce";
         description
           "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 the pledge supports expirations and the expires-on value
            is less then the current time, then the pledge MUST not
            process this voucher.";
       }

       leaf assertion {
         type enumeration {
           enum verified {
             description
               "Indicates that the ownership has been positively
                verified by the device's manufacturer or delegate MASA (e.g., through sales channel
                integration).";
           }
           enum logged {
             description
               "Indicates that this ownership assignment has been
                logged into a database maintained by the device's
             manufacturer or delegate MASA, after
                first verifying that there has not been a previous
                claim in the database for the same pledge (voucher
                transparency).";
           }
         }
         mandatory true;
         description
           "The assertion is a statement from the manufacturer or
         delegate MASA regarding how
            the nature of this voucher. owner was verified.   This
         allows the device statement enables pledges
            to know what assurance the manufacturer
         provides, which supports support more detailed policy checks
         such as 'I only want to allow verified devices, not
         just logged devices'."; checks.  Pledges MUST
            ensure that the assertion provided is acceptable before
            processing the voucher.";
       }

       leaf device-identifier {
         type string;
         mandatory true;
         description
           "A unique identifier (e.g., serial number) within the scope
            of the MASA.

            When processing a vouchers, pledges MUST ensure that their
            unique identifier matches at least one regular expression in
            the list.  If no matching regular expression is found, the
            pledge MUST NOT process this voucher.";
       }

       leaf trusted-ca-certificate {
         type binary;
         mandatory true;
         description
           "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 bootstrapping device pledge to trust another a public key
            infrastructure, in order to verify another a domain certificate
            supplied to the device pledge separately by the bootstrapping protocol, the other
            protocol.  The domain certificate must MUST have this certificate
            somewhere in its chain of certificates."; certificates.

            This field is optional because it may not be needed by all
            bootstrapping protocols.

            Note: the expiration date of this certificate effectively
                  imposes an upper limit on the voucher's expiration.";

         reference
           "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).";
    }

    container certificate-id Distinguished
               Encoding Rules (DER).";
       }

       // DISCUSS: do we need this anymore, if short-lived vouchers
       // are expected, shouldn't the leaf certificate be pinned, or
       // perhaps just the immediate issuer CA?
       container domain-certificate-identifier {
         must "../trusted-ca-certificate" {
           description
             "A trusted-ca-certificate must be present whenever
              this node is present";
         }
         description
           "This container identifies specific values that a domain
            certificate, provided to the pledge separately by the
            bootstrapping protocol, MUST contain.  This is useful
            when, for instance, the trust anchor is a long-lived
            public CA certificate, while the domain certificate is
            reissued periodically.

            When provided, the pledge MUST perform RFC 6125 style
            validation of the domain certificate against all of
            the provided values.

            This container is optional because it is unneeded when,
            for instance, the trusted CA certificate is owned by the
            domain (i.e.  a private PKI), and hence the trust model
            can be more relaxed.";

         leaf subject {
           type binary;
           description
        "When provided, the device
             "The certificate's entire subject field MUST also perform RFC 6125
         style validation of another certificate supplied to match
              this value.  This value is the device separately Subject structure, as
              specified by RFC ???? Section ???, encoded using the bootstrapping protocol
         against all the provided ids.";
              ASN.1 distinguished encoding rules (DER), as specified
              in ITU-T X.690.";
         }
         leaf cn-id {
           type string;
           description
             "The common name field in the cetificate must certificate's subject field's 'common name' value
              MUST match this value.";
         }
         leaf dns-id {
           type string;
           description
             "A subjectAltName entry of type dNSName in the
              certificate must MUST match this value.";
         }
       }

    leaf-list unique-id {
      type string;
      min-elements 1;
      description
        "A regular expression identifying one more more device
         unique identifiers (e.g., serial numbers).  For instance,
         the expression could match just a single serial number,
         or it might match a range of serial numbers.  Devices
         use this value to determine if the voucher applies to
         them.";

       // Ed. both DISCUSS: does the zerotouch and brwski solutions are devid
         // oriented, and so renaming this field to 'serial-number'
         // wouldn't be crazy.  But devid/serial-number (typically)
         // assumes physical chassis, is it worth using this
         // term which might extend transition to e.g. virtual appliances?
    }

    leaf nonce {
      type string;  // unit64?
      description
        "what 'pinning' model mean we can be said about this that's ANIMA-neutral?";
    }

    leaf created-on {
      type yang:date-and-time;
      description
        "The date
       // drop this voucher was created";
    } leaf expires-on {
      type yang:date-and-time;
      description
        "An optional date value for when this voucher expires.";
    }

    leaf revocation-location {
      type inet:uri;
      description
        "A URI indicating where revocation information may now? future proofing allows it to be
         obtained.";
    }

    anydata additional-data {
      description
        "Additional data signed by the manufacturer.  The manufacturer
         might put additional data into its vouchers, for human or
         device consumption."; added
       // Ed. is the additional data normative? - if so, should we
         // remove this free-form field, and assume it will be formally needed but its a edge condition?
       // extended later?  Note: the zerotouch draft doesn't need this
       // field...
    }
  }

}

<CODE ENDS>

5.  Voucher Revocation

   The vouchers revocation artifact is used DISCUSS: there must be such future proofing. not clear where
       // to verify the revocation
   status of vouchers.  Voucher revocations are signed by add it in the
   manufacturer or delegate (i.e. voucher document. This is probably the issuer most
       // important point of these discusses
       leaf assert-certificate-revocations {
         type boolean;
         must "../expires-on";
         default true;
         description
           "A processing instruction to the voucher).  Vouchers
   revocation statements MAY be verified by devices during the
   bootstrapping process, or at any time before or after by any entity
   (e.g., registrar or equivalent) as needed.  Registrars or equivalent
   SHOULD device that it should
            verify voucher revocation statements and make policy decisions
   in case devices are not doing so themselves.

   Revocations are generally needed when it is critical information for devices to
   know that assurances implied at the time the voucher was signed are
   still valid at the time PKIX certificates
            involved in bootstrapping. This is available only if
            the voucher pledge has a real-time-clock. This is being processed.

   As mentioned in Section 1, the lifetimes of vouchers may vary.  In
   some bootstrapping protocols addition
            to any revocation checks performed by the vouchers may MASA.";

           // DISCUSS: should this be ephemeral, whereas
   in others a boolean or an enum indicating
           // "fail open" vs "fail closed" to make the vouchers may meaning clearer.
       }

       leaf nonce {
         type binary {
           length "8..32";
         }
         must "not ../expires-on";
         description
           "A value that can be potentially long-lived.  For used by a pledge in some bootstrapping
            protocols that support ephemeral vouchers, there is no
   need to support revocations.  For enable anti-replay protection.  This node is
            optional because it is not used by all bootstrapping protocols
            protocols.

            When present, the pledge MUST compare the provided nonce
            value with another value that
   support long-lived vouchers, the need pledge randomly generated
            and sent to support revoking vouchers is a decision for each manufacturer. bootstrap server in an earlier bootstrapping
            message.  If revocations are 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";
         description
           "The last date that the MASA projects to be the last date it
            will renew a voucher on (assuming the same validity duration
            used in this voucher.  This field is merely infomrative, it
            is not supported then processed by pledges.

            Circustances may occur after when a voucher assignments are
   essentially forever, was generated
            that can alter a voucher's validity period.  For instance,
            a vendor may associate validity periods with support
            contracts, which may be acceptable for various kinds terminated or extended over time.";
       }

     } // end voucher
   } // end voucher-grouping
 }

 <CODE ENDS>

6.  Design Considerations

6.1.  Renewals instead of
   devices.  If revocations are supported, then it becomes possible Revocations

   A revocation artifact is generally used to
   support various scenarios verify the continued
   validity of an assertion such as handling a key compromise PKIX certificate, web token, or change
   in ownership.

   The voucher revocation format defined herein supports both issuer-
   wide (similar to a CRL) or voucher-specific (similar to an OCSP
   response) constructs, enabling usage flexibility.

   NOTE: AT THIS TIME, THE SIGNING STRATEGY HAS NOT BEEN SELECTED.

5.1.  Tree Diagram

   Following is the tree diagram
   "voucher".  Conceptually revocation allows for issuance of assertions
   using long lifetimes and thereby avoiding ongoing protocol operations
   to renew the YANG module specified in
   Section 5.3.  Details regarding each node in the tree diagram are
   provided in assertion.  In practice the YANG module.  Please see Section 3 for information on
   tree diagram notation.

   module: ietf-voucher-revocation
       +--ro voucher-revocation
          +--ro revocation-type     enumeration
          +--ro created-on          yang:date-and-time
          +--ro expires-on?         yang:date-and-time
          +--ro (voucher-revocation-type)?
          |  +--:(issuer-wide)
          |  |  +--ro issuer-wide
          |  |     +--ro (list-type)?
          |  |        +--:(whitelist)
          |  |        |  +--ro whitelist
          |  |        |     +--ro voucher-identifier*   string
          |  |        +--:(blacklist)
          |  |           +--ro blacklist
          |  |              +--ro voucher-identifier*   string
          |  +--:(voucher-specific)
          |     +--ro voucher-specific
          |        +--ro voucher-identifier        string
          |        +--ro voucher-status            enumeration
          |        +--ro revocation-information
          |           +--ro revoked-on           yang:date-and-time
          |           +--ro revocation-reason    enumeration
          +--ro additional-data?

5.2.  Examples

   The following illustrates an issuer-wide voucher revocation in XML:

   <voucher-revocation
      xmlns="urn:ietf:params:xml:ns:yang:ietf-voucher-revocation">
     <revocation-type>issuer-wide</revocation-type>
     <created-on>2016-10-31T23:59:59Z</created-on>
     <expires-on>2016-12-31T23:59:59Z</expires-on>
     <issuer-wide>
       <blacklist>
         <voucher-identifier>some fingerprint</voucher-identifier>
         <voucher-identifier>some fingerprint</voucher-identifier>
         <voucher-identifier>some fingerprint</voucher-identifier>
       </blacklist>
     </issuer-wide>
   </voucher>

   The following illustrates a voucher-specific use of revocation in JSON:

   {
     "ietf-voucher-revocation:voucher-revocation": {
       "revocation-type": "voucher-specific",
       "created-on": "2016-10-31T23:59:59Z"
       "expires-on": "2016-12-31T23:59:59Z"
       "voucher-specific": [
         "voucher-identifier": "some fingerprint",
         "voucher-status": "revoked",
         "revocation-information": [
           "revoked-on": "2016-11-31T23:59:59Z",
           "revocation-reason": "key-compromise"
         ]
       ]
     }
   }

5.3.  YANG Module

<CODE BEGINS> file "ietf-voucher-revocation@2017-01-04.yang"

module ietf-voucher-revocation {
  yang-version 1.1;

  namespace
    "urn:ietf:params:xml:ns:yang:ietf-voucher-revocation";
  prefix "vr";

  import ietf-yang-types { prefix yang; }

  organization
   "IETF ANIMA Working Group";

  contact
   "WG Web:   <http://tools.ietf.org/wg/anima/>
    WG List:  <mailto:anima@ietf.org>
    Author:   Kent Watsen
              <mailto:kwatsen@juniper.net>
    Author:   Max Pritikin
              <mailto:pritikin@cisco.com>
    Author:   Michael Richardson
              <mailto:mcr+ietf@sandelman.ca>";

  description
   "This module defines the format for a voucher revocation,
    which is produced by artifacts
   increases the solution complexity.  Rather than a manufacturer single protocol, or delegate
   operation, to indicate obtain or renew the revocation status of vouchers.";

  revision "2017-01-04" {
    description
     "Initial version";
    reference
     "RFC XXXX: Voucher assertion the resulting solution
   instead has two or more protocols: one for assertion maintanence and Voucher Revocation Profiles
   the other(s) for Bootstrapping Protocols";
  }

  // top-level container
  container voucher-revocation {
    config false;
    description
      "A voucher revocation verification.

   The PKIX use of CRLs and OCSP responses provides an illustrative
   example.  Relying parties that can provide verify revocation status information for one must
   obtain and parse the CRL or more devices.";

    leaf revocation-type {
      type enumeration {
        enum issuer-wide {
          description
            "Indicates that this OCSP information.  Each revocation spans all
             the vouchers the issuer method
   has issued to date";
        }
        enum voucher-specific {
          description
            "Indicated its own validity period that this revocation only regards
             a single voucher.";
        }
      }
      mandatory true;
      description
        "The revocation-type indicates if effectively shortens the certificate
   validity period (since without valid revocation
         is issuer-wide or voucher-specific.  Both variations
         exist to enable implementations checks the
   certificate would be rejected).  In addition to choose between having multiple
   revocation protocol options the
         number resulting space is further
   complicated by inline distribution of the revocation artifacts generated versus
         individual artifact size.";
    }

    leaf created-on {
      type yang:date-and-time;
      mandatory true;
      description
        "The date this voucher was created";
    }

    leaf expires-on {
      type yang:date-and-time;
      description
        "An optional date value information.
   The TLS extension "Certificate Status Request" [RFC6066] for when this voucher expires.";
    }
    choice voucher-revocation-type {
      description
        "Identifies the revocation type as being either issuer-wide
         or voucher-specific.";

      container issuer-wide {
        description
          "This revocation provides issuer-wide revocation status
           (similar
   "constrained clients may wish to use a CRL).";

        choice list-type {
          description
            "Indentifies if this issuer-wide certificate-status protocol"
   is an example of this.  Including revocation information into
   Cryptographic Message Syntax [RFC5652] is provided
             in the form another example.

   If vouchers included revocation similar complexities would propagate
   to all related voucher distribution and assertion protocols.  Instead
   vouchers do not support revocation.  Instead of a whitelist the asserting party,
   or a blacklist";

          container whitelist {
            leaf-list voucher-identifier {
              type string;
              description
                "A fingerprint over relying party, obtaining and distributing revocation information
   the asserting party MUST obtain an up-to-date valid voucher.  The
   protocol and operations infrastructures for this are expected to be
   the same as the initial methods used to obtain a voucher artifact.";
            }
            description
              "Indicates that in the listed of first
   place, with one important clarification: the MASA services MUST issue
   updated validity period vouchers are known to be good.  If the same Registrar ID with
   minimal friction.  This is similar to how an OCSP revocation system
   is always willing to confirm that a voucher certificate is not listed, then
               it is considered revoked.";
          }

          container blacklist {
            leaf-list voucher-identifier {
              type string;
              description
                "A fingerprint over the voucher artifact.
                 Missing if list revoked.
   There is empty.";
            }
            description
              "Indicates no requirement implied that the list of vouchers have been
               revoked.  If be contiguously
   renewed.  For example if a two-week lifetime voucher is not listed, then used
   before it expires there is considered good.";
          }

        } // end list-type

      } // end issuer-wide

      container voucher-specific {
        description
          "This revocation provides voucher-specific revocation
           status (similar no requirement that it be still valid when
   renewed.  The domain MAY renew an expired voucher at any time.  The
   MASA always has authoritative control and MAY reject such renewals
   (such as when requested by domain owner's to "block" renewals or if
   the device has been successfully claimed by an OCSP response).";

        leaf voucher-identifier {
          type string;
          mandatory true;
          description
            "A fingerprint over alternate domain).
   Allowing non-contiguous lifetimes significantly reduces the voucher artifact.";
        }

        leaf voucher-status {
          type enumeration {
            enum good {
              description
                "Indicates that this voucher
   operational load on the domain as it is valid";
            }
            enum revoked {
              description
                "Indicates that this not required to maintain
   valid vouchers; only to ensure a valid voucher is invalid";
            }
            enum unknown {
              description
                "Indicates that available during
   the voucher's status time window in which it needs to be used.

   [[EDNOTE: It might be worth including an indication of maximum
   lifetime for which such automated renewal is unknown";
            }
          }
          mandatory true;
          description
            "Indicates if available.  If so the revocation status for
   language we'd use would be similar to the specified
             voucher.";
        }

        container revocation-information {
          must "../voucher-status = 'revoked'";

          leaf revoked-on {
            type yang:date-and-time;
            mandatory true;
            description
              "The date this voucher was revoked";
          }

          leaf revocation-reason {
            type enumeration {
              enum unspecified {
                description
                  "Indicates RFC5280 statement that the reason the voucher
                   was revoked
   certificate validity period is unspecified.";
              }
              enum key-compromise {
                description
                  "Indicates that the reason "the time interval during which the voucher
                   was revoked is because its key was
                   compromised.";
              }
              enum issuer-compromise {
                description
                  "Indicates CA
   warrants that it will maintain information about the reason the voucher
                   was revoked is because its issuer was
                   compromised.";
              }
              enum affiliation-changed {
                description
                  "Indicates status of the
   certificate" only here used to inform the Registrar of "the time
   interval during which the MASA warrants that it will maintain
   information about the reason status of the voucher
                   was revoked is because its affiliation
                   changed (e.g., device assigned to ownership claim".  Such a
                   new owner.";
              }
              enum superseded {
                description
                  "Indicates that field
   would be independent of the reason actual validity period of the voucher
                   was revoked and
   is because it has been
                   superseded (e.g., the previous voucher
                   expired.";
              }
              enum cessation-of-operation {
                description
                  "Indicates that not intended for consumption by the reason Pledge.  A suggested name for
   this field would be "last-renewal-date".]]

   The communications to the voucher
                   was revoked MASA service regarding claiming and
   blocking of devices is because its issuer has
                   ceased operations.";
              }
            }  // end enumeration

            mandatory true;
            description
              "modeled after 'CRLReason' in RFC 5280.";
          } // end out of scope of this specification.  Similarly
   if revocation reason

          description
            "Provides details regarding why methods had been described, the method of reporting a voucher's revocation.
             Modeled after 'ResponseData'
   revocation would have been out-of-scope.

   The lifetimes of vouchers may vary.  In some bootstrapping protocols
   the vouchers may be ephemeral, whereas in RFC6960.";

        } // end revocation-information

      } // end voucher-specific
    }

    anydata additional-data {
      description
        "Additional data signed by others the manufacturer.  The manufacturer
         might put additional data into its voucher revocations, for
         human or device consumption.";

         // Ed. vouchers may be
   potentially long-lived.  For bootstrapping protocols that support
   ephemeral vouchers, there is the no need to support renewal.  For
   bootstrapping protocols that support long-lived vouchers, final
   protocol complexity is reduced when short lifetime vouchers are
   easily renewed rather than layering on additional data normative? - revocation methods.
   Manufacturers MAY issue long-lived vouchers to customers if so, should we
         // remove this free-form field, and assume required
   but no revocation method is described.

6.2.  Voucher Per Pledge

   The solution originally enabled a single voucher to apply to many
   pledges, using lists of regular expressions to represent ranges of
   serial numbers.  However, it will was determined that blocking the renewal
   of a voucher that applied to many devices, would be formally
         // extended later?  Note: excessive when
   only the zerotouch draft doesn't need this
         // field...
    }

  }
}

<CODE ENDS>

6. ownership for a single pledge needed to be blocked.

7.  Security Considerations

6.1.

7.1.  Clock Sensitivity

   This document defines artifacts containing time values for voucher
   expirations and revocations,
   expirations, which require an accurate clock in order to be processed
   correctly.  Implementations  Vendors planning on issuing vouchers with expiration
   values MUST ensure devices have an accurate clock when shipped from
   manufacturing facilities, and take steps to prevent clock tampering.
   If it is not possible to ensure clock accuracy, it accuracy then vouchers with
   expirations SHOULD NOT be issued.

7.2.  Protect Voucher PKI in HSM

   This document favors using voucher-renewals over needing to support
   voucher-revocations (Section 6.1).  However, a voucher may be signed
   by a chain of intermediate CAs leading to the trust anchor known to a
   pledge.  Revocation checking of these certificates is RECOMMENDED
   that implementations disable similarly
   difficult.  The current voucher format supports the existing PKIX
   revocation information distribution within the aspects limits of the solution having clock
   sensitivity.  In particular, such current
   PKI technology; but pledges MAY accept vouchers without checking
   X.509 certificate revocation.  Without revocation checking, a
   compromized MASA keychain could be used to issue vouchers ad
   infinitum without recourse.  For this reason, MASA implementations should assume
   SHOULD ensure that
   vouchers neither ever expire or all the CA private keys are revokable.

   It protected by hardware
   security modules (HSMs).

7.3.  Test Domain Certificate Validity when Signing

   If a domain certificate is important compromised, then any outstanding vouchers
   for that domain could be used by the attacker.  The domain
   administrator is clearly expected to initiate revocation of any
   domain identity certificates (as in normal in PKI solutions).
   Similarly they are expected to contact the MASA to note indicate that implementations SHOULD NOT rely on NTP an
   outstanding (presumably short lifetime) voucher be blocked from
   automated renewal.  Protocols for time, as it is not a secure protocol.

7. voucher distribution are
   RECOMMENDED to check for revocation of any domain identity
   certificates before automated renewal of vouchers.

8.  IANA Considerations

7.1.

8.1.  The IETF XML Registry

   This document registers two a URIs in the IETF XML registry [RFC3688].
   Following the format in [RFC3688], the following registrations are registration is
   requested:

      URI: urn:ietf:params:xml:ns:yang:ietf-voucher
      Registrant Contact: The ANIMA WG of the IETF.
      XML: N/A, the requested URI is an XML namespace.

      URI: urn:ietf:params:xml:ns:yang:ietf-voucher-revocation
      Registrant Contact: The ANIMA WG of the IETF.
      XML: N/A, the requested URI is an XML namespace.

7.2.

8.2.  The YANG Module Names Registry

   This document registers two a YANG modules module in the YANG Module Names
   registry [RFC6020].  Following the format defined in [RFC6020], the
   the following registrations are registration is requested:

      name:         ietf-voucher
      namespace:    urn:ietf:params:xml:ns:yang:ietf-voucher
      prefix:       vch
      reference:    RFC XXXX

      name:         ietf-voucher-revocation
      namespace:    urn:ietf:params:xml:ns:yang:ietf-voucher-revocation
      prefix:       vchr
      reference:    RFC XXXX

8.  Acknowledgements

   The authors would like to thank for following for lively discussions
   on list and in the halls (ordered by last name):

9.  References

9.1.  Normative References

   [RFC2119]  Bradner, S., "Key words for use in RFCs to Indicate
              Requirement Levels", BCP 14, RFC 2119,
              DOI 10.17487/RFC2119, March 1997,
              <http://www.rfc-editor.org/info/rfc2119>.

   [RFC2315]  Kaliski, B., "PKCS #7: Cryptographic Message Syntax
              Version 1.5", RFC 2315, DOI 10.17487/RFC2315, March 1998,
              <http://www.rfc-editor.org/info/rfc2315>.

   [RFC6020]  Bjorklund, M., Ed., "YANG - A Data Modeling Language for
              the Network Configuration Protocol (NETCONF)", RFC 6020,
              DOI 10.17487/RFC6020, October 2010,
              <http://www.rfc-editor.org/info/rfc6020>.

   [RFC7950]  Bjorklund, M., Ed., "The YANG 1.1 Data Modeling Language",
              RFC 7950, DOI 10.17487/RFC7950, August 2016,
              <http://www.rfc-editor.org/info/rfc7950>.

9.2.  Informative References

   [draft-ietf-anima-bootstrapping-keyinfra]

   [I-D.bjorklund-netmod-yang-tree-diagrams]
              Bjorklund, M. and L. Berger, "YANG Tree Diagrams", 2017.

   [I-D.ietf-6tisch-dtsecurity-secure-join]
              Richardson, M., "6tisch Secure Join protocol", draft-ietf-
              6tisch-dtsecurity-secure-join-01 (work in progress),
              February 2017.

   [I-D.ietf-anima-bootstrapping-keyinfra]
              Pritikin, M., Richardson, M., Behringer, M., and S. Bjarnason,
              S., and K. Watsen, "Bootstrapping Remote Secure Key Infrastructures", draft-
              ietf-anima-bootstrapping-keyinfra
              Infrastructures (BRSKI)", draft-ietf-anima-bootstrapping-
              keyinfra-04 (work in progress),
              2016, <https://tools.ietf.org/html/draft-ietf-anima-
              bootstrapping-keyinfra>.

   [draft-ietf-netconf-zerotouch] October 2016.

   [I-D.ietf-netconf-zerotouch]
              Watsen, K. and M. Abrahamsson, "Zero Touch Provisioning
              for NETCONF or RESTCONF based Management", draft-ietf-
              netconf-zerotouch
              netconf-zerotouch-12 (work in progress), 2016,
              <https://tools.ietf.org/html/draft-ietf-netconf-
              zerotouch>. January 2017.

   [imprinting]
              Wikipedia, , "Wikipedia article: Imprinting", July 2015,
              <https://en.wikipedia.org/wiki/Imprinting_(psychology)>.

   [RFC3688]  Mealling, M., "The IETF XML Registry", BCP 81, RFC 3688,
              DOI 10.17487/RFC3688, January 2004,
              <http://www.rfc-editor.org/info/rfc3688>.

   [RFC7435]  Dukhovni, V., "Opportunistic Security: Some Protection
              Most of the Time", RFC 7435, DOI 10.17487/RFC7435,
              December 2014, <http://www.rfc-editor.org/info/rfc7435>.

   [Stajano99theresurrecting]
              Stajano, F. and R. Anderson, "The resurrecting duckling:
              security issues for ad-hoc wireless networks", 1999,
              <https://www.cl.cam.ac.uk/~fms27/papers/1999-StajanoAnd-
              duckling.pdf>.

Appendix A.  Change Log  Acknowledgements

   The authors would like to thank for following for lively discussions
   on list and in the halls (ordered by last name):

Authors' Addresses

   Kent Watsen
   Juniper Networks

   EMail: kwatsen@juniper.net

   Michael C. Richardson
   Sandelman Software Works

   EMail: mcr+ietf@sandelman.ca
   URI:   http://www.sandelman.ca/

   Max Pritikin
   Cisco Systems

   EMail: pritikin@cisco.com

   Toerless Eckert

   EMail: tte+anima@cs.fau.de