Skip to main content

A YANG Data Model for Terminal Access Controller Access-Control System Plus (TACACS+)
draft-ietf-opsawg-secure-tacacs-yang-01

Document Type Active Internet-Draft (opsawg WG)
Authors Mohamed Boucadair , Bo Wu , Guangying Zheng , Zitao Wang
Last updated 2024-12-11
Replaces draft-boucadair-opsawg-secure-tacacs-yang
RFC stream Internet Engineering Task Force (IETF)
Intended RFC status (None)
Formats
Yang Validation 0 errors, 0 warnings
Additional resources GitHub Repository
Mailing list discussion
Stream WG state WG Document
Document shepherd (None)
IESG IESG state I-D Exists
Consensus boilerplate Unknown
Telechat date (None)
Responsible AD (None)
Send notices to (None)
draft-ietf-opsawg-secure-tacacs-yang-01
Operations and Management Area Working Group           M. Boucadair, Ed.
Internet-Draft                                                    Orange
Obsoletes: 9105 (if approved)                                      B. Wu
Intended status: Standards Track                                G. Zheng
Expires: 14 June 2025                                            M. Wang
                                                     Huawei Technologies
                                                        11 December 2024

 A YANG Data Model for Terminal Access Controller Access-Control System
                             Plus (TACACS+)
                draft-ietf-opsawg-secure-tacacs-yang-01

Abstract

   This document defines a Terminal Access Controller Access-Control
   System Plus (TACACS+) client YANG module that augments the System
   Management data model, defined in RFC 7317, to allow devices to make
   use of TACACS+ servers for centralized Authentication, Authorization,
   and Accounting (AAA).  Specifically, this document defines a YANG
   module for TACACS+ over TLS 1.3.

   This document obsoletes RFC 9105.

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 https://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 14 June 2025.

Copyright Notice

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

Boucadair, et al.         Expires 14 June 2025                  [Page 1]
Internet-Draft          YANG for TACACS+ over TLS          December 2024

   This document is subject to BCP 78 and the IETF Trust's Legal
   Provisions Relating to IETF Documents (https://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 Revised BSD License text as
   described in Section 4.e of the Trust Legal Provisions and are
   provided without warranty as described in the Revised BSD License.

Table of Contents

   1.  Introduction  . . . . . . . . . . . . . . . . . . . . . . . .   2
     1.1.  Changes Since RFC 9105  . . . . . . . . . . . . . . . . .   2
   2.  Conventions and Definitions . . . . . . . . . . . . . . . . .   3
     2.1.  Tree Diagrams . . . . . . . . . . . . . . . . . . . . . .   3
   3.  Design of the TACACS+ Data Model  . . . . . . . . . . . . . .   3
   4.  TACACS+ Client Module . . . . . . . . . . . . . . . . . . . .   7
   5.  Security Considerations . . . . . . . . . . . . . . . . . . .  23
   6.  IANA Considerations . . . . . . . . . . . . . . . . . . . . .  24
   7.  References  . . . . . . . . . . . . . . . . . . . . . . . . .  24
     7.1.  Normative References  . . . . . . . . . . . . . . . . . .  24
     7.2.  Informative References  . . . . . . . . . . . . . . . . .  27
   Appendix A.  Full Tree  . . . . . . . . . . . . . . . . . . . . .  27
   Acknowledgments . . . . . . . . . . . . . . . . . . . . . . . . .  38
   Authors' Addresses  . . . . . . . . . . . . . . . . . . . . . . .  38

1.  Introduction

   [RFC9105] defines a YANG module ("ietf-system-tacacs-plus") that
   augments the System Management data model defined in [RFC7317] for
   the management of Terminal Access Controller Access-Control System
   Plus (TACACS+) clients.  Typically, the "ietf-system-tacacs-plus"
   module is used to configure a TACACS+ client on a device to support
   deployment scenarios with centralized authentication, authorization,
   and accounting servers.

   This document defines a YANG module for managing TACACS+ client,
   including TACACS+ over TLS 1.3 clients
   [I-D.ietf-opsawg-tacacs-tls13].  This document obsoletes [RFC9105].

   The YANG module in this document conforms to the Network Management
   Datastore Architecture (NMDA) defined in [RFC8342].

1.1.  Changes Since RFC 9105

   The following changes have been made to [RFC9105]:

   *  Add support for TLS

Boucadair, et al.         Expires 14 June 2025                  [Page 2]
Internet-Draft          YANG for TACACS+ over TLS          December 2024

2.  Conventions and Definitions

   The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT",
   "SHOULD", "SHOULD NOT", "RECOMMENDED", "NOT RECOMMENDED", "MAY", and
   "OPTIONAL" in this document are to be interpreted as described in
   BCP 14 [RFC2119] [RFC8174] when, and only when, they appear in all
   capitals, as shown here.

   The terminology for describing YANG data models is defined in
   [RFC7950].

   The document uses the terms defined in Section 2 of
   [I-D.ietf-opsawg-tacacs-tls13] and Section 3 of [RFC8907].

   'client' refers to TACACS+ client, while 'server' refers to TACACS+
   server.

2.1.  Tree Diagrams

   The tree diagram used in this document follows the notation defined
   in [RFC8340].

3.  Design of the TACACS+ Data Model

   This module is used to configure a TACACS+ client on a device to
   support deployment scenarios with centralized authentication,
   authorization, and accounting servers.  Authentication is used to
   validate a user's username and password, authorization allows the
   user to access and execute commands at various privilege levels
   assigned to the user, and accounting keeps track of the activity of a
   user who has accessed the device.

   The ietf-system-tacacs-plus module augments the "/sys:system" path
   defined in the ietf-system module with the contents of the "tacacs-
   plus" grouping.  Therefore, a device can use local, RADIUS, or
   TACACS+ authentication to validate users who attempt to access the
   router by several mechanisms, e.g., a command line interface or a
   web-based user interface.

   The "server" list, which is directly under the "tacacs-plus"
   container, holds a list of TACACS+ servers and uses server-type to
   distinguish between Authentication, Authorization, and Accounting
   (AAA) services.  The list of servers is for redundancy.

   When there are multiple interfaces connected to the TACACS+ client or
   server, the source address of outgoing TACACS+ packets could be
   specified, or the source address could be specified through the
   interface IP address setting or derived from the outbound interface

Boucadair, et al.         Expires 14 June 2025                  [Page 3]
Internet-Draft          YANG for TACACS+ over TLS          December 2024

   from the local Forwarding Information Base (FIB).  For the TACACS+
   server located in a Virtual Private Network (VPN), a VPN Routing and
   Forwarding (VRF) instance needs to be specified.

   The "statistics" container under the "server list" is a collection of
   read-only counters for sent and received messages from a configured
   server.

   The YANG module for TACACS+ client has the following structure:

   =============== NOTE: '\' line wrapping per RFC 8792 ================

   module: ietf-system-tacacs-plus

     augment /sys:system:
       +--rw tacacs-plus
          +--rw client-credentials* [id] {credential-reference}?
          |  +--rw id                       string
          |  +--rw (auth-type)?
          |     +--:(certificate)
          |     |  ...
          |     +--:(raw-public-key) {tlsc:client-ident-raw-public-key}?
          |     |  ...
          |     +--:(tls13-epsk) {tlsc:client-ident-tls13-epsk}?
          |        ...
          +--rw server-credentials* [id] {credential-reference}?
          |  +--rw id                 string
          |  +--rw ca-certs!
          |  |  ...
          |  +--rw ee-certs!
          |  |  ...
          |  +--rw raw-public-keys! {tlsc:server-auth-raw-public-key}?
          |  |  ...
          |  +--rw tls13-epsks?       empty
          |          {tlsc:server-auth-tls13-epsk}?
          +--rw server* [name]
             +--rw name                           string
             +--rw server-type
             |       tacacs-plus-server-type
             +--rw domain-name?                   inet:domain-name
             +--rw address                        inet:host
             +--rw port?                          inet:port-number
             +--rw (security)
             |  +--:(tls)
             |  |  +--rw client-identity!
             |  |  |  +--rw (ref-or-explicit)?
             |  |  |     +--:(ref)
             |  |  |     |  +--rw credentials-reference?

Boucadair, et al.         Expires 14 June 2025                  [Page 4]
Internet-Draft          YANG for TACACS+ over TLS          December 2024

             |  |  |     |          sys-tcs-plus:client-credentials-ref
             |  |  |     |          {credential-reference}?
             |  |  |     +--:(explicit)
             |  |  |        +--rw (auth-type)?
             |  |  |           +--:(certificate)
             |  |  |           |  ...
             |  |  |           +--:(raw-public-key)
             |  |  |           |        {tlsc:client-ident-raw-public-\
                                                                   key}?
             |  |  |           |  ...
             |  |  |           +--:(tls13-epsk)
             |  |  |                    {tlsc:client-ident-tls13-epsk}?
             |  |  |              ...
             |  |  +--rw server-authentication
             |  |  |  +--rw (ref-or-explicit)?
             |  |  |     +--:(ref)
             |  |  |     |  +--rw credentials-reference?
             |  |  |     |          sys-tcs-plus:server-credentials-ref
             |  |  |     |          {credential-reference}?
             |  |  |     +--:(explicit)
             |  |  |        +--rw ca-certs!
             |  |  |        |  ...
             |  |  |        +--rw ee-certs!
             |  |  |        |  ...
             |  |  |        +--rw raw-public-keys!
             |  |  |        |       {tlsc:server-auth-raw-public-key}?
             |  |  |        |  ...
             |  |  |        +--rw tls13-epsks?             empty
             |  |  |                {tlsc:server-auth-tls13-epsk}
             |  |  +--rw hello-params {tlscmn:hello-params}?
             |  |     +--rw tls-versions
             |  |     |  +--rw min?   identityref
             |  |     |  +--rw max?   identityref
             |  |     +--rw cipher-suites
             |  |        +--rw cipher-suite*
             |  |                tlscsa:tls-cipher-suite-algorithm
             |  +--:(obfuscation)
             |     +--rw shared-secret?           string
             +--rw (source-type)?
             |  +--:(source-ip)
             |  |  +--rw source-ip?               inet:ip-address
             |  +--:(source-interface)
             |     +--rw source-interface?        if:interface-ref
             +--rw vrf-instance?
             |       -> /ni:network-instances/network-instance/name
             +--rw single-connection?             boolean
             +--rw timeout?                       uint16
             +--ro statistics

Boucadair, et al.         Expires 14 June 2025                  [Page 5]
Internet-Draft          YANG for TACACS+ over TLS          December 2024

                +--ro connection-opens?      yang:counter64
                +--ro connection-closes?     yang:counter64
                +--ro connection-aborts?     yang:counter64
                +--ro connection-failures?   yang:counter64
                +--ro connection-timeouts?   yang:counter64
                +--ro messages-sent?         yang:counter64
                +--ro messages-received?     yang:counter64
                +--ro errors-received?       yang:counter64
                +--ro sessions?              yang:counter64

   The module is designed to cover the following key requirements
   specified in [I-D.ietf-opsawg-tacacs-tls13]:

   *  TLS 1.3 [RFC8446] MUST be used for transport.

   *  Earlier TLS versions TLS MUST NOT be used.

   *  The cipher suites offered or accepted SHOULD be configurable.

   *  Implementations MAY support Raw Public Keys and PSK.

   *  Implementations MUST support the ability to configure the server's
      domain name

   The following new data nodes are supported compared to [RFC9105]:

   'client-credentials' and 'server-credentials':  Defines a set
      credentials that can be globally provisioned and then referenced
      under specific servers.

   'domain-name':  Provides a domain name of the server per Section 3.3
      of [I-D.ietf-opsawg-tacacs-tls13].

   'client-identity':  Specifies the identity credentials that the
      client may present when establishing a connection to a server.
      Client identities can be configured at the top level and then
      referenced for specific server instances.  Alternatively, client
      identities can be configured explicitely under each server
      instance.

   'server-authentication':  Specifies how a client authenticates
      servers.  Server credentials can be configured at the top level
      and then referenced for specific server instances.  Alternatively,
      client identities can be configured explicitely under each server
      instance.

   'hello-params':  Controls TLS versions and cipher suites.

Boucadair, et al.         Expires 14 June 2025                  [Page 6]
Internet-Draft          YANG for TACACS+ over TLS          December 2024

   'keepalives':  Providers a set of parameters for testing the
      aliveness of the server.

4.  TACACS+ Client Module

   This module uses types and groupings defined in [RFC6991], [RFC8341],
   [RFC8343], [RFC8529], [RFC9640], [RFC9641], [RFC9642], and [RFC9645].

   The module augments [RFC7317].

   The module also cites [RFC9257], [RFC9258], [RFC9258], and [RFC6520].

   <CODE BEGINS> file "ietf-system-tacacs-plus@2024-12-11.yang"
   module ietf-system-tacacs-plus {
     yang-version 1.1;
     namespace "urn:ietf:params:xml:ns:yang:ietf-system-tacacs-plus";
     prefix sys-tcs-plus;

     import ietf-inet-types {
       prefix inet;
       reference
         "RFC 6991: Common YANG Data Types";
     }
     import ietf-yang-types {
       prefix yang;
       reference
         "RFC 6991: Common YANG Data Types";
     }
     import ietf-system {
       prefix sys;
       reference
         "RFC 7317: A YANG Data Model for System Management";
     }
     import ietf-interfaces {
       prefix if;
       reference
         "RFC 8343: A YANG Data Model for Interface Management";
     }
     import ietf-netconf-acm {
       prefix nacm;
       reference
         "RFC 8341: Network Configuration Access Control Model";
     }
     import ietf-network-instance {
       prefix ni;
       reference
         "RFC 8529: YANG Data Model for Network Instances";
     }

Boucadair, et al.         Expires 14 June 2025                  [Page 7]
Internet-Draft          YANG for TACACS+ over TLS          December 2024

     import ietf-crypto-types {
       prefix ct;
       reference
         "RFC 9640: YANG Data Types and Groupings for Cryptography";
     }
     import ietf-truststore {
       prefix ts;
       reference
         "RFC 9641: A YANG Data Model for a Truststore";
     }
     import ietf-keystore {
       prefix ks;
       reference
         "RFC 9642: A YANG Data Model for a Keystore";
     }
     import ietf-tls-common {
       prefix tlscmn;
       reference
         "RFC 9645: YANG Groupings for TLS Clients and TLS Servers";
     }
     import ietf-tls-client {
       prefix tlsc;
       reference
         "RFC 9645: YANG Groupings for TLS Clients and TLS Servers";
     }

     organization
       "IETF OPSAWG (Operations and Management Area Working Group)";
     contact
       "WG Web:   <https://datatracker.ietf.org/wg/opsawg/>
        WG List:  <mailto:opsawg@ietf.org>

        Editor:   Mohamed Boucadair
                  <mailto:mohamed.boucadair@orange.com>
        Author:   Bo Wu
                  <lana.wubo@huawei.com>
        Author:   Guangying Zheng
                  <zhengguangying@huawei.com>";
     description
       "This module provides configuration of TACACS+ clients.

        The key words 'MUST', 'MUST NOT', 'REQUIRED', 'SHALL', 'SHALL
        NOT', 'SHOULD', 'SHOULD NOT', 'RECOMMENDED', 'NOT RECOMMENDED',
        'MAY', and 'OPTIONAL' in this document are to be interpreted as
        described in BCP 14 (RFC 2119) (RFC 8174) when, and only when,
        they appear in all capitals, as shown here.

        Copyright (c) 2024 IETF Trust and the persons identified as

Boucadair, et al.         Expires 14 June 2025                  [Page 8]
Internet-Draft          YANG for TACACS+ over TLS          December 2024

        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 Revised BSD License
        set forth in Section 4.c of the IETF Trust's Legal Provisions
        Relating to IETF Documents
        (https://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 2024-12-11 {
       description
         "This revision adds TLS support";
       reference
         "RFC XXXX: A YANG Model for Terminal Access Controller
                    Access-Control System Plus (TACACS+)";
     }
     revision 2021-08-05 {
       description
         "Initial revision.";
       reference
         "RFC 9105: A YANG Data Model for Terminal Access Controller
                    Access-Control System Plus (TACACS+)";
     }

     feature credential-reference {
       description
         "Indicates whether service credentials references are
          supported.";
     }

     identity tacacs-plus {
       base sys:authentication-method;
       description
         "Indicates AAA operation using TACACS+.";
     }

     typedef tacacs-plus-server-type {
       type bits {
         bit authentication {
           description
             "Indicates that the TACACS+ server is providing
              authentication services.";
         }
         bit authorization {
           description

Boucadair, et al.         Expires 14 June 2025                  [Page 9]
Internet-Draft          YANG for TACACS+ over TLS          December 2024

             "Indicates that the TACACS+ server is providing
              authorization services.";
         }
         bit accounting {
           description
             "Indicates that the TACACS+ server is providing accounting
              services.";
         }
       }
       description
         "tacacs-plus-server-type can be set to
          authentication/authorization/accounting
          or any combination of the three types.";
     }

     typedef client-credentials-ref {
       type leafref {
         path "/sys:system/sys-tcs-plus:tacacs-plus"
            + "/sys-tcs-plus:client-credentials/sys-tcs-plus:id";
       }
       description
         "Defines a type to reference client credentials.";
     }

     typedef server-credentials-ref {
       type leafref {
         path "/sys:system/sys-tcs-plus:tacacs-plus"
            + "/sys-tcs-plus:server-credentials/sys-tcs-plus:id";
       }
       description
         "Defines a type to reference server credentials.";
     }

     grouping statistics {
       description
         "Grouping for TACACS+ statistics attributes.";
       container statistics {
         config false;
         description
           "A collection of server-related statistics objects.";
         leaf connection-opens {
           type yang:counter64;
           description
             "Number of new connection requests sent to the server,
              e.g., socket open.";
         }
         leaf connection-closes {
           type yang:counter64;

Boucadair, et al.         Expires 14 June 2025                 [Page 10]
Internet-Draft          YANG for TACACS+ over TLS          December 2024

           description
             "Number of connection close requests sent to the server,
              e.g., socket close.";
         }
         leaf connection-aborts {
           type yang:counter64;
           description
             "Number of aborted connections to the server.  These do
              not include connections that are closed gracefully.";
         }
         leaf connection-failures {
           type yang:counter64;
           description
             "Number of connection failures to the server.";
         }
         leaf connection-timeouts {
           type yang:counter64;
           description
             "Number of connection timeouts to the server.";
         }
         leaf messages-sent {
           type yang:counter64;
           description
             "Number of messages sent to the server.";
         }
         leaf messages-received {
           type yang:counter64;
           description
             "Number of messages received from the server.";
         }
         leaf errors-received {
           type yang:counter64;
           description
             "Number of error messages received from the server.";
         }
         leaf sessions {
           type yang:counter64;
           description
             "Number of TACACS+ sessions completed with the server.
              If the Single Connection Mode was NOT enabled, the number
              of sessions is the same as the number of
              'connection-closes'.  If the Mode was enabled, a single
              TCP connection may contain multiple TACACS+ sessions.";
         }
       }
     }

     grouping certificate {

Boucadair, et al.         Expires 14 June 2025                 [Page 11]
Internet-Draft          YANG for TACACS+ over TLS          December 2024

       description
         "Specifies the client identity using a certificate.";
       uses "ks:inline-or-keystore-end-entity-cert-with-key-"
          + "grouping" {
         refine "inline-or-keystore/inline/inline-definition" {
           must 'not(public-key-format) or derived-from-or-self'
              + '(public-key-format, "ct:subject-public-key-'
              + 'info-format")';
         }
         refine "inline-or-keystore/central-keystore/"
              + "central-keystore-reference/asymmetric-key" {
           must 'not(deref(.)/../ks:public-key-format) or '
              + 'derived-from-or-self(deref(.)/../ks:public-'
              + 'key-format, "ct:subject-public-key-info-'
              + 'format")';
         }
       }
     }

     grouping raw-private-key {
       description
         "Specifies the client identity using a raw private
          key.";
       uses ks:inline-or-keystore-asymmetric-key-grouping {
         refine "inline-or-keystore/inline/inline-definition" {
           must 'not(public-key-format) or derived-from-or-self'
              + '(public-key-format, "ct:subject-public-key-'
              + 'info-format")';
         }
         refine "inline-or-keystore/central-keystore/"
              + "central-keystore-reference" {
           must 'not(deref(.)/../ks:public-key-format) or '
              + 'derived-from-or-self(deref(.)/../ks:public-'
              + 'key-format, "ct:subject-public-key-info-format")';
         }
       }
     }

     grouping tls13-epsk {
       description
         "An External Pre-Shared Key (EPSK) is established
          or provisioned out-of-band, i.e., not from a TLS
          connection.  An EPSK is a tuple of (Base Key,
          External Identity, Hash).  When PSKs are provisioned
          out of band, the PSK identity and the Key Derivation
          Function (KDF) hash algorithm to be used with the PSK
          must also be provisioned.";
       reference

Boucadair, et al.         Expires 14 June 2025                 [Page 12]
Internet-Draft          YANG for TACACS+ over TLS          December 2024

         "RFC 8446: The Transport Layer Security (TLS) Protocol
                    Version 1.3, Section 4.2.11
          RFC 9257: Guidance for External Pre-Shared Key (PSK) Usage
                    in TLS, Section 6
          RFC 9258: Importing External Pre-Shared Keys (PSKs) for
                    TLS 1.3, Section 5.1";
       uses ks:inline-or-keystore-symmetric-key-grouping;
       leaf external-identity {
         type string;
         mandatory true;
         description
           "A sequence of bytes used to identify an EPSK. A label for
            a pre-shared key established externally.";
         reference
           "RFC 8446: The Transport Layer Security (TLS) Protocol
                      Version 1.3, Section 4.2.11
            RFC 9257: Guidance for External Pre-Shared Key (PSK)
                      Usage in TLS, Section 4.1";
       }
       leaf hash {
         type tlscmn:epsk-supported-hash;
         default "sha-256";
         description
           "For externally established PSKs, the Hash algorithm must be
            set when the PSK is established or default to SHA-256 if no
            such algorithm is defined.";
         reference
           "RFC 8446: The Transport Layer Security (TLS) Protocol
                      Version 1.3, Section 4.2.11";
       }
       leaf context {
         type string;
         description
           "The context used to determine the EPSK, if any exists. For
            example, context may include information about peer roles or
            identities to mitigate Selfie-style reflection attacks.";
         reference
           "RFC 9258: Importing External Pre-Shared Keys (PSKs) for
                      TLS 1.3, Section 5.1 ";
       }
       leaf target-protocol {
         type uint16;
         description
           "Specifies the protocol for which a PSK is imported for
            use.";
         reference
           "RFC 9258: Importing External Pre-Shared Keys (PSKs) for
                      TLS 1.3, Section 3 ";

Boucadair, et al.         Expires 14 June 2025                 [Page 13]
Internet-Draft          YANG for TACACS+ over TLS          December 2024

       }
       leaf target-kdf {
         type uint16;
         description
           "The KDF for which a PSK is imported for use.";
         reference
           "RFC 9258: Importing External Pre-Shared Keys (PSKs) for
                      TLS 1.3, Section 3";
       }
     }

     grouping client-identity {
       description
         "Identity credentials that the TLS client may present when
          establishing a connection to a TLS server. When configured,
          and requested by the TLS server when establishing a TLS
          session, these credentials are passed in the Certificate
          message.";
       reference
         "RFC 8446: The Transport Layer Security (TLS) Protocol
                    Version 1.3, Section 4.4.2";
       nacm:default-deny-write;
       choice auth-type {
         //default "certificate";
         //mandatory true;
         description
           "A choice amongst authentication types, of which one must
            be enabled and selected.";
         case certificate {
           container certificate {
             description
               "Specifies the client identity using a certificate.";
             uses certificate;
           }
         }
         case raw-public-key {
           if-feature "tlsc:client-ident-raw-public-key";
           container raw-private-key {
             description
               "Specifies the client identity using RPK.";
             uses raw-private-key;
           }
         }
         case tls13-epsk {
           if-feature "tlsc:client-ident-tls13-epsk";
           container tls13-epsk {
             description
               "An EPSK is established or provisioned out-of-band.";

Boucadair, et al.         Expires 14 June 2025                 [Page 14]
Internet-Draft          YANG for TACACS+ over TLS          December 2024

             uses tls13-epsk;
           }
         }
       }
     }

     grouping client-identity-with-ref {
       description
         "Identity credentials that the TLS client may present when
          establishing a connection to a TLS server. When configured,
          and requested by the TLS server when establishing a TLS
          session, these credentials are passed in the Certificate
          message.";
       choice ref-or-explicit {
         description
           "A choice between a reference of explicit configuration.";
         case ref {
           description
             "Provides a reference.";
           leaf credentials-reference {
             if-feature credential-reference;
             type sys-tcs-plus:client-credentials-ref;
             description
               "Specifies the client credentials reference.";
           }
         }
         case explicit {
           description
             "Explicit configuration.";
           uses client-identity;
         }
       }
     }

     grouping server-authentication {
       description
         "Specifies how the TLS client can authenticate TLS servers.
          Any combination of credentials is additive and unordered.";
       nacm:default-deny-write;
       container ca-certs {
         presence
           "Indicates that Certification Authority (CA) certificates
            have been configured.
            This statement is present so the mandatory descendant
            nodes do not imply that this node must be configured.";
         description
           "A set of CA certificates used by the TLS client to
            authenticate TLS server certificates.

Boucadair, et al.         Expires 14 June 2025                 [Page 15]
Internet-Draft          YANG for TACACS+ over TLS          December 2024

            A server certificate is authenticated if it has a valid
            chain of trust to a configured CA certificate.";
         reference
           "RFC 9641: A YANG Data Model for a Truststore";
         uses ts:inline-or-truststore-certs-grouping;
       }
       container ee-certs {
         presence
           "Indicates that End Entity (EE) certificates have been
            configured.
            This statement is present so the mandatory descendant
            nodes do not imply that this node must be configured.";
         description
           "A set of server certificates (i.e., end entity certificates)
            used by the TLS client to authenticate certificates
            presented by TLS servers. A server certificate is
            authenticated if it is an exact match to a configured server
            certificate.";
         reference
           "RFC 9641: A YANG Data Model for a Truststore";
         uses ts:inline-or-truststore-certs-grouping;
       }
       container raw-public-keys {
         if-feature "tlsc:server-auth-raw-public-key";
         presence "Indicates that raw public keys have been configured.
                   This statement is present so the mandatory descendant
                   nodes do not imply that this node must be
                   configured.";
         description
           "A set of raw public keys used by the TLS client to
            authenticate raw public keys presented by the TLS server.
            A raw public key is authenticated if it is an exact match
            to a configured raw public key.";
         reference
           "RFC 9641: A YANG Data Model for a Truststore";
         uses ts:inline-or-truststore-public-keys-grouping {
           refine "inline-or-truststore/inline/inline-definition/"
                + "public-key" {
             must 'derived-from-or-self(public-key-format,'
                + ' "ct:subject-public-key-info-format")';
           }
           refine "inline-or-truststore/central-truststore/"
                + "central-truststore-reference" {
             must 'not(deref(.)/../ts:public-key/ts:public-key-'
                + 'format[not(derived-from-or-self(., "ct:subject-'
                + 'public-key-info-format"))])';
           }
         }

Boucadair, et al.         Expires 14 June 2025                 [Page 16]
Internet-Draft          YANG for TACACS+ over TLS          December 2024

       }
       leaf tls13-epsks {
         if-feature "tlsc:server-auth-tls13-epsk";
         type empty;
         description
           "Indicates that the TLS client can authenticate TLS servers
            using configured external PSKs.";
       }
     }

     grouping server-authentication-with-ref {
       description
         "Specifies how the TLS client can authenticate TLS servers.";
       choice ref-or-explicit {
         description
           "A choice between a reference of explicit configuration.";
         case ref {
           description
             "Provides a reference.";
           leaf credentials-reference {
             if-feature credential-reference;
             type sys-tcs-plus:server-credentials-ref;
             description
               "Specifies the server credentials reference.";
           }
         }
         case explicit {
           description
             "Explicit configuration.";
           uses server-authentication;
         }
       }
     }

     grouping hello-params {
       description
         "Configurable parameters for the TLS hello message.";
       nacm:default-deny-write;
       uses tlscmn:hello-params-grouping {
         refine "tls-versions/min" {
           must "not(derived-from-or-self(current(), "
              + "'tlscmn:tls12'))" {
             error-message
               "TLS 1.2 is not supported as min TLS version";
           }
         }
         refine "tls-versions/max" {
           must "not(derived-from-or-self(current(), "

Boucadair, et al.         Expires 14 June 2025                 [Page 17]
Internet-Draft          YANG for TACACS+ over TLS          December 2024

              + "'tlscmn:tls12'))" {
             error-message
               "TLS 1.2 is not supported as max TLS version";
           }
         }
       }
     }

     grouping tls-client {
       description
         "A grouping for configuring a TLS client without any
          consideration for how an underlying TCP session is
          established.";
       container client-identity {
         presence
           "Indicates that a TLS-level client identity has been
            configured.
            This statement is present so the mandatory descendant do
            not imply that this node must be configured.";
         description
           "Identity credentials the TLS client may present when
            establishing a connection to a TLS server.";
         //uses client-identity;
         uses client-identity-with-ref;
       }
       container server-authentication {
         must 'ca-certs or ee-certs or raw-public-keys or tls13-epsks';
         description
           "Specifies how the TLS client can authenticate TLS servers.";
         //uses server-authentication;
         uses server-authentication-with-ref;
       }
       container hello-params {
         if-feature "tlscmn:hello-params";
         description
           "Configurable parameters for the TLS hello message.";
         uses hello-params;
       }
     }

     grouping tls-grouping-reuse {
       description
         "A grouping for TLS with TLS1.2 and keepalive removed.";
       uses tlsc:tls-client-grouping {
         refine "client-identity/auth-type/tls12-psk" {
           if-feature "not tlsc:client-ident-tls12-psk";
         }
         refine "server-authentication/tls12-psks" {

Boucadair, et al.         Expires 14 June 2025                 [Page 18]
Internet-Draft          YANG for TACACS+ over TLS          December 2024

           if-feature "not tlsc:server-auth-tls12-psk";
         }
         refine "hello-params/tls-versions/min" {
           must "not(derived-from-or-self(current(), "
              + "'tlscmn:tls12'))" {
             error-message
               "TLS 1.2 is not supported as min TLS version";
           }
         }
         refine "hello-params/tls-versions/max" {
           must "not(derived-from-or-self(current(), "
              + "'tlscmn:tls12'))" {
             error-message
               "TLS 1.2 is not supported as max TLS version";
           }
         }
         refine "keepalives" {
           if-feature "not tlsc:tls-client-keepalives";
         }
       }
     }

     grouping tacacs-plus {
       description
         "Grouping for TACACS+ attributes.";
       container tacacs-plus {
         must "not(derived-from-or-self(../sys:authentication"
            + "/sys:user-authentication-order, 'tacacs-plus'))"
            + " or bit-is-set(server/server-type,'authentication')" {
           error-message
             "When 'tacacs-plus' is used as a system authentication
              method, a TACACS+ authentication server must be
              configured.";
           description
             "When 'tacacs-plus' is used as an authentication method,
              a TACACS+ server must be configured.";
         }
         description
           "Container for TACACS+ configurations and operations.";
         list client-credentials {
           if-feature credential-reference;
           key "id";
           description
             "Identity credentials the TLS client may present when
              establishing a connection to a TLS server.
              A list of client credentials to be referenced.";
           nacm:default-deny-write;
           leaf id {

Boucadair, et al.         Expires 14 June 2025                 [Page 19]
Internet-Draft          YANG for TACACS+ over TLS          December 2024

             type string;
             description
               "A credential identifier.";
           }
           uses client-identity;
         }
         list server-credentials {
           if-feature credential-reference;
           key "id";
           description
             "Identity credentials the TLS client may present when
              establishing a connection to a TLS server.";
           nacm:default-deny-write;
           leaf id {
             type string;
             description
               "A credential identifier.";
           }
           uses server-authentication;
         }
         list server {
           key "name";
           ordered-by user;
           description
             "List of TACACS+ servers used by the device.";
           leaf name {
             type string;
             description
               "An arbitrary name for the TACACS+ server.";
           }
           leaf server-type {
             type tacacs-plus-server-type;
             mandatory true;
             description
               "Server type: authentication/authorization/accounting and
                various combinations.";
           }
           leaf domain-name {
             type inet:domain-name;
             description
               "Provides a domain name of the TACACS+ server.";
           }
           leaf address {
             type inet:host;
             mandatory true;
             description
               "The address of the TACACS+ server.";
           }

Boucadair, et al.         Expires 14 June 2025                 [Page 20]
Internet-Draft          YANG for TACACS+ over TLS          December 2024

           leaf port {
             type inet:port-number;
             default "49"; // to be replaced by TACACS-TLS-PORT
             description
               "The port number of TACACS+ Sserver port number.";
           }
           choice security {
             mandatory true;
             description
               "Security mechanism between TACACS+ client and server.
                This is modeled as a YANG 'choice' so that it can be
                augmented by a YANG module in a backwards-compatible
                manner.";
             case tls {
               description
                 "TLS is used.";
               uses tls-client;
               //uses client-identity-with-ref;
             }
             case obfuscation {
               leaf shared-secret {
                 type string {
                   length "1..max";
                 }
                 description
                   "The shared secret, which is known to both the
                    TACACS+ client and server.  TACACS+ server
                    administrators SHOULD configure a shared secret with
                    a minimum length of 16 characters.
                    It is highly recommended that this shared secret is
                    at least 32 characters long and sufficiently complex
                    with a mix of different character types,
                    i.e., upper case, lower case, numeric, and
                    punctuation.  Note that this security mechanism is
                    best described as 'obfuscation' and not 'encryption'
                    as it does not provide any meaningful integrity,
                    privacy, or replay protection.";
                 reference
                   "RFC 8907: The TACACS+ Protocol";
                 nacm:default-deny-all;
               }
             }
           }
           choice source-type {
             description
               "The source address type for outbound TACACS+ packets.";
             case source-ip {
               leaf source-ip {

Boucadair, et al.         Expires 14 June 2025                 [Page 21]
Internet-Draft          YANG for TACACS+ over TLS          December 2024

                 type inet:ip-address;
                 description
                   "Specifies the source IP address for TACACS+ outbound
                    packets.";
               }
             }
             case source-interface {
               leaf source-interface {
                 type if:interface-ref;
                 description
                   "Specifies the interface from which the IP address
                    is derived for use as the source for the outbound
                    TACACS+ packet.";
               }
             }
           }
           leaf vrf-instance {
             type leafref {
               path "/ni:network-instances/ni:network-instance/ni:name";
             }
             description
               "Specifies the VPN Routing and Forwarding (VRF) instance
                to use to communicate with the TACACS+ server.";
             reference
               "RFC 8529: YANG Data Model for Network Instances";
           }
           leaf single-connection {
             type boolean;
             default "false";
             description
               "Indicates whether the Single Connection Mode is enabled
                for the server. By default, the Single Connection Mode
                is disabled.";
           }
           leaf timeout {
             type uint16 {
               range "1..max";
             }
             units "seconds";
             default "5";
             description
               "The number of seconds the device will wait for a
                response from each TACACS+ server before trying with a
                different server.";
           }
           uses statistics;
         }
       }

Boucadair, et al.         Expires 14 June 2025                 [Page 22]
Internet-Draft          YANG for TACACS+ over TLS          December 2024

     }

     augment "/sys:system" {
       description
         "Augments the system model with the tacacs-plus model.";
       uses tacacs-plus;
     }
   }
   <CODE ENDS>

5.  Security Considerations

   This section is modeled after the template described in Section 3.7
   of [I-D.ietf-netmod-rfc8407bis].

   The "ietf-ac-common" YANG module defines a data model that is
   designed to be accessed via YANG-based management protocols, such as
   NETCONF [RFC6241] and RESTCONF [RFC8040].  These protocols have to
   use a secure transport layer (e.g., SSH [RFC4252], TLS [RFC8446], and
   QUIC [RFC9000]) and have to use mutual authentication.

   The Network Configuration Access Control Model (NACM) [RFC8341]
   provides the means to restrict access for particular NETCONF or
   RESTCONF users to a preconfigured subset of all available NETCONF or
   RESTCONF protocol operations and content.

   There are a number of data nodes defined in this YANG module that are
   writable/creatable/deletable (i.e., config true, which is the
   default).  These data nodes may be considered sensitive or vulnerable
   in some network environments.  Write operations (e.g., edit-config)
   and delete operations to these data nodes without proper protection
   or authentication can have a negative effect on network operations.
   Specifically, the following subtrees and data nodes have particular
   sensitivities/vulnerabilities:

   /system/tacacs-plus/server:  This list contains the data nodes used
      to control the TACACS+ servers used by the device.  Unauthorized
      access to this list could enable an attacker to assume complete
      control over the device by pointing to a compromised TACACS+
      server, or to modify the counters to hide attacks against the
      device.

   /system/tacacs-plus/server/shared-secret:  This leaf controls the key

Boucadair, et al.         Expires 14 June 2025                 [Page 23]
Internet-Draft          YANG for TACACS+ over TLS          December 2024

      known to both the TACACS+ client and server.  Unauthorized access
      to this leaf could make the device vulnerable to attacks;
      therefore, it has been restricted using the "default-deny-all"
      access control defined in [RFC8341].  When setting, it is highly
      recommended that the leaf is at least 32 characters long and
      sufficiently complex with a mix of different character types,
      i.e., upper case, lower case, numeric, and punctuation.

   Some of the readable data nodes in this YANG module may be considered
   sensitive or vulnerable in some network environments.  It is thus
   important to control read access (e.g., via get, get-config, or
   notification) to these data nodes.  Specifically, the following
   subtrees and data nodes have particular sensitivities/
   vulnerabilities:

    'xxx':
    :  xxxx.

   This YANG module uses groupings from other YANG modules that define
   nodes that may be considered sensitive or vulnerable in network
   environments.  Refer to Section 5.3 of [RFC9645.] for information as
   to which nodes may be considered sensitive or vulnerable in network
   environments.

6.  IANA Considerations

   IANA is requested to update the following URI in the "ns" subregistry
   within the "IETF XML Registry" [RFC3688]:

      URI:  urn:ietf:params:xml:ns:yang:ietf-system-tacacs-plus
      Registrant Contact:  The IESG.
      XML:  N/A; the requested URI is an XML namespace.

   IANA is requested to register the following YANG module in the "YANG
   Module Names" registry [RFC6020] within the "YANG Parameters"
   registry group:

      Name:  ietf-system-tacacs-plus
      Namespace:  urn:ietf:params:xml:ns:yang:ietf-system-tacacs-plus
      Prefix:  sys-tcs-plus
      Maintained by IANA?  N
      Reference:  RFC XXXX

7.  References

7.1.  Normative References

Boucadair, et al.         Expires 14 June 2025                 [Page 24]
Internet-Draft          YANG for TACACS+ over TLS          December 2024

   [I-D.ietf-opsawg-tacacs-tls13]
              Dahm, T., Heasley, J., dcmgash@cisco.com, and A. Ota,
              "Terminal Access Controller Access-Control System Plus
              (TACACS+) over TLS 1.3", Work in Progress, Internet-Draft,
              draft-ietf-opsawg-tacacs-tls13-15, 18 November 2024,
              <https://datatracker.ietf.org/doc/html/draft-ietf-opsawg-
              tacacs-tls13-15>.

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

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

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

   [RFC6520]  Seggelmann, R., Tuexen, M., and M. Williams, "Transport
              Layer Security (TLS) and Datagram Transport Layer Security
              (DTLS) Heartbeat Extension", RFC 6520,
              DOI 10.17487/RFC6520, February 2012,
              <https://www.rfc-editor.org/rfc/rfc6520>.

   [RFC6991]  Schoenwaelder, J., Ed., "Common YANG Data Types",
              RFC 6991, DOI 10.17487/RFC6991, July 2013,
              <https://www.rfc-editor.org/rfc/rfc6991>.

   [RFC7317]  Bierman, A. and M. Bjorklund, "A YANG Data Model for
              System Management", RFC 7317, DOI 10.17487/RFC7317, August
              2014, <https://www.rfc-editor.org/rfc/rfc7317>.

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

   [RFC8174]  Leiba, B., "Ambiguity of Uppercase vs Lowercase in RFC
              2119 Key Words", BCP 14, RFC 8174, DOI 10.17487/RFC8174,
              May 2017, <https://www.rfc-editor.org/rfc/rfc8174>.

   [RFC8341]  Bierman, A. and M. Bjorklund, "Network Configuration
              Access Control Model", STD 91, RFC 8341,
              DOI 10.17487/RFC8341, March 2018,
              <https://www.rfc-editor.org/rfc/rfc8341>.

Boucadair, et al.         Expires 14 June 2025                 [Page 25]
Internet-Draft          YANG for TACACS+ over TLS          December 2024

   [RFC8342]  Bjorklund, M., Schoenwaelder, J., Shafer, P., Watsen, K.,
              and R. Wilton, "Network Management Datastore Architecture
              (NMDA)", RFC 8342, DOI 10.17487/RFC8342, March 2018,
              <https://www.rfc-editor.org/rfc/rfc8342>.

   [RFC8343]  Bjorklund, M., "A YANG Data Model for Interface
              Management", RFC 8343, DOI 10.17487/RFC8343, March 2018,
              <https://www.rfc-editor.org/rfc/rfc8343>.

   [RFC8446]  Rescorla, E., "The Transport Layer Security (TLS) Protocol
              Version 1.3", RFC 8446, DOI 10.17487/RFC8446, August 2018,
              <https://www.rfc-editor.org/rfc/rfc8446>.

   [RFC8529]  Berger, L., Hopps, C., Lindem, A., Bogdanovic, D., and X.
              Liu, "YANG Data Model for Network Instances", RFC 8529,
              DOI 10.17487/RFC8529, March 2019,
              <https://www.rfc-editor.org/rfc/rfc8529>.

   [RFC9257]  Housley, R., Hoyland, J., Sethi, M., and C. A. Wood,
              "Guidance for External Pre-Shared Key (PSK) Usage in TLS",
              RFC 9257, DOI 10.17487/RFC9257, July 2022,
              <https://www.rfc-editor.org/rfc/rfc9257>.

   [RFC9258]  Benjamin, D. and C. A. Wood, "Importing External Pre-
              Shared Keys (PSKs) for TLS 1.3", RFC 9258,
              DOI 10.17487/RFC9258, July 2022,
              <https://www.rfc-editor.org/rfc/rfc9258>.

   [RFC9640]  Watsen, K., "YANG Data Types and Groupings for
              Cryptography", RFC 9640, DOI 10.17487/RFC9640, October
              2024, <https://www.rfc-editor.org/rfc/rfc9640>.

   [RFC9641]  Watsen, K., "A YANG Data Model for a Truststore",
              RFC 9641, DOI 10.17487/RFC9641, October 2024,
              <https://www.rfc-editor.org/rfc/rfc9641>.

   [RFC9642]  Watsen, K., "A YANG Data Model for a Keystore", RFC 9642,
              DOI 10.17487/RFC9642, October 2024,
              <https://www.rfc-editor.org/rfc/rfc9642>.

   [RFC9645]  Watsen, K., "YANG Groupings for TLS Clients and TLS
              Servers", RFC 9645, DOI 10.17487/RFC9645, October 2024,
              <https://www.rfc-editor.org/rfc/rfc9645>.

   [RFC9645.] Watsen, K., "YANG Groupings for TLS Clients and TLS
              Servers", RFC 9645, DOI 10.17487/RFC9645, October 2024,
              <https://www.rfc-editor.org/rfc/rfc9645>.

Boucadair, et al.         Expires 14 June 2025                 [Page 26]
Internet-Draft          YANG for TACACS+ over TLS          December 2024

7.2.  Informative References

   [I-D.ietf-netmod-rfc8407bis]
              Bierman, A., Boucadair, M., and Q. Wu, "Guidelines for
              Authors and Reviewers of Documents Containing YANG Data
              Models", Work in Progress, Internet-Draft, draft-ietf-
              netmod-rfc8407bis-21, 13 November 2024,
              <https://datatracker.ietf.org/doc/html/draft-ietf-netmod-
              rfc8407bis-21>.

   [RFC4252]  Ylonen, T. and C. Lonvick, Ed., "The Secure Shell (SSH)
              Authentication Protocol", RFC 4252, DOI 10.17487/RFC4252,
              January 2006, <https://www.rfc-editor.org/rfc/rfc4252>.

   [RFC6241]  Enns, R., Ed., Bjorklund, M., Ed., Schoenwaelder, J., Ed.,
              and A. Bierman, Ed., "Network Configuration Protocol
              (NETCONF)", RFC 6241, DOI 10.17487/RFC6241, June 2011,
              <https://www.rfc-editor.org/rfc/rfc6241>.

   [RFC8040]  Bierman, A., Bjorklund, M., and K. Watsen, "RESTCONF
              Protocol", RFC 8040, DOI 10.17487/RFC8040, January 2017,
              <https://www.rfc-editor.org/rfc/rfc8040>.

   [RFC8340]  Bjorklund, M. and L. Berger, Ed., "YANG Tree Diagrams",
              BCP 215, RFC 8340, DOI 10.17487/RFC8340, March 2018,
              <https://www.rfc-editor.org/rfc/rfc8340>.

   [RFC8907]  Dahm, T., Ota, A., Medway Gash, D.C., Carrel, D., and L.
              Grant, "The Terminal Access Controller Access-Control
              System Plus (TACACS+) Protocol", RFC 8907,
              DOI 10.17487/RFC8907, September 2020,
              <https://www.rfc-editor.org/rfc/rfc8907>.

   [RFC9000]  Iyengar, J., Ed. and M. Thomson, Ed., "QUIC: A UDP-Based
              Multiplexed and Secure Transport", RFC 9000,
              DOI 10.17487/RFC9000, May 2021,
              <https://www.rfc-editor.org/rfc/rfc9000>.

   [RFC9105]  Wu, B., Ed., Zheng, G., and M. Wang, Ed., "A YANG Data
              Model for Terminal Access Controller Access-Control System
              Plus (TACACS+)", RFC 9105, DOI 10.17487/RFC9105, August
              2021, <https://www.rfc-editor.org/rfc/rfc9105>.

Appendix A.  Full Tree

   The full tree structure is shown below:

Boucadair, et al.         Expires 14 June 2025                 [Page 27]
Internet-Draft          YANG for TACACS+ over TLS          December 2024

   =============== NOTE: '\' line wrapping per RFC 8792 ================

   module: ietf-system-tacacs-plus

     augment /sys:system:
       +--rw tacacs-plus
          +--rw client-credentials* [id] {credential-reference}?
          |  +--rw id                       string
          |  +--rw (auth-type)?
          |     +--:(certificate)
          |     |  +--rw certificate
          |     |     +--rw (inline-or-keystore)
          |     |        +--:(inline) {inline-definitions-supported}?
          |     |        |  +--rw inline-definition
          |     |        |     +--rw public-key-format?
          |     |        |     |       identityref
          |     |        |     +--rw public-key?
          |     |        |     |       binary
          |     |        |     +--rw private-key-format?
          |     |        |     |       identityref
          |     |        |     +--rw (private-key-type)
          |     |        |     |  +--:(cleartext-private-key)
          |     |        |     |  |        {cleartext-private-keys}?
          |     |        |     |  |  +--rw cleartext-private-key?
          |     |        |     |  |          binary
          |     |        |     |  +--:(hidden-private-key)
          |     |        |     |  |        {hidden-private-keys}?
          |     |        |     |  |  +--rw hidden-private-key?
          |     |        |     |  |          empty
          |     |        |     |  +--:(encrypted-private-key)
          |     |        |     |           {encrypted-private-keys}?
          |     |        |     |     +--rw encrypted-private-key
          |     |        |     |        +--rw encrypted-by
          |     |        |     |        +--rw encrypted-value-format
          |     |        |     |        |       identityref
          |     |        |     |        +--rw encrypted-value
          |     |        |     |                binary
          |     |        |     +--rw cert-data?
          |     |        |     |       end-entity-cert-cms
          |     |        |     +---n certificate-expiration
          |     |        |     |       {certificate-expiration-\
                                                          notification}?
          |     |        |     |  +-- expiration-date
          |     |        |     |          yang:date-and-time
          |     |        |     +---x generate-csr {csr-generation}?
          |     |        |        +---w input
          |     |        |        |  +---w csr-format    identityref
          |     |        |        |  +---w csr-info      csr-info

Boucadair, et al.         Expires 14 June 2025                 [Page 28]
Internet-Draft          YANG for TACACS+ over TLS          December 2024

          |     |        |        +--ro output
          |     |        |           +--ro (csr-type)
          |     |        |              +--:(p10-csr)
          |     |        |                 +--ro p10-csr?   p10-csr
          |     |        +--:(central-keystore)
          |     |                 {central-keystore-supported,\
                                                       asymmetric-keys}?
          |     |           +--rw central-keystore-reference
          |     |              +--rw asymmetric-key?
          |     |              |       ks:central-asymmetric-key-ref
          |     |              |       {central-keystore-supported,\
                                                       asymmetric-keys}?
          |     |              +--rw certificate?      leafref
          |     +--:(raw-public-key) {tlsc:client-ident-raw-public-key}?
          |     |  +--rw raw-private-key
          |     |     +--rw (inline-or-keystore)
          |     |        +--:(inline) {inline-definitions-supported}?
          |     |        |  +--rw inline-definition
          |     |        |     +--rw public-key-format?
          |     |        |     |       identityref
          |     |        |     +--rw public-key?
          |     |        |     |       binary
          |     |        |     +--rw private-key-format?
          |     |        |     |       identityref
          |     |        |     +--rw (private-key-type)
          |     |        |        +--:(cleartext-private-key)
          |     |        |        |        {cleartext-private-keys}?
          |     |        |        |  +--rw cleartext-private-key?
          |     |        |        |          binary
          |     |        |        +--:(hidden-private-key)
          |     |        |        |        {hidden-private-keys}?
          |     |        |        |  +--rw hidden-private-key?
          |     |        |        |          empty
          |     |        |        +--:(encrypted-private-key)
          |     |        |                 {encrypted-private-keys}?
          |     |        |           +--rw encrypted-private-key
          |     |        |              +--rw encrypted-by
          |     |        |              +--rw encrypted-value-format
          |     |        |              |       identityref
          |     |        |              +--rw encrypted-value
          |     |        |                      binary
          |     |        +--:(central-keystore)
          |     |                 {central-keystore-supported,\
                                                       asymmetric-keys}?
          |     |           +--rw central-keystore-reference?
          |     |                   ks:central-asymmetric-key-ref
          |     +--:(tls13-epsk) {tlsc:client-ident-tls13-epsk}?
          |        +--rw tls13-epsk

Boucadair, et al.         Expires 14 June 2025                 [Page 29]
Internet-Draft          YANG for TACACS+ over TLS          December 2024

          |           +--rw (inline-or-keystore)
          |           |  +--:(inline) {inline-definitions-supported}?
          |           |  |  +--rw inline-definition
          |           |  |     +--rw key-format?
          |           |  |     |       identityref
          |           |  |     +--rw (key-type)
          |           |  |        +--:(cleartext-symmetric-key)
          |           |  |        |  +--rw cleartext-symmetric-key?
          |           |  |        |          binary
          |           |  |        |          {cleartext-symmetric-keys}?
          |           |  |        +--:(hidden-symmetric-key)
          |           |  |        |        {hidden-symmetric-keys}?
          |           |  |        |  +--rw hidden-symmetric-key?
          |           |  |        |          empty
          |           |  |        +--:(encrypted-symmetric-key)
          |           |  |                 {encrypted-symmetric-keys}?
          |           |  |           +--rw encrypted-symmetric-key
          |           |  |              +--rw encrypted-by
          |           |  |              +--rw encrypted-value-format
          |           |  |              |       identityref
          |           |  |              +--rw encrypted-value
          |           |  |                      binary
          |           |  +--:(central-keystore)
          |           |           {central-keystore-supported,symmetric\
                                                                 -keys}?
          |           |     +--rw central-keystore-reference?
          |           |             ks:central-symmetric-key-ref
          |           +--rw external-identity                   string
          |           +--rw hash?
          |           |       tlscmn:epsk-supported-hash
          |           +--rw context?                            string
          |           +--rw target-protocol?                    uint16
          |           +--rw target-kdf?                         uint16
          +--rw server-credentials* [id] {credential-reference}?
          |  +--rw id                 string
          |  +--rw ca-certs!
          |  |  +--rw (inline-or-truststore)
          |  |     +--:(inline) {inline-definitions-supported}?
          |  |     |  +--rw inline-definition
          |  |     |     +--rw certificate* [name]
          |  |     |        +--rw name                      string
          |  |     |        +--rw cert-data
          |  |     |        |       trust-anchor-cert-cms
          |  |     |        +---n certificate-expiration
          |  |     |                {certificate-expiration-\
                                                          notification}?
          |  |     |           +-- expiration-date    yang:date-and-time
          |  |     +--:(central-truststore)

Boucadair, et al.         Expires 14 June 2025                 [Page 30]
Internet-Draft          YANG for TACACS+ over TLS          December 2024

          |  |              {central-truststore-supported,certificates}?
          |  |        +--rw central-truststore-reference?
          |  |                ts:central-certificate-bag-ref
          |  +--rw ee-certs!
          |  |  +--rw (inline-or-truststore)
          |  |     +--:(inline) {inline-definitions-supported}?
          |  |     |  +--rw inline-definition
          |  |     |     +--rw certificate* [name]
          |  |     |        +--rw name                      string
          |  |     |        +--rw cert-data
          |  |     |        |       trust-anchor-cert-cms
          |  |     |        +---n certificate-expiration
          |  |     |                {certificate-expiration-\
                                                          notification}?
          |  |     |           +-- expiration-date    yang:date-and-time
          |  |     +--:(central-truststore)
          |  |              {central-truststore-supported,certificates}?
          |  |        +--rw central-truststore-reference?
          |  |                ts:central-certificate-bag-ref
          |  +--rw raw-public-keys! {tlsc:server-auth-raw-public-key}?
          |  |  +--rw (inline-or-truststore)
          |  |     +--:(inline) {inline-definitions-supported}?
          |  |     |  +--rw inline-definition
          |  |     |     +--rw public-key* [name]
          |  |     |        +--rw name                 string
          |  |     |        +--rw public-key-format    identityref
          |  |     |        +--rw public-key           binary
          |  |     +--:(central-truststore)
          |  |              {central-truststore-supported,public-keys}?
          |  |        +--rw central-truststore-reference?
          |  |                ts:central-public-key-bag-ref
          |  +--rw tls13-epsks?       empty
          |          {tlsc:server-auth-tls13-epsk}?
          +--rw server* [name]
             +--rw name                           string
             +--rw server-type
             |       tacacs-plus-server-type
             +--rw domain-name?                   inet:domain-name
             +--rw address                        inet:host
             +--rw port?                          inet:port-number
             +--rw (security)
             |  +--:(tls)
             |  |  +--rw client-identity!
             |  |  |  +--rw (ref-or-explicit)?
             |  |  |     +--:(ref)
             |  |  |     |  +--rw credentials-reference?
             |  |  |     |          sys-tcs-plus:client-credentials-ref
             |  |  |     |          {credential-reference}?

Boucadair, et al.         Expires 14 June 2025                 [Page 31]
Internet-Draft          YANG for TACACS+ over TLS          December 2024

             |  |  |     +--:(explicit)
             |  |  |        +--rw (auth-type)?
             |  |  |           +--:(certificate)
             |  |  |           |  +--rw certificate
             |  |  |           |     +--rw (inline-or-keystore)
             |  |  |           |        +--:(inline)
             |  |  |           |        |        {inline-definitions-\
                                                             supported}?
             |  |  |           |        |  +--rw inline-definition
             |  |  |           |        |     +--rw public-key-format?
             |  |  |           |        |     |       identityref
             |  |  |           |        |     +--rw public-key?
             |  |  |           |        |     |       binary
             |  |  |           |        |     +--rw private-key-format?
             |  |  |           |        |     |       identityref
             |  |  |           |        |     +--rw (private-key-type)
             |  |  |           |        |     |  +--:(cleartext-private\
                                                                   -key)
             |  |  |           |        |     |  |        {cleartext-\
                                                          private-keys}?
             |  |  |           |        |     |  |  +--rw cleartext-\
                                                            private-key?
             |  |  |           |        |     |  |          binary
             |  |  |           |        |     |  +--:(hidden-private-\
                                                                    key)
             |  |  |           |        |     |  |        {hidden-\
                                                          private-keys}?
             |  |  |           |        |     |  |  +--rw hidden-\
                                                            private-key?
             |  |  |           |        |     |  |          empty
             |  |  |           |        |     |  +--:(encrypted-private\
                                                                   -key)
             |  |  |           |        |     |           {encrypted-\
                                                          private-keys}?
             |  |  |           |        |     |     +--rw encrypted-\
                                                             private-key
             |  |  |           |        |     |        +--rw encrypted-\
                                                                      by
             |  |  |           |        |     |        +--rw encrypted-\
                                                            value-format
             |  |  |           |        |     |        |       \
                                                             identityref
             |  |  |           |        |     |        +--rw encrypted-\
                                                                   value
             |  |  |           |        |     |                binary
             |  |  |           |        |     +--rw cert-data?
             |  |  |           |        |     |       end-entity-cert-\
                                                                     cms

Boucadair, et al.         Expires 14 June 2025                 [Page 32]
Internet-Draft          YANG for TACACS+ over TLS          December 2024

             |  |  |           |        |     +---n certificate-\
                                                              expiration
             |  |  |           |        |     |       {certificate-\
                                               expiration-notification}?
             |  |  |           |        |     |  +-- expiration-date
             |  |  |           |        |     |          yang:date-and-\
                                                                    time
             |  |  |           |        |     +---x generate-csr
             |  |  |           |        |             {csr-generation}?
             |  |  |           |        |        +---w input
             |  |  |           |        |        |  +---w csr-format
             |  |  |           |        |        |  |       identityref
             |  |  |           |        |        |  +---w csr-info
             |  |  |           |        |        |          csr-info
             |  |  |           |        |        +--ro output
             |  |  |           |        |           +--ro (csr-type)
             |  |  |           |        |              +--:(p10-csr)
             |  |  |           |        |                 +--ro p10-csr?
             |  |  |           |        |                         p10-\
                                                                     csr
             |  |  |           |        +--:(central-keystore)
             |  |  |           |                 {central-keystore-\
                                             supported,asymmetric-keys}?
             |  |  |           |           +--rw central-keystore-\
                                                               reference
             |  |  |           |              +--rw asymmetric-key?
             |  |  |           |              |       ks:central-\
                                                      asymmetric-key-ref
             |  |  |           |              |       {central-keystore\
                                            -supported,asymmetric-keys}?
             |  |  |           |              +--rw certificate?
             |  |  |           |                      leafref
             |  |  |           +--:(raw-public-key)
             |  |  |           |        {tlsc:client-ident-raw-public-\
                                                                   key}?
             |  |  |           |  +--rw raw-private-key
             |  |  |           |     +--rw (inline-or-keystore)
             |  |  |           |        +--:(inline)
             |  |  |           |        |        {inline-definitions-\
                                                             supported}?
             |  |  |           |        |  +--rw inline-definition
             |  |  |           |        |     +--rw public-key-format?
             |  |  |           |        |     |       identityref
             |  |  |           |        |     +--rw public-key?
             |  |  |           |        |     |       binary
             |  |  |           |        |     +--rw private-key-format?
             |  |  |           |        |     |       identityref
             |  |  |           |        |     +--rw (private-key-type)

Boucadair, et al.         Expires 14 June 2025                 [Page 33]
Internet-Draft          YANG for TACACS+ over TLS          December 2024

             |  |  |           |        |        +--:(cleartext-private\
                                                                   -key)
             |  |  |           |        |        |        {cleartext-\
                                                          private-keys}?
             |  |  |           |        |        |  +--rw cleartext-\
                                                            private-key?
             |  |  |           |        |        |          binary
             |  |  |           |        |        +--:(hidden-private-\
                                                                    key)
             |  |  |           |        |        |        {hidden-\
                                                          private-keys}?
             |  |  |           |        |        |  +--rw hidden-\
                                                            private-key?
             |  |  |           |        |        |          empty
             |  |  |           |        |        +--:(encrypted-private\
                                                                   -key)
             |  |  |           |        |                 {encrypted-\
                                                          private-keys}?
             |  |  |           |        |           +--rw encrypted-\
                                                             private-key
             |  |  |           |        |              +--rw encrypted-\
                                                                      by
             |  |  |           |        |              +--rw encrypted-\
                                                            value-format
             |  |  |           |        |              |       \
                                                             identityref
             |  |  |           |        |              +--rw encrypted-\
                                                                   value
             |  |  |           |        |                      binary
             |  |  |           |        +--:(central-keystore)
             |  |  |           |                 {central-keystore-\
                                             supported,asymmetric-keys}?
             |  |  |           |           +--rw central-keystore-\
                                                              reference?
             |  |  |           |                   ks:central-\
                                                      asymmetric-key-ref
             |  |  |           +--:(tls13-epsk)
             |  |  |                    {tlsc:client-ident-tls13-epsk}?
             |  |  |              +--rw tls13-epsk
             |  |  |                 +--rw (inline-or-keystore)
             |  |  |                 |  +--:(inline)
             |  |  |                 |  |        {inline-definitions-\
                                                             supported}?
             |  |  |                 |  |  +--rw inline-definition
             |  |  |                 |  |     +--rw key-format?
             |  |  |                 |  |     |       identityref
             |  |  |                 |  |     +--rw (key-type)
             |  |  |                 |  |        +--:(cleartext-\

Boucadair, et al.         Expires 14 June 2025                 [Page 34]
Internet-Draft          YANG for TACACS+ over TLS          December 2024

                                                          symmetric-key)
             |  |  |                 |  |        |  +--rw cleartext-\
                                                          symmetric-key?
             |  |  |                 |  |        |          binary
             |  |  |                 |  |        |          {cleartext-\
                                                        symmetric-keys}?
             |  |  |                 |  |        +--:(hidden-symmetric-\
                                                                    key)
             |  |  |                 |  |        |        {hidden-\
                                                        symmetric-keys}?
             |  |  |                 |  |        |  +--rw hidden-\
                                                          symmetric-key?
             |  |  |                 |  |        |          empty
             |  |  |                 |  |        +--:(encrypted-\
                                                          symmetric-key)
             |  |  |                 |  |                 {encrypted-\
                                                        symmetric-keys}?
             |  |  |                 |  |           +--rw encrypted-\
                                                           symmetric-key
             |  |  |                 |  |              +--rw encrypted-\
                                                                      by
             |  |  |                 |  |              +--rw encrypted-\
                                                            value-format
             |  |  |                 |  |              |       \
                                                             identityref
             |  |  |                 |  |              +--rw encrypted-\
                                                                   value
             |  |  |                 |  |                      binary
             |  |  |                 |  +--:(central-keystore)
             |  |  |                 |           {central-keystore-\
                                              supported,symmetric-keys}?
             |  |  |                 |     +--rw central-keystore-\
                                                              reference?
             |  |  |                 |             ks:central-symmetric\
                                                                -key-ref
             |  |  |                 +--rw external-identity
             |  |  |                 |       string
             |  |  |                 +--rw hash?
             |  |  |                 |       tlscmn:epsk-supported-hash
             |  |  |                 +--rw context?
             |  |  |                 |       string
             |  |  |                 +--rw target-protocol?
             |  |  |                 |       uint16
             |  |  |                 +--rw target-kdf?
             |  |  |                         uint16
             |  |  +--rw server-authentication
             |  |  |  +--rw (ref-or-explicit)?
             |  |  |     +--:(ref)

Boucadair, et al.         Expires 14 June 2025                 [Page 35]
Internet-Draft          YANG for TACACS+ over TLS          December 2024

             |  |  |     |  +--rw credentials-reference?
             |  |  |     |          sys-tcs-plus:server-credentials-ref
             |  |  |     |          {credential-reference}?
             |  |  |     +--:(explicit)
             |  |  |        +--rw ca-certs!
             |  |  |        |  +--rw (inline-or-truststore)
             |  |  |        |     +--:(inline)
             |  |  |        |     |        {inline-definitions-\
                                                             supported}?
             |  |  |        |     |  +--rw inline-definition
             |  |  |        |     |     +--rw certificate* [name]
             |  |  |        |     |        +--rw name
             |  |  |        |     |        |       string
             |  |  |        |     |        +--rw cert-data
             |  |  |        |     |        |       trust-anchor-cert-cms
             |  |  |        |     |        +---n certificate-expiration
             |  |  |        |     |                {certificate-\
                                               expiration-notification}?
             |  |  |        |     |           +-- expiration-date
             |  |  |        |     |                   yang:date-and-time
             |  |  |        |     +--:(central-truststore)
             |  |  |        |              {central-truststore-\
                                                supported,certificates}?
             |  |  |        |        +--rw central-truststore-reference?
             |  |  |        |                ts:central-certificate-bag\
                                                                    -ref
             |  |  |        +--rw ee-certs!
             |  |  |        |  +--rw (inline-or-truststore)
             |  |  |        |     +--:(inline)
             |  |  |        |     |        {inline-definitions-\
                                                             supported}?
             |  |  |        |     |  +--rw inline-definition
             |  |  |        |     |     +--rw certificate* [name]
             |  |  |        |     |        +--rw name
             |  |  |        |     |        |       string
             |  |  |        |     |        +--rw cert-data
             |  |  |        |     |        |       trust-anchor-cert-cms
             |  |  |        |     |        +---n certificate-expiration
             |  |  |        |     |                {certificate-\
                                               expiration-notification}?
             |  |  |        |     |           +-- expiration-date
             |  |  |        |     |                   yang:date-and-time
             |  |  |        |     +--:(central-truststore)
             |  |  |        |              {central-truststore-\
                                                supported,certificates}?
             |  |  |        |        +--rw central-truststore-reference?
             |  |  |        |                ts:central-certificate-bag\
                                                                    -ref

Boucadair, et al.         Expires 14 June 2025                 [Page 36]
Internet-Draft          YANG for TACACS+ over TLS          December 2024

             |  |  |        +--rw raw-public-keys!
             |  |  |        |       {tlsc:server-auth-raw-public-key}?
             |  |  |        |  +--rw (inline-or-truststore)
             |  |  |        |     +--:(inline)
             |  |  |        |     |        {inline-definitions-\
                                                             supported}?
             |  |  |        |     |  +--rw inline-definition
             |  |  |        |     |     +--rw public-key* [name]
             |  |  |        |     |        +--rw name
             |  |  |        |     |        |       string
             |  |  |        |     |        +--rw public-key-format
             |  |  |        |     |        |       identityref
             |  |  |        |     |        +--rw public-key
             |  |  |        |     |                binary
             |  |  |        |     +--:(central-truststore)
             |  |  |        |              {central-truststore-\
                                                 supported,public-keys}?
             |  |  |        |        +--rw central-truststore-reference?
             |  |  |        |                ts:central-public-key-bag-\
                                                                     ref
             |  |  |        +--rw tls13-epsks?             empty
             |  |  |                {tlsc:server-auth-tls13-epsk}?
             |  |  +--rw hello-params {tlscmn:hello-params}?
             |  |     +--rw tls-versions
             |  |     |  +--rw min?   identityref
             |  |     |  +--rw max?   identityref
             |  |     +--rw cipher-suites
             |  |        +--rw cipher-suite*
             |  |                tlscsa:tls-cipher-suite-algorithm
             |  +--:(obfuscation)
             |     +--rw shared-secret?           string
             +--rw (source-type)?
             |  +--:(source-ip)
             |  |  +--rw source-ip?               inet:ip-address
             |  +--:(source-interface)
             |     +--rw source-interface?        if:interface-ref
             +--rw vrf-instance?
             |       -> /ni:network-instances/network-instance/name
             +--rw single-connection?             boolean
             +--rw timeout?                       uint16
             +--ro statistics
                +--ro connection-opens?      yang:counter64
                +--ro connection-closes?     yang:counter64
                +--ro connection-aborts?     yang:counter64
                +--ro connection-failures?   yang:counter64
                +--ro connection-timeouts?   yang:counter64
                +--ro messages-sent?         yang:counter64
                +--ro messages-received?     yang:counter64

Boucadair, et al.         Expires 14 June 2025                 [Page 37]
Internet-Draft          YANG for TACACS+ over TLS          December 2024

                +--ro errors-received?       yang:counter64
                +--ro sessions?              yang:counter64

Acknowledgments

   The document leverages data structures defined in [RFC9645].

   Thanks toJoe Clarke and Tom Petch for the review and comments.

Authors' Addresses

   Mohamed Boucadair (editor)
   Orange
   Email: mohamed.boucadair@orange.com

   Bo Wu
   Huawei Technologies
   Email: mlana.wubo@huawei.com

   Guangying Zheng
   Huawei Technologies
   Email: zhengguangying@huawei.com

   Michael Wang
   Huawei Technologies
   Email: wangzitao@huawei.com

Boucadair, et al.         Expires 14 June 2025                 [Page 38]