module ietf-ssh-server {
yang-version 1.1;
namespace "urn:ietf:params:xml:ns:yang:ietf-ssh-server";
prefix sshs;
import ietf-ssh-common {
prefix sshcmn;
revision-date 2019-04-07; // stable grouping definitions
reference
"RFC XXXX: YANG Groupings for SSH Clients and SSH Servers";
}
import ietf-trust-anchors {
prefix ta;
reference
"RFC YYYY: YANG Data Model for Global Trust Anchors";
}
import ietf-keystore {
prefix ks;
reference
"RFC ZZZZ:
YANG Data Model for a Centralized Keystore Mechanism";
}
import ietf-netconf-acm {
prefix nacm;
reference
"RFC 8341: Network Configuration Access Control Model";
}
organization
"IETF NETCONF (Network Configuration) Working Group";
contact
"WG Web:
WG List:
Author: Kent Watsen
Author: Gary Wu ";
description
"This module defines reusable groupings for SSH servers that
can be used as a basis for specific SSH server instances.
Copyright (c) 2019 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
(https://trustee.ietf.org/license-info).
This version of this YANG module is part of RFC XXXX
(https://www.rfc-editor.org/info/rfcXXXX); see the RFC
itself for full legal notices.;
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.";
revision 2019-04-07 {
description
"Initial version";
reference
"RFC XXXX: YANG Groupings for SSH Clients and SSH Servers";
}
// Features
feature ssh-server-transport-params-config {
description
"SSH transport layer parameters are configurable on an SSH
server.";
}
feature ssh-server-keepalives {
description
"Per socket SSH keepalive parameters are configurable for
SSH servers on the server implementing this feature.";
}
// Groupings
grouping ssh-server-grouping {
description
"A reusable grouping for configuring a SSH server without
any consideration for how underlying TCP sessions are
established.";
container ssh-server-parameters {
nacm:default-deny-write;
description
"A container to hold SSH server configuration.";
container server-identity {
description
"The list of host-keys the SSH server will present when
establishing a SSH connection.";
list host-key {
key "name";
min-elements 1;
ordered-by user;
description
"An ordered list of host keys the SSH server will use to
construct its ordered list of algorithms, when sending
its SSH_MSG_KEXINIT message, as defined in Section 7.1
of RFC 4253.";
reference
"RFC 4253: The Secure Shell (SSH) Transport Layer
Protocol";
leaf name {
type string;
description
"An arbitrary name for this host-key";
}
choice host-key-type {
mandatory true;
description
"The type of host key being specified";
container public-key {
uses ks:local-or-keystore-asymmetric-key-grouping;
description
"A locally-defined or referenced asymmetric key pair
to be used for the SSH server's host key.";
reference
"RFC ZZZZ: YANG Data Model for a Centralized
Keystore Mechanism";
}
container certificate {
if-feature "sshcmn:ssh-x509-certs";
uses
ks:local-or-keystore-end-entity-cert-with-key-grouping;
description
"A locally-defined or referenced end-entity
certificate to be used for the SSH server's
host key.";
reference
"RFC ZZZZ: YANG Data Model for a Centralized
Keystore Mechanism";
}
}
}
} // container server-identity
// FIXME: support other auth mechs too? (passwd, key, etc.)
container client-cert-auth {
if-feature "sshcmn:ssh-x509-certs";
description
"A reference to a list of pinned certificate authority (CA)
certificates and a reference to a list of pinned client
certificates.
Note: password and public-key based client authentication
are not configured in this YANG module as they are
expected to be configured by the ietf-system module
defined in RFC 7317.";
reference
"RFC 7317: A YANG Data Model for System Management";
leaf pinned-ca-certs {
if-feature "ta:x509-certificates";
type ta:pinned-certificates-ref;
description
"A reference to a list of certificate authority (CA)
certificates used by the SSH server to authenticate
SSH client certificates. A client certificate is
authenticated if it has a valid chain of trust to
a configured pinned CA certificate.";
reference
"RFC YYYY: YANG Data Model for Global Trust Anchors";
}
leaf pinned-client-certs {
if-feature "ta:x509-certificates";
type ta:pinned-certificates-ref;
description
"A reference to a list of client certificates used by
the SSH server to authenticate SSH client certificates.
A clients certificate is authenticated if it is an
exact match to a configured pinned client certificate.";
reference
"RFC YYYY: YANG Data Model for Global Trust Anchors";
}
} // container client-cert-auth
container transport-params {
if-feature "ssh-server-transport-params-config";
description
"Configurable parameters of the SSH transport layer.";
uses sshcmn:transport-params-grouping;
} // container transport-params
container keepalives {
if-feature "ssh-server-keepalives";
presence "Indicates that keepalives are enabled.";
description
"Configures the keep-alive policy, to proactively test
the aliveness of the SSL client. An unresponsive SSL
client is dropped after approximately max-wait *
max-attempts seconds.";
leaf max-wait {
type uint16 {
range "1..max";
}
units "seconds";
default "30";
description
"Sets the amount of time in seconds after which
if no data has been received from the SSL client,
a SSL-level message will be sent to test the
aliveness of the SSL client.";
}
leaf max-attempts {
type uint8;
default "3";
description
"Sets the maximum number of sequential keep-alive
messages that can fail to obtain a response from
the SSL client before assuming the SSL client is
no longer alive.";
}
} // container keepalives
} // container ssh-server-parameters
} // grouping server-identity-grouping
}