YANG Groupings for
SSH Clients and SSH ServersWatsen Networkskent+ietf@watsen.netCisco Systemsgarywu@cisco.comHuaweifrank.xialiang@huawei.com
Operations
NETCONF Working GroupThis document defines three YANG modules: the first defines groupings
for a generic SSH client, the second defines groupings for a generic SSH
server, and the third defines common identities and groupings used by
both the client and the server. It is intended that these groupings will
be used by applications using the SSH protocol.This draft contains many placeholder values that need to be replaced
with finalized values at the time of publication. This note summarizes
all of the substitutions that are needed. No other RFC Editor
instructions are specified elsewhere in this document.This document contains references to other drafts in progress, both
in the Normative References section, as well as in body text throughout.
Please update the following references to reflect their final RFC
assignments: I-D.ietf-netconf-trust-anchorsI-D.ietf-netconf-keystoreArtwork in this document contains shorthand references to drafts in
progress. Please apply the following replacements: XXXX --> the assigned RFC value
for this draftYYYY --> the assigned RFC value
for I-D.ietf-netconf-trust-anchorsZZZZ --> the assigned RFC value
for I-D.ietf-netconf-keystoreArtwork in this document contains placeholder values for the date of
publication of this draft. Please apply the following replacement: 2019-10-18 --> the publication
date of this draftThe following Appendix section is to be removed prior to publication:
Appendix A. Change LogThis document defines three YANG 1.1
modules: the first defines a grouping for a generic SSH client, the
second defines a grouping for a generic SSH server, and the third
defines identities and groupings common to both the client and the
server. It is intended that these groupings will be used by applications
using the SSH protocol , , and . For instance, these
groupings could be used to help define the data model for an OpenSSH
server or a NETCONF over SSH based server.The client and server YANG modules in this document each define one
grouping, which is focused on just SSH-specific configuration, and
specifically avoids any transport-level configuration, such as what
ports to listen on or connect to. This affords applications the
opportunity to define their own strategy for how the underlying TCP
connection is established. For instance, applications supporting NETCONF
Call Home could use the "ssh-server-grouping"
grouping for the SSH parts it provides, while adding data nodes for the
TCP-level call-home configuration.The modules defined in this document use groupings defined in enabling keys
to be either locally defined or
a reference to globally configured values.The modules defined in this document optionally support enabling X.509v3 certificate based host keys and
public keys.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
when, and only when,
they appear in all capitals, as shown here.This section provides a tree diagram for
the "ietf-ssh-client" module that does not have groupings
expanded.This section presents two examples showing the ssh-client-grouping
populated with some data. These examples are effectively the same
except the first configures the client identity using a local key
while the second uses a key configured in a keystore. Both examples
are consistent with the examples presented in Section 2 of and Section 3.2 of .The following example configures the client identity using a local
key: The following example configures the client identity using a key
from the keystore: This YANG module has normative references to , and .This section provides a tree diagram for
the "ietf-ssh-server" module that does not have groupings
expanded.This section presents two examples showing the ssh-server-grouping
populated with some data. These examples are effectively the same
except the first configures the server identity using a local key
while the second uses a key configured in a keystore. Both examples
are consistent with the examples presented in Section 2 of and Section 3.2 of .The following example configures the server identity using a local
key: The following example configures the server identity using a key
from the keystore: This YANG module has normative references to and and informative references to
and .The SSH common model presented in this section contains identities
and groupings common to both SSH clients and SSH servers. The
transport-params-grouping can be used to configure the list of SSH
transport algorithms permitted by the SSH client or SSH server. The
lists of algorithms are ordered such that, if multiple algorithms are
permitted by the client, the algorithm that appears first in its list
that is also permitted by the server is used for the SSH transport layer
connection. The ability to restrict the algorithms allowed is
provided in this grouping for SSH clients and SSH servers that are
capable of doing so and may serve to make SSH clients and SSH servers
compliant with security policies. defines six categories
of cryptographic algorithms (hash-algorithm,
symmetric-key-encryption-algorithm, mac-algorithm,
asymmetric-key-encryption-algorithm, signature-algorithm,
key-negotiation-algorithm) and lists several widely accepted algorithms
for each of them. The SSH client and server models use one or more of
these algorithms. The SSH common model includes four parameters for
configuring its permitted SSH algorithms, which are: host-key-alg,
key-exchange-alg, encryption-alg and mac-alg. The following tables are
provided, in part, to define the subset of algorithms defined in the
crypto-types model used by SSH and, in part, to ensure compatibility of
configured SSH cryptographic parameters for configuring its permitted
SSH algorithms ("sshcmn" representing SSH common model, and "ct"
representing crypto-types model which the SSH client/server model is
based on):As is seen in the tables above, the names of the “sshcmn” algorithms
are all identical to the names of algorithms defined in . While appearing to be
redundant, it is important to realize that not all the algorithms
defined in are supported
by SSH. That is, the algorithms supported by SSH are a subset of the
algorithms defined in .
The algorithms used by SSH are redefined in this document in order to
constrain the algorithms that may be selected to just the ones used by
SSH.Features are defined for algorithms that are OPTIONAL or are not
widely supported by popular implementations. Note that the list of
algorithms is not exhaustive. As well, some algorithms that are REQUIRED
by are missing, notably "ssh-dss" and
"diffie-hellman-group1-sha1" due to their weak security and there being
alternatives that are widely supported.The following tree diagram provides an
overview of the data model for the "ietf-ssh-common" module.This following example illustrates how the
transport-params-grouping appears when populated with some data.This YANG module has normative references to , , , , , and .The YANG modules defined in this document are designed to be accessed
via YANG based management protocols, such as NETCONF and RESTCONF . Both of these
protocols have mandatory-to-implement secure transport layers (e.g.,
SSH, TLS) with mutual authentication.The NETCONF access control model (NACM)
provides the means to restrict access for particular users to a
pre-configured subset of all available protocol operations and
content.Since the modules in this document only define groupings,
these considerations are primarily for the designers of other modules
that use these groupings.There are a number of data nodes defined in the YANG modules 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) to these data
nodes without proper protection can have a negative effect on network
operations. These are the subtrees and data nodes and their
sensitivity/vulnerability:
All of the nodes defined by the grouping
statement in both the "ietf-ssh-client" and "ietf-ssh-server"
modules are sensitive to write operations. For instance, the
addition or removal of references to keys, certificates,
trusted anchors, etc., or even the modification of transport
or keepalive parameters can dramatically alter the implemented
security policy. For this reason, all the nodes are protected
the NACM extension "default-deny-write".Some of the readable data nodes in the YANG modules 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. These are the subtrees and data nodes
and their sensitivity/vulnerability:
This
subtree in the "ietf-ssh-client" module contains nodes that are
additionally sensitive to read operations such that, in normal use
cases, they should never be returned to a client. Specifically,
the descendent nodes 'password', 'public-key/local-definition/private-key'
and 'certificate/local-definition/private-key'. For this reason,
all of these node are protected by the NACM extension
"default-deny-all".This
subtree in the "ietf-ssh-server" module contains nodes that are
additionally sensitive to read operations such that, in normal use
cases, they should never be returned to a client. Specifically,
the descendent nodes 'host-key/public-key/local-definition/private-key' and
'host-key/certificate/local-definition/private-key'. For this
reason, both of these node are protected by the NACM extension
"default-deny-all".Some of the operations in this YANG module may be considered
sensitive or vulnerable in some network environments. It is
thus important to control access to these operations. These
are the operations and their sensitivity/vulnerability:
The groupings defined in this document
include "action" statements that come from groupings defined
in . Please
consult that document for the security considerations of
the "action" statements defined by the "grouping"
statements defined in this document.This document registers three URIs in the "ns" subregistry of the
IETF XML Registry . Following the format in
, the following registrations are
requested:This document registers three YANG modules in the YANG Module Names
registry . Following the format in , the following registrations are requested:OpenSSHNoted that '0.0.0.0' and '::' might have special meanings.Renamed "keychain" to "keystore".Removed the groupings 'listening-ssh-client-grouping' and
'listening-ssh-server-grouping'. Now modules only contain the
transport-independent groupings.Simplified the "client-auth" part in the ietf-ssh-client
module. It now inlines what it used to point to keystore for.Added cipher suites for various algorithms into new
'ietf-ssh-common' module.Removed 'RESTRICTED' enum from 'password' leaf type.Added a 'must' statement to container 'server-auth' asserting
that at least one of the various auth mechanisms must be
specified.Fixed description statement for leaf 'trusted-ca-certs'.Change title to "YANG Groupings for SSH Clients and SSH
Servers"Added reference to RFC 6668Added RFC 8174 to Requirements Language Section.Enhanced description statement for ietf-ssh-server's
"trusted-ca-certs" leaf.Added mandatory true to ietf-ssh-client's "client-auth"
'choice' statement.Changed the YANG prefix for module ietf-ssh-common from
'sshcom' to 'sshcmn'.Removed the compression algorithms as they are not commonly
configurable in vendors' implementations.Updating descriptions in transport-params-grouping and the
servers's usage of it.Now tree diagrams reference ietf-netmod-yang-tree-diagramsUpdated YANG to use typedefs around leafrefs to common keystore
pathsNow inlines key and certificates (no longer a leafref to
keystore)Merged changes from co-author.Updated to use trust anchors from trust-anchors draft (was
keystore draft)Now uses new keystore grouping enabling asymmetric key to be
either locally defined or a reference to the keystore.factored the ssh-[client|server]-groupings into more reusable
groupings.added if-feature statements for the new "ssh-host-keys" and
"x509-certificates" features defined in
draft-ietf-netconf-trust-anchors.Added a number of compatibility matrices to Section 5 (thanks Frank!)Clarified that any configured "host-key-alg" values need to be
compatible with the configured private key.Updated examples to reflect update to groupings defined in the keystore -09 draft.Add SSH keepalives features and groupings.Prefixed top-level SSH grouping nodes with 'ssh-' and support mashups.Updated copyright date, boilerplate template, affiliation, and folding algorithm.Reformatted the YANG modules.Reformatted lines causing folding to occur.Collapsed all the inner groupings into the top-level grouping.Added a top-level "demux container" inside the top-level grouping.Added NACM statements and updated the Security Considerations section.Added "presence" statements on the "keepalive" containers, as was
needed to address a validation error that appeared after adding the
"must" statements into the NETCONF/RESTCONF client/server modules.Updated the boilerplate text in module-level "description" statement
to match copyeditor convention.Removed the "demux containers", floating the
nacm:default-deny-write to each descendent node, and
adding a note to model designers regarding the potential
need to add their own demux containers.Fixed a couple references (section 2 --> section 3)In the server model, replaced <client-cert-auth>
with <client-authentication> and introduced
'local-or-external' choice.Updated to reflect changes in trust-anchors drafts
(e.g., s/trust-anchors/truststore/g + s/pinned.//)Updated examples to reflect ietf-crypto-types change
(e.g., identities --> enumerations)Updated "server-authentication" and "client-authentication" nodes from
being a leaf of type "ts:host-keys-ref" or "ts:certificates-ref" to a
container that uses "ts:local-or-truststore-host-keys-grouping" or
"ts:local-or-truststore-certs-grouping".The authors would like to thank for following for lively discussions
on list and in the halls (ordered by last name): Andy Bierman, Martin
Bjorklund, Benoit Claise, Mehmet Ersue, Balázs Kovács, David Lamparter,
Alan Luchuk, Ladislav Lhotka, Radek Krejci, Tom Petch, Juergen
Schoenwaelder, Phil Shafer, Sean Turner, Michal Vaško, and Bert
Wijnen.