module ietf-system-tacacsplus {
yang-version 1.1;
namespace "urn:ietf:params:xml:ns:yang:ietf-system-tacacsplus";
prefix sys-tcsplus;
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-network-instance {
prefix ni;
reference
"RFC 8529: YANG Data Model for Network Instances";
}
import ietf-interfaces {
prefix if;
reference
"RFC 8343: A YANG Data Model for Interface Management";
}
import ietf-system {
prefix sys;
reference "RFC 7317: A YANG Data Model for System Management";
}
import ietf-netconf-acm {
prefix nacm;
reference "RFC 8341: Network Configuration Access Control Model";
}
organization
"IETF Opsawg (Operations and Management Area Working Group)";
contact
"WG Web:
WG List:
Editor: Guangying Zheng
";
description
"This module provides configuration of TACACS+ client.
Copyright (c) 2018 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 2019-06-20 {
description
"Initial revision.";
reference "foo";
}
feature tacacsplus {
description
"Indicates that the device can be configured as a TACACS+
client.";
reference "draft-ietf-opsawg-tacacs-11: The TACACS+ Protocol";
}
grouping statistics {
description
"Grouping for TACACS+ packets 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;
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 close 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 by the server";
}
leaf errors-received {
type yang:counter64;
description
"Number of error messages received from the server";
}
}
}
grouping tacacsplus {
description
"Grouping for TACACS+ attributes";
container tacacsplus {
if-feature "tacacsplus";
description
"Container for TACACS+ configurations and operations.";
list server {
key "name";
ordered-by user;
description
"List of TACACS+ servers used by the device
When the TACACS+ client is invoked by a calling
application, it sends the query to the first server in
this list. If no response has been received within
'timeout' seconds, the client continues with the next
server in the list. If no response is received from any
server, the client continues with the first server again.
When the client has traversed the list 'attempts' times
without receiving any response, it gives up and returns an
error to the calling application.";
leaf name {
type string;
description
"An arbitrary name for the TACACS+ server.";
}
leaf server-type {
type enumeration {
enum authentication {
description
"The server is an authentication server.";
}
enum authorization {
description
"The server is an authorization server.";
}
enum accounting {
description
"The server is an accounting server.";
}
}
description
"Server type: authentication/authorization/accounting.";
}
leaf address {
type inet:host;
mandatory true;
description
"The address of the TACACS+ server.";
}
leaf port {
type inet:port-number;
default "49";
description
"The port number of TACACS+ Server port.";
}
leaf shared-secret {
type string;
mandatory true;
nacm:default-deny-all;
description
"The shared secret, which is known to both the
TACACS+ client and server. TACACS+ server administrators
SHOULD configure secret keys of minimum
16 characters length.";
reference "TACACS+ protocol:";
}
choice source-type {
description
"The source address type for outbound TACACS+ packets.";
case source-ip {
leaf source-ip {
type inet:ip-address;
description
"Specifies 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 single-connection {
type boolean;
default "false";
description
"Whether the single connection mode is enabled for the
server. By default, the single connection mode is
disabled.";
}
leaf timeout {
type uint16 {
range "1..300";
}
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.";
}
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.";
}
uses statistics;
}
}
}
augment "/sys:system" {
description
"Augment the system model with authorization and accounting
attributes
Augment the system model with the tacacsplus model";
uses tacacsplus;
}
}