module ietf-zerotouch-bootstrap-server {
namespace
"urn:ietf:params:xml:ns:yang:ietf-zerotouch-bootstrap-server";
prefix "ztbs";
organization
"IETF NETCONF (Network Configuration) Working Group";
contact
"WG Web:
WG List:
WG Chair: Mehmet Ersue
WG Chair: Mahesh Jethanandani
Editor: Kent Watsen
";
description
"This module defines the southbound interface for ZeroTouch
Bootstrap Servers.
Copyright (c) 2014 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
(http://trustee.ietf.org/license-info).
This version of this YANG module is part of RFC XXXX; see
the RFC itself for full legal notices.";
revision "2015-07-06" {
description
"Initial version";
reference
"RFC XXXX: Zero Touch Provisioning for NETCONF Call Home";
}
// top-level container
container devices {
config false;
description
"A list of device entries";
list device {
key unique-id;
leaf unique-id {
type string;
}
container ownership-voucher {
// presence?
description
"This container contains the Ownership Voucher that the
device uses to ascertain the identity of its rightful
owner, as certified by its Vendor.";
leaf voucher {
type binary;
mandatory true;
description
"A Vendor-specific encoding binding unique device
identifiers to an owner identifier value matching the
value encoded in the owner-certificate below. An
example format for a voucher is presented in the
Appendix of RFC XXXX.";
}
leaf issuer-crl {
type string;
description
"An absolute path to a CRL for the issuer used by the
Vendor to sign Ownership Vouchers. The CRL should be
as up to date as possible. This leaf is optional as
it is primarily to support deployments where the device
is unable to download the CRL from the CRL distribution
point URLs listed in the Vendor's trust anchor
certificate.";
}
}
container owner-certificate {
// presense?
description
"It is intended that the device will fetch this container
as a whole, as it contains values that need to be
processed together.";
leaf certificate {
type string;
mandatory true;
description
"This is an X.509 certificate, signed by a Vendor, for
a business organization. This certificate must encode a
Vendor-assigned value identifying the organization. This
identifier must match the owner identifier encoded in
the Ownership Voucher.";
}
leaf issuer-crl {
type string;
description
"An absolute path to a CRL for the issuer used by the
Vendor to sign Owner Certificates. The CRL should be
as up to date as possible. This leaf is optional as
it is primarily to support deployments where the device
is unable to download the CRL from the CRL distribution
point URLs listed in the Vendor's trust anchor
certificate.";
}
}
container boot-image {
presence
"Only present when boot image information has been configured";
description
"It is intended that the device will fetch this container
as a whole, as it contains values that need to be
processed together.";
leaf name {
type string;
mandatory true;
description
"The name of the image of software the device is expected
to be running.";
}
leaf md5 {
type string;
mandatory true;
description
"The output of the MD5 hash algorithm over the image file.";
}
leaf sha1 {
type string;
mandatory true;
description
"The output of the SHA-1 hash algorithm over the image file.";
}
leaf path {
type string;
mandatory true;
description
"An absolute path to the boot-image file hosted on this
Bootstrap server.";
}
leaf signature {
type string;
mandatory true;
description
"The signature over the concatenation of the previous leafs
using the organization's private key. Specifically,
sign(name+md5+sha1+path), where simple string concatenation
to join values is used, resulting in a single null-terminated
string.";
}
}
container configuration {
description
"It is intended that the device will fetch this container
as a whole, as its contents need to be processed together.";
anyxml config {
mandatory true;
description
"Any configuration data model known to the device. It may
contain Vendor-specific and/or standards-based data models.
An example configuration using a couple IETF-defined data
models is presented the Appendix of RFC XXXX.";
}
leaf signature {
type string;
mandatory true;
description
"The signature over the concatenation of the previous leaf
using the organization's private key. Specifically,
sign(config), where 'config' is treated as a single null-
terminated string.";
}
}
/*
action notification {
input {
leaf type {
type enumeration {
enum boot-image-missing {
description
"Indicates that the device got an error when trying to
access the provided URL";
}
enum boot-image-invalid {
description
"Indicates that the device had a problem processing the
boot-image file (corruption)";
}
enum image-name-mismatch {
description
"Indicates that the processed boot-image contains a name
other than provided";
}
enum voucher-invalid {
description
"Indicates that the device had a problem processing the
voucher (chain verification failed, revoked crl)";
}
enum owner-cert-invalid {
description
"Indicates that the device had a problem processing the
voucher (chain verification failed, revoked crl)";
}
enum owner-id-mismatch {
description
"Indicates that the owner-id in the voucher does not
match the one inside the owner-cert";
}
enum signature-invalid {
description
"Indicates that the signature could not be verified
using the owner-cert";
}
enum bootstrap-complete {
description
"Indicates that the device successfully processed the
bootstrap data. At this point, the device is running
the required boot-image and configuration. A device
is expected to only send this notification once,
assuming it does not receive an error in the HTTP
response from the Bootstrap Server.";
}
}
mandatory true;
}
leaf message {
type string;
description
"A human-readable value.";
}
container ssh-host-keys {
presence "Only present for bootstrap-complete messages.";
list ssh-host-key {
leaf format {
type enumeration {
enum ssh-dss;
enum ssh-rsa;
}
mandatory true;
}
leaf key-data {
type string;
mandatory true;
}
}
}
}
} // end action
*/
}
}
rpc notification {
input {
leaf unique-id {
type string;
mandatory true;
}
leaf type {
type enumeration {
enum boot-image-missing {
description
"Indicates that the device got an error when trying to
access the provided URL";
}
enum boot-image-invalid {
description
"Indicates that the device had a problem processing the
boot-image file (corruption)";
}
enum image-name-mismatch {
description
"Indicates that the processed boot-image contains a name
other than provided";
}
enum voucher-invalid {
description
"Indicates that the device had a problem processing the
voucher (chain verification failed, revoked crl)";
}
enum owner-cert-invalid {
description
"Indicates that the device had a problem processing the
voucher (chain verification failed, revoked crl)";
}
enum owner-id-mismatch {
description
"Indicates that the owner-id in the voucher does not
match the one inside the owner-cert";
}
enum signature-invalid {
description
"Indicates that the signature could not be verified
using the owner-cert";
}
enum bootstrap-complete {
description
"Indicates that the device successfully processed the
bootstrap data. At this point, the device is running
the required boot-image and configuration. A device
is expected to only send this notification once,
assuming it does not receive an error in the HTTP
response from the Bootstrap Server.";
}
}
mandatory true;
}
leaf message {
type string;
description
"A human-readable value that might provide useful information";
}
container ssh-host-keys {
presence "Only present for bootstrap-complete messages.";
list ssh-host-key {
leaf format {
type enumeration {
enum ssh-dss;
enum ssh-rsa;
}
mandatory true;
}
leaf key-data {
type string;
mandatory true;
}
}
}
}
} // end rpc notification
}