netconfcentral logo

ietf-routing-key-chain@2016-03-15



  module ietf-routing-key-chain {

    yang-version 1;

    namespace
      "urn:ietf:params:xml:ns:yang:ietf-routing-key-chain";

    prefix key-chain;

    import ietf-yang-types {
      prefix yang;
    }

    organization
      "IETF RTG (Routing) Working Group";

    contact "Acee Lindem - acee@cisco.com";

    description
      "This YANG module defines the generic configuration
     data for key-chain. It is intended that the module
     will be extended by vendors to define vendor-specific
     key-chain configuration parameters.

     Copyright (c) 2015 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 "2016-03-15" {
      description
        "Rename module from ietf-key-chain to
       ietf-routing-key-chain.";
      reference
        "RFC XXXX: A YANG Data Model for Routing key-chain";

    }

    revision "2016-02-16" {
      description
        "Updated version. Added clear-text algorithm as a
       feature.";
      reference
        "RFC XXXX: A YANG Data Model for key-chain";

    }

    revision "2015-10-15" {
      description
        "Updated version, organization, and copyright.
       Added aes-cmac-prf-128 and aes-key-wrap features.";
      reference
        "RFC XXXX: A YANG Data Model for key-chain";

    }

    revision "2015-06-29" {
      description
        "Updated version. Added Operation State following
       draft-openconfig-netmod-opstate-00.";
      reference
        "RFC XXXX: A YANG Data Model for key-chain";

    }

    revision "2015-02-24" {
      description "Initial revision.";
      reference
        "RFC XXXX: A YANG Data Model for key-chain";

    }


    typedef key-chain-ref {
      type leafref {
        path "/key-chain:key-chains/key-chain:key-chain-list/key-chain:name";
      }
      description
        "This type is used by data models that need to reference
       configured key-chains.";
    }

    feature hex-key-string {
      description
        "Support hexadecimal key string.";
    }

    feature accept-tolerance {
      description
        "To specify the tolerance or acceptance limit.";
    }

    feature independent-send-accept-lifetime {
      description
        "Support for independent send and accept key lifetimes.";
    }

    feature crypto-hmac-sha-1-12 {
      description
        "Support for TCP HMAC-SHA-1 12 byte digest hack.";
    }

    feature clear-text {
      description
        "Support for clear-text algorithm. Usage is NOT RECOMMENDED.";
    }

    feature aes-cmac-prf-128 {
      description
        "Support for AES Cipher based Message Authentication Code
       Pseudo Random Function.";
    }

    feature aes-key-wrap {
      description
        "Support for Advanced Encryption Standard (AES) Key Wrap.";
    }

    grouping lifetime {
      description
        "Key lifetime specification.";
      choice lifetime {
        default 'always';
        description
          "Options for specifying key accept or send lifetimes";
        leaf always {
          type empty;
          description
            "Indicates key lifetime is always valid.";
        }

        case start-end-time {
          leaf start-date-time {
            type yang:date-and-time;
            description "Start time.";
          }

          choice end-time {
            default 'infinite';
            description "End-time setting.";
            leaf no-end-time {
              type empty;
              description
                "Indicates key lifetime end-time in infinite.";
            }
            leaf duration {
              type uint32 {
                range "1..2147483646";
              }
              units "seconds";
              description
                "Key lifetime duration, in seconds";
            }
            leaf end-date-time {
              type yang:date-and-time;
              description "End time.";
            }
          }  // choice end-time
        }  // case start-end-time
      }  // choice lifetime
    }  // grouping lifetime

    grouping crypto-algorithm-types {
      description
        "Cryptographic algorithm types.";
      choice algorithm {
        description
          "Options for cryptographic algorithm specification.";
        case hmac-sha-1-12 {
          if-feature crypto-hmac-sha-1-12;
          leaf hmac-sha1-12 {
            type empty;
            description
              "The HMAC-SHA1-12 algorithm.";
          }
        }  // case hmac-sha-1-12

        case aes-cmac-prf-128 {
          if-feature aes-cmac-prf-128;
          leaf aes-cmac-prf-128 {
            type empty;
            description
              "The AES-CMAC-PRF-128 algorithm - required
                          by RFC 5926 for TCP-AO key derivation
                          functions.";
          }
        }  // case aes-cmac-prf-128
        leaf md5 {
          type empty;
          description "The MD5 algorithm.";
        }
        leaf sha-1 {
          type empty;
          description "The SHA-1 algorithm.";
        }
        leaf hmac-sha-1 {
          type empty;
          description
            "HMAC-SHA-1 authentication algorithm.";
        }
        leaf hmac-sha-256 {
          type empty;
          description
            "HMAC-SHA-256 authentication algorithm.";
        }
        leaf hmac-sha-384 {
          type empty;
          description
            "HMAC-SHA-384 authentication algorithm.";
        }
        leaf hmac-sha-512 {
          type empty;
          description
            "HMAC-SHA-512 authentication algorithm.";
        }

        case clear-text {
          if-feature clear-text;
          leaf clear-text {
            type empty;
            description "Clear text.";
          }
        }  // case clear-text
      }  // choice algorithm
    }  // grouping crypto-algorithm-types

    grouping key-chain {
      description
        "key-chain specification grouping.";
      leaf name {
        type string;
        description "Name of the key-chain.";
      }

      leaf name-state {
        type string;
        config false;
        description
          "Configured name of the key-chain.";
      }

      container accept-tolerance {
        if-feature accept-tolerance;
        description
          "Tolerance for key lifetime acceptance (seconds).";
        leaf duration {
          type uint32;
          units "seconds";
          default "0";
          description
            "Tolerance range, in seconds.";
        }
      }  // container accept-tolerance

      container accept-tolerance-state {
        config false;
        description
          "Configured tolerance for key lifetime
         acceptance (seconds).";
        leaf duration {
          type uint32;
          description
            "Configured tolerance range, in seconds.";
        }
      }  // container accept-tolerance-state

      list key-chain-entry {
        key "key-id";
        description "One key.";
        leaf key-id {
          type uint64;
          description "Key ID.";
        }

        leaf key-id-state {
          type uint64;
          config false;
          description "Configured Key ID.";
        }

        container key-string {
          description "The key string.";
          choice key-string-style {
            description "Key string styles";
            leaf keystring {
              type string;
              description
                "Key string in ASCII format.";
            }

            case hexadecimal {
              if-feature hex-key-string;
              leaf hexadecimal-string {
                type yang:hex-string;
                description
                  "Key in hexadecimal string format.";
              }
            }  // case hexadecimal
          }  // choice key-string-style
        }  // container key-string

        container lifetime {
          description
            "Specify a key's lifetime.";
          choice lifetime {
            description
              "Options for specification of send and accept
             lifetimes.";
            case send-and-accept-lifetime {
              description
                "Send and accept key have the same lifetime.";
              container send-accept-lifetime {
                description
                  "Single lifetime specification for both send and
                 accept lifetimes.";
                uses lifetime;
              }  // container send-accept-lifetime
            }  // case send-and-accept-lifetime

            case independent-send-accept-lifetime {
              if-feature independent-send-accept-lifetime;
              description
                "Independent send and accept key lifetimes.";
              container send-lifetime {
                description
                  "Separate lifetime specification for send
                 lifetime.";
                uses lifetime;
              }  // container send-lifetime

              container accept-lifetime {
                description
                  "Separate lifetime specification for accept
                 lifetime.";
                uses lifetime;
              }  // container accept-lifetime
            }  // case independent-send-accept-lifetime
          }  // choice lifetime
        }  // container lifetime

        container lifetime-state {
          config false;
          description
            "Configured key's lifetime.";
          container send-lifetime {
            description
              "Configured send-lifetime.";
            uses lifetime;
          }  // container send-lifetime

          leaf send-valid {
            type boolean;
            description
              "Status of send-lifetime.";
          }

          container accept-lifetime {
            description
              "Configured accept-lifetime.";
            uses lifetime;
          }  // container accept-lifetime

          leaf accept-valid {
            type boolean;
            description
              "Status of accept-lifetime.";
          }
        }  // container lifetime-state

        container crypto-algorithm {
          description
            "Cryptographic algorithm associated with key.";
          uses crypto-algorithm-types;
        }  // container crypto-algorithm

        container crypto-algorithm-state {
          config false;
          description
            "Configured cryptographic algorithm.";
          uses crypto-algorithm-types;
        }  // container crypto-algorithm-state
      }  // list key-chain-entry
    }  // grouping key-chain

    container key-chains {
      description
        "All configured key-chains for the device.";
      list key-chain-list {
        key "name";
        description "List of key-chains.";
        uses key-chain;
      }  // list key-chain-list

      container aes-key-wrap {
        if-feature aes-key-wrap;
        description
          "AES Key Wrap password encryption.";
        leaf enable {
          type boolean;
          default 'false';
          description
            "Enable AES Key Wrap encryption.";
        }
      }  // container aes-key-wrap

      container aes-key-wrap-state {
        if-feature aes-key-wrap;
        config false;
        description
          "Status of AES Key Wrap.";
        leaf enable {
          type boolean;
          description "AES Key Wrap state.";
        }
      }  // container aes-key-wrap-state
    }  // container key-chains
  }  // module ietf-routing-key-chain