idnits 2.17.1
draft-ietf-netconf-ssh-client-server-16.txt:
Checking boilerplate required by RFC 5378 and the IETF Trust (see
https://trustee.ietf.org/license-info):
----------------------------------------------------------------------------
No issues found here.
Checking nits according to https://www.ietf.org/id-info/1id-guidelines.txt:
----------------------------------------------------------------------------
No issues found here.
Checking nits according to https://www.ietf.org/id-info/checklist :
----------------------------------------------------------------------------
No issues found here.
Miscellaneous warnings:
----------------------------------------------------------------------------
== The copyright year in the IETF Trust and authors Copyright Line does not
match the current year
== Line 511 has weird spacing: '...ificate has a...'
-- The document date (November 1, 2019) is 1638 days in the past. Is this
intentional?
Checking references for intended status: Proposed Standard
----------------------------------------------------------------------------
(See RFCs 3967 and 4897 for information about using normative references
to lower-maturity documents in RFCs)
== Outdated reference: A later version (-34) exists of
draft-ietf-netconf-crypto-types-11
== Outdated reference: A later version (-35) exists of
draft-ietf-netconf-keystore-13
== Outdated reference: A later version (-28) exists of
draft-ietf-netconf-trust-anchors-06
Summary: 0 errors (**), 0 flaws (~~), 5 warnings (==), 1 comment (--).
Run idnits with the --verbose option for more detailed information about
the items above.
--------------------------------------------------------------------------------
2 NETCONF Working Group K. Watsen
3 Internet-Draft Watsen Networks
4 Intended status: Standards Track G. Wu
5 Expires: May 4, 2020 Cisco Systems
6 L. Xia
7 Huawei
8 November 1, 2019
10 YANG Groupings for SSH Clients and SSH Servers
11 draft-ietf-netconf-ssh-client-server-16
13 Abstract
15 This document defines three YANG modules: the first defines groupings
16 for a generic SSH client, the second defines groupings for a generic
17 SSH server, and the third defines common identities and groupings
18 used by both the client and the server. It is intended that these
19 groupings will be used by applications using the SSH protocol.
21 Editorial Note (To be removed by RFC Editor)
23 This draft contains many placeholder values that need to be replaced
24 with finalized values at the time of publication. This note
25 summarizes all of the substitutions that are needed. No other RFC
26 Editor instructions are specified elsewhere in this document.
28 This document contains references to other drafts in progress, both
29 in the Normative References section, as well as in body text
30 throughout. Please update the following references to reflect their
31 final RFC assignments:
33 o I-D.ietf-netconf-trust-anchors
35 o I-D.ietf-netconf-keystore
37 Artwork in this document contains shorthand references to drafts in
38 progress. Please apply the following replacements:
40 o "XXXX" --> the assigned RFC value for this draft
42 o "YYYY" --> the assigned RFC value for I-D.ietf-netconf-trust-
43 anchors
45 o "ZZZZ" --> the assigned RFC value for I-D.ietf-netconf-keystore
47 Artwork in this document contains placeholder values for the date of
48 publication of this draft. Please apply the following replacement:
50 o "2019-11-02" --> the publication date of this draft
52 The following Appendix section is to be removed prior to publication:
54 o Appendix A. Change Log
56 Status of This Memo
58 This Internet-Draft is submitted in full conformance with the
59 provisions of BCP 78 and BCP 79.
61 Internet-Drafts are working documents of the Internet Engineering
62 Task Force (IETF). Note that other groups may also distribute
63 working documents as Internet-Drafts. The list of current Internet-
64 Drafts is at https://datatracker.ietf.org/drafts/current/.
66 Internet-Drafts are draft documents valid for a maximum of six months
67 and may be updated, replaced, or obsoleted by other documents at any
68 time. It is inappropriate to use Internet-Drafts as reference
69 material or to cite them other than as "work in progress."
71 This Internet-Draft will expire on May 4, 2020.
73 Copyright Notice
75 Copyright (c) 2019 IETF Trust and the persons identified as the
76 document authors. All rights reserved.
78 This document is subject to BCP 78 and the IETF Trust's Legal
79 Provisions Relating to IETF Documents
80 (https://trustee.ietf.org/license-info) in effect on the date of
81 publication of this document. Please review these documents
82 carefully, as they describe your rights and restrictions with respect
83 to this document. Code Components extracted from this document must
84 include Simplified BSD License text as described in Section 4.e of
85 the Trust Legal Provisions and are provided without warranty as
86 described in the Simplified BSD License.
88 Table of Contents
90 1. Introduction . . . . . . . . . . . . . . . . . . . . . . . . 3
91 2. Terminology . . . . . . . . . . . . . . . . . . . . . . . . . 4
92 3. The SSH Client Model . . . . . . . . . . . . . . . . . . . . 4
93 3.1. Tree Diagram . . . . . . . . . . . . . . . . . . . . . . 4
94 3.2. Example Usage . . . . . . . . . . . . . . . . . . . . . . 5
95 3.3. YANG Module . . . . . . . . . . . . . . . . . . . . . . . 8
96 4. The SSH Server Model . . . . . . . . . . . . . . . . . . . . 13
97 4.1. Tree Diagram . . . . . . . . . . . . . . . . . . . . . . 13
98 4.2. Example Usage . . . . . . . . . . . . . . . . . . . . . . 14
99 4.3. YANG Module . . . . . . . . . . . . . . . . . . . . . . . 18
100 5. The SSH Common Model . . . . . . . . . . . . . . . . . . . . 25
101 5.1. Tree Diagram . . . . . . . . . . . . . . . . . . . . . . 28
102 5.2. Example Usage . . . . . . . . . . . . . . . . . . . . . . 28
103 5.3. YANG Module . . . . . . . . . . . . . . . . . . . . . . . 29
104 6. Security Considerations . . . . . . . . . . . . . . . . . . . 39
105 7. IANA Considerations . . . . . . . . . . . . . . . . . . . . . 40
106 7.1. The IETF XML Registry . . . . . . . . . . . . . . . . . . 40
107 7.2. The YANG Module Names Registry . . . . . . . . . . . . . 41
108 8. References . . . . . . . . . . . . . . . . . . . . . . . . . 41
109 8.1. Normative References . . . . . . . . . . . . . . . . . . 41
110 8.2. Informative References . . . . . . . . . . . . . . . . . 43
111 Appendix A. Change Log . . . . . . . . . . . . . . . . . . . . . 45
112 A.1. 00 to 01 . . . . . . . . . . . . . . . . . . . . . . . . 45
113 A.2. 01 to 02 . . . . . . . . . . . . . . . . . . . . . . . . 45
114 A.3. 02 to 03 . . . . . . . . . . . . . . . . . . . . . . . . 45
115 A.4. 03 to 04 . . . . . . . . . . . . . . . . . . . . . . . . 45
116 A.5. 04 to 05 . . . . . . . . . . . . . . . . . . . . . . . . 46
117 A.6. 05 to 06 . . . . . . . . . . . . . . . . . . . . . . . . 46
118 A.7. 06 to 07 . . . . . . . . . . . . . . . . . . . . . . . . 46
119 A.8. 07 to 08 . . . . . . . . . . . . . . . . . . . . . . . . 46
120 A.9. 08 to 09 . . . . . . . . . . . . . . . . . . . . . . . . 46
121 A.10. 09 to 10 . . . . . . . . . . . . . . . . . . . . . . . . 47
122 A.11. 10 to 11 . . . . . . . . . . . . . . . . . . . . . . . . 47
123 A.12. 11 to 12 . . . . . . . . . . . . . . . . . . . . . . . . 47
124 A.13. 12 to 13 . . . . . . . . . . . . . . . . . . . . . . . . 47
125 A.14. 13 to 14 . . . . . . . . . . . . . . . . . . . . . . . . 47
126 A.15. 14 to 15 . . . . . . . . . . . . . . . . . . . . . . . . 48
127 A.16. 15 to 16 . . . . . . . . . . . . . . . . . . . . . . . . 48
128 Acknowledgements . . . . . . . . . . . . . . . . . . . . . . . . 48
129 Authors' Addresses . . . . . . . . . . . . . . . . . . . . . . . 48
131 1. Introduction
133 This document defines three YANG 1.1 [RFC7950] modules: the first
134 defines a grouping for a generic SSH client, the second defines a
135 grouping for a generic SSH server, and the third defines identities
136 and groupings common to both the client and the server. It is
137 intended that these groupings will be used by applications using the
138 SSH protocol [RFC4252], [RFC4253], and [RFC4254]. For instance,
139 these groupings could be used to help define the data model for an
140 OpenSSH [OPENSSH] server or a NETCONF over SSH [RFC6242] based
141 server.
143 The client and server YANG modules in this document each define one
144 grouping, which is focused on just SSH-specific configuration, and
145 specifically avoids any transport-level configuration, such as what
146 ports to listen on or connect to. This affords applications the
147 opportunity to define their own strategy for how the underlying TCP
148 connection is established. For instance, applications supporting
149 NETCONF Call Home [RFC8071] could use the "ssh-server-grouping"
150 grouping for the SSH parts it provides, while adding data nodes for
151 the TCP-level call-home configuration.
153 The modules defined in this document use groupings defined in
154 [I-D.ietf-netconf-keystore] enabling keys to be either locally
155 defined or a reference to globally configured values.
157 The modules defined in this document optionally support [RFC6187]
158 enabling X.509v3 certificate based host keys and public keys.
160 2. Terminology
162 The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT",
163 "SHOULD", "SHOULD NOT", "RECOMMENDED", "NOT RECOMMENDED", "MAY", and
164 "OPTIONAL" in this document are to be interpreted as described in BCP
165 14 [RFC2119] [RFC8174] when, and only when, they appear in all
166 capitals, as shown here.
168 3. The SSH Client Model
170 3.1. Tree Diagram
172 This section provides a tree diagram [RFC8340] for the "ietf-ssh-
173 client" module that does not have groupings expanded.
175 ========== NOTE: '\' line wrapping per BCP XXX (RFC XXXX) ===========
177 module: ietf-ssh-client
179 grouping ssh-client-grouping
180 +-- client-identity
181 | +-- username? string
182 | +-- (auth-type)
183 | +--:(password)
184 | | +-- password? string
185 | +--:(public-key)
186 | | +-- public-key
187 | | +---u ks:local-or-keystore-asymmetric-key-grouping
188 | +--:(certificate)
189 | +-- certificate {sshcmn:ssh-x509-certs}?
190 | +---u ks:local-or-keystore-end-entity-cert-with-key-\
191 grouping
192 +-- server-authentication
193 | +-- ssh-host-keys!
194 | | +---u ts:local-or-truststore-host-keys-grouping
195 | +-- ca-certs! {sshcmn:ssh-x509-certs}?
196 | | +---u ts:local-or-truststore-certs-grouping
197 | +-- server-certs! {sshcmn:ssh-x509-certs}?
198 | +---u ts:local-or-truststore-certs-grouping
199 +-- transport-params {ssh-client-transport-params-config}?
200 | +---u sshcmn:transport-params-grouping
201 +-- keepalives! {ssh-client-keepalives}?
202 +-- max-wait? uint16
203 +-- max-attempts? uint8
205 3.2. Example Usage
207 This section presents two examples showing the ssh-client-grouping
208 populated with some data. These examples are effectively the same
209 except the first configures the client identity using a local key
210 while the second uses a key configured in a keystore. Both examples
211 are consistent with the examples presented in Section 2 of
212 [I-D.ietf-netconf-trust-anchors] and Section 3.2 of
213 [I-D.ietf-netconf-keystore].
215 The following example configures the client identity using a local
216 key:
218 ========== NOTE: '\' line wrapping per BCP XXX (RFC XXXX) ===========
220
223
224
225 foobar
226
227
228 rsa2048
229 base64encodedvalue==
230 base64encodedvalue==
231
232
233
235
236
237
238 explicitly-trusted-ssh-host-keys
240
241
243
244
245 algs:ssh-rsa
246
247
248
249 algs:diffie-hellman-group-exchange-sha256
250
251
252
253 algs:aes256-ctr
254 algs:aes192-ctr
255 algs:aes128-ctr
256 algs:aes256-cbc
257 algs:aes192-cbc
258 algs:aes128-cbc
259
260
261 algs:hmac-sha2-256
262 algs:hmac-sha2-512
263
264
266
267 30
268 3
269
271
273 The following example configures the client identity using a key from
274 the keystore:
276 ========== NOTE: '\' line wrapping per BCP XXX (RFC XXXX) ===========
278
282
283
284 foobar
285
286 rsa-asymmetric-key
287
288
290
291
292
293 explicitly-trusted-ssh-host-keys
295
296
298
299
300 algs:ssh-rsa
301
302
303
304 algs:diffie-hellman-group-exchange-sha256
305
306
307
308 algs:aes256-ctr
309 algs:aes192-ctr
310 algs:aes128-ctr
311 algs:aes256-cbc
312 algs:aes192-cbc
313 algs:aes128-cbc
314
315
316 algs:hmac-sha2-256
317 algs:hmac-sha2-512
318
320
322
323 30
324 3
325
327
329 3.3. YANG Module
331 This YANG module has normative references to
332 [I-D.ietf-netconf-trust-anchors], and [I-D.ietf-netconf-keystore].
334 file "ietf-ssh-client@2019-11-02.yang"
336 module ietf-ssh-client {
337 yang-version 1.1;
338 namespace "urn:ietf:params:xml:ns:yang:ietf-ssh-client";
339 prefix sshc;
341 import ietf-ssh-common {
342 prefix sshcmn;
343 revision-date 2019-11-02; // stable grouping definitions
344 reference
345 "RFC XXXX: YANG Groupings for SSH Clients and SSH Servers";
346 }
348 import ietf-truststore {
349 prefix ts;
350 reference
351 "RFC YYYY: A YANG Data Model for a Truststore";
352 }
354 import ietf-keystore {
355 prefix ks;
356 reference
357 "RFC ZZZZ: A YANG Data Model for a Keystore";
358 }
360 import ietf-netconf-acm {
361 prefix nacm;
362 reference
363 "RFC 8341: Network Configuration Access Control Model";
364 }
366 organization
367 "IETF NETCONF (Network Configuration) Working Group";
369 contact
370 "WG Web:
371 WG List:
372 Author: Kent Watsen
373 Author: Gary Wu ";
375 description
376 "This module defines reusable groupings for SSH clients that
377 can be used as a basis for specific SSH client instances.
379 Copyright (c) 2019 IETF Trust and the persons identified
380 as authors of the code. All rights reserved.
382 Redistribution and use in source and binary forms, with
383 or without modification, is permitted pursuant to, and
384 subject to the license terms contained in, the Simplified
385 BSD License set forth in Section 4.c of the IETF Trust's
386 Legal Provisions Relating to IETF Documents
387 (https://trustee.ietf.org/license-info).
389 This version of this YANG module is part of RFC XXXX
390 (https://www.rfc-editor.org/info/rfcXXXX); see the RFC
391 itself for full legal notices.;
393 The key words 'MUST', 'MUST NOT', 'REQUIRED', 'SHALL',
394 'SHALL NOT', 'SHOULD', 'SHOULD NOT', 'RECOMMENDED',
395 'NOT RECOMMENDED', 'MAY', and 'OPTIONAL' in this document
396 are to be interpreted as described in BCP 14 (RFC 2119)
397 (RFC 8174) when, and only when, they appear in all
398 capitals, as shown here.";
400 revision 2019-11-02 {
401 description
402 "Initial version";
403 reference
404 "RFC XXXX: YANG Groupings for SSH Clients and SSH Servers";
405 }
407 // Features
409 feature ssh-client-transport-params-config {
410 description
411 "SSH transport layer parameters are configurable on an SSH
412 client.";
413 }
415 feature ssh-client-keepalives {
416 description
417 "Per socket SSH keepalive parameters are configurable for
418 SSH clients on the server implementing this feature.";
419 }
421 // Groupings
423 grouping ssh-client-grouping {
424 description
425 "A reusable grouping for configuring a SSH client without
426 any consideration for how an underlying TCP session is
427 established.
429 Note that this grouping uses fairly typical descendent
430 node names such that a stack of 'uses' statements will
431 have name conflicts. It is intended that the consuming
432 data model will resolve the issue (e.g., by wrapping
433 the 'uses' statement in a container called
434 'ssh-client-parameters'). This model purposely does
435 not do this itself so as to provide maximum flexibility
436 to consuming models.";
438 container client-identity {
439 nacm:default-deny-write;
440 description
441 "The credentials used by the client to authenticate to
442 the SSH server.";
443 leaf username {
444 type string;
445 description
446 "The username of this user. This will be the username
447 used, for instance, to log into an SSH server.";
448 }
449 choice auth-type {
450 mandatory true;
451 description
452 "The authentication type. What happens when more than
453 one decendent is configured is undefined. FIXME.";
454 leaf password {
455 nacm:default-deny-all;
456 type string;
457 description
458 "A password to be used for client authentication.";
459 }
460 container public-key {
461 uses ks:local-or-keystore-asymmetric-key-grouping;
462 description
463 "A locally-defined or referenced asymmetric key
464 pair to be used for client authentication.";
466 reference
467 "RFC ZZZZ: YANG Data Model for a Centralized
468 Keystore Mechanism";
469 }
470 container certificate {
471 if-feature "sshcmn:ssh-x509-certs";
472 uses
473 ks:local-or-keystore-end-entity-cert-with-key-grouping;
474 description
475 "A locally-defined or referenced certificate
476 to be used for client authentication.";
477 reference
478 "RFC ZZZZ: YANG Data Model for a Centralized
479 Keystore Mechanism";
480 }
481 }
482 } // container client-identity
484 container server-authentication {
485 nacm:default-deny-write;
486 must 'ssh-host-keys or ca-certs or server-certs';
487 description
488 "Trusted server identities. Any combination of trusted
489 server identities is additive and unordered.";
490 container ssh-host-keys {
491 presence
492 "Indicates that the client can authenticate servers
493 using the configured SSH host keys.";
494 description
495 "A list of SSH host keys used by the SSH client to
496 authenticate SSH server host keys. A server host key
497 is authenticated if it is an exact match to a
498 configured SSH host key.";
499 reference
500 "RFC YYYY: YANG Data Model for Global Trust Anchors";
501 uses ts:local-or-truststore-host-keys-grouping;
502 }
503 container ca-certs {
504 if-feature "sshcmn:ssh-x509-certs";
505 presence
506 "Indicates that the client can authenticate servers
507 using the configured trust anchor certificates.";
508 description
509 "A set of certificate authority (CA) certificates used by
510 the SSH client to authenticate SSH servers. A server
511 is authenticated if its certificate has a valid chain
512 of trust to a configured CA certificate.";
513 reference
514 "RFC YYYY: YANG Data Model for Global Trust Anchors";
515 uses ts:local-or-truststore-certs-grouping;
516 }
517 container server-certs {
518 if-feature "sshcmn:ssh-x509-certs";
519 presence
520 "Indicates that the client can authenticate servers
521 using the configured server certificates.";
522 description
523 "A set of end-entity certificates used by the SSH client
524 to authenticate SSH servers. A server is authenticated
525 if its certificate is an exact match to a configured
526 server certificate.";
527 reference
528 "RFC YYYY: YANG Data Model for Global Trust Anchors";
529 uses ts:local-or-truststore-certs-grouping;
530 }
531 } // container server-authentication
533 container transport-params {
534 nacm:default-deny-write;
535 if-feature "ssh-client-transport-params-config";
536 description
537 "Configurable parameters of the SSH transport layer.";
538 uses sshcmn:transport-params-grouping;
539 } // container transport-parameters
541 container keepalives {
542 nacm:default-deny-write;
543 if-feature "ssh-client-keepalives";
544 presence "Indicates that keepalives are enabled.";
545 description
546 "Configures the keep-alive policy, to proactively test
547 the aliveness of the SSH server. An unresponsive TLS
548 server is dropped after approximately max-wait *
549 max-attempts seconds.";
550 leaf max-wait {
551 type uint16 {
552 range "1..max";
553 }
554 units "seconds";
555 default "30";
556 description
557 "Sets the amount of time in seconds after which if
558 no data has been received from the SSH server, a
559 TLS-level message will be sent to test the
560 aliveness of the SSH server.";
561 }
562 leaf max-attempts {
563 type uint8;
564 default "3";
565 description
566 "Sets the maximum number of sequential keep-alive
567 messages that can fail to obtain a response from
568 the SSH server before assuming the SSH server is
569 no longer alive.";
570 }
571 } // container keepalives
572 } // grouping ssh-client-grouping
573 }
575
577 4. The SSH Server Model
579 4.1. Tree Diagram
581 This section provides a tree diagram [RFC8340] for the "ietf-ssh-
582 server" module that does not have groupings expanded.
584 ========== NOTE: '\' line wrapping per BCP XXX (RFC XXXX) ===========
586 module: ietf-ssh-server
588 grouping ssh-server-grouping
589 +-- server-identity
590 | +-- host-key* [name]
591 | +-- name? string
592 | +-- (host-key-type)
593 | +--:(public-key)
594 | | +-- public-key
595 | | +---u ks:local-or-keystore-asymmetric-key-grouping
596 | +--:(certificate)
597 | +-- certificate {sshcmn:ssh-x509-certs}?
598 | +---u ks:local-or-keystore-end-entity-cert-with-k\
599 ey-grouping
600 +-- client-authentication
601 | +-- supported-authentication-methods
602 | | +-- publickey? empty
603 | | +-- passsword? empty
604 | | +-- hostbased? empty
605 | | +-- none? empty
606 | | +-- other* string
607 | +-- (local-or-external)
608 | +--:(local) {local-client-auth-supported}?
609 | | +-- users
610 | | +-- user* [name]
611 | | +-- name? string
612 | | +-- password? ianach:crypt-hash
613 | | +-- host-keys!
614 | | | +---u ts:local-or-truststore-host-keys-grouping
615 | | +-- ca-certs! {sshcmn:ssh-x509-certs}?
616 | | | +---u ts:local-or-truststore-certs-grouping
617 | | +-- client-certs! {sshcmn:ssh-x509-certs}?
618 | | +---u ts:local-or-truststore-certs-grouping
619 | +--:(external) {external-client-auth-supported}?
620 | +-- client-auth-defined-elsewhere? empty
621 +-- transport-params {ssh-server-transport-params-config}?
622 | +---u sshcmn:transport-params-grouping
623 +-- keepalives! {ssh-server-keepalives}?
624 +-- max-wait? uint16
625 +-- max-attempts? uint8
627 4.2. Example Usage
629 This section presents two examples showing the ssh-server-grouping
630 populated with some data. These examples are effectively the same
631 except the first configures the server identity using a local key
632 while the second uses a key configured in a keystore. Both examples
633 are consistent with the examples presented in Section 2 of
634 [I-D.ietf-netconf-trust-anchors] and Section 3.2 of
635 [I-D.ietf-netconf-keystore].
637 The following example configures the server identity using a local
638 key:
640 ========== NOTE: '\' line wrapping per BCP XXX (RFC XXXX) ===========
642
646
647
648
649 deployment-specific-certificate
650
651
652 rsa2048
653 base64encodedvalue==
654 base64encodedvalue==
655
656
657
658
660
661
662
663
664
665
666
667 mary
668 $0$secret
669
670 explicitly-trusted-ssh-host-keys
672
673
674 explicitly-trusted-client-ca-certs\
675 truststore-reference>
676
677
678 explicitly-trusted-client-certs
680
681
682
683
685
686
687 algs:ssh-rsa
688
689
690
691 algs:diffie-hellman-group-exchange-sha256
692
693
694
695 algs:aes256-ctr
696 algs:aes192-ctr
697 algs:aes128-ctr
698 algs:aes256-cbc
699 algs:aes192-cbc
700 algs:aes128-cbc
701
702
703 algs:hmac-sha2-256
704 algs:hmac-sha2-512
705
706
708
710 The following example configures the server identity using a key from
711 the keystore:
713 ========== NOTE: '\' line wrapping per BCP XXX (RFC XXXX) ===========
715
719
720
721
722 deployment-specific-certificate
723
724 rsa-asymmetric-key
725
726
727
728
729
730
731
732
733
734
735 mary
736 $0$secret
737
738 explicitly-trusted-ssh-host-keys
740
741
742 explicitly-trusted-client-ca-certs\
743 truststore-reference>
744
745
746 explicitly-trusted-client-certs
748
749
750
751
753
754
755 algs:ssh-rsa
756
757
758
759 algs:diffie-hellman-group-exchange-sha256
760
761
762
763 algs:aes256-ctr
764 algs:aes192-ctr
765 algs:aes128-ctr
766 algs:aes256-cbc
767 algs:aes192-cbc
768 algs:aes128-cbc
769
770
771 algs:hmac-sha2-256
772 algs:hmac-sha2-512
773
774
776
778 4.3. YANG Module
780 This YANG module has normative references to
781 [I-D.ietf-netconf-trust-anchors] and [I-D.ietf-netconf-keystore] and
782 informative references to [RFC4253] and [RFC7317].
784 file "ietf-ssh-server@2019-11-02.yang"
786 module ietf-ssh-server {
787 yang-version 1.1;
788 namespace "urn:ietf:params:xml:ns:yang:ietf-ssh-server";
789 prefix sshs;
791 import ietf-ssh-common {
792 prefix sshcmn;
793 revision-date 2019-11-02; // stable grouping definitions
794 reference
795 "RFC XXXX: YANG Groupings for SSH Clients and SSH Servers";
796 }
798 import ietf-truststore {
799 prefix ts;
800 reference
801 "RFC YYYY: A YANG Data Model for a Truststore";
802 }
804 import ietf-keystore {
805 prefix ks;
806 reference
807 "RFC ZZZZ: A YANG Data Model for a Keystore";
808 }
810 import iana-crypt-hash {
811 prefix ianach;
812 reference
813 "RFC 7317: A YANG Data Model for System Management";
814 }
816 import ietf-netconf-acm {
817 prefix nacm;
818 reference
819 "RFC 8341: Network Configuration Access Control Model";
820 }
822 organization
823 "IETF NETCONF (Network Configuration) Working Group";
825 contact
826 "WG Web:
827 WG List:
828 Author: Kent Watsen
829 Author: Gary Wu ";
831 description
832 "This module defines reusable groupings for SSH servers that
833 can be used as a basis for specific SSH server instances.
835 Copyright (c) 2019 IETF Trust and the persons identified
836 as authors of the code. All rights reserved.
838 Redistribution and use in source and binary forms, with
839 or without modification, is permitted pursuant to, and
840 subject to the license terms contained in, the Simplified
841 BSD License set forth in Section 4.c of the IETF Trust's
842 Legal Provisions Relating to IETF Documents
843 (https://trustee.ietf.org/license-info).
845 This version of this YANG module is part of RFC XXXX
846 (https://www.rfc-editor.org/info/rfcXXXX); see the RFC
847 itself for full legal notices.;
849 The key words 'MUST', 'MUST NOT', 'REQUIRED', 'SHALL',
850 'SHALL NOT', 'SHOULD', 'SHOULD NOT', 'RECOMMENDED',
851 'NOT RECOMMENDED', 'MAY', and 'OPTIONAL' in this document
852 are to be interpreted as described in BCP 14 (RFC 2119)
853 (RFC 8174) when, and only when, they appear in all
854 capitals, as shown here.";
856 revision 2019-11-02 {
857 description
858 "Initial version";
859 reference
860 "RFC XXXX: YANG Groupings for SSH Clients and SSH Servers";
861 }
863 // Features
865 feature ssh-server-transport-params-config {
866 description
867 "SSH transport layer parameters are configurable on an SSH
868 server.";
869 }
871 feature ssh-server-keepalives {
872 description
873 "Per socket SSH keepalive parameters are configurable for
874 SSH servers on the server implementing this feature.";
875 }
877 feature local-client-auth-supported {
878 description
879 "Indicates that the SSH server supports local configuration
880 of client credentials.";
881 }
883 feature external-client-auth-supported {
884 description
885 "Indicates that the SSH server supports external configuration
886 of client credentials.";
887 }
889 // Groupings
891 grouping ssh-server-grouping {
892 description
893 "A reusable grouping for configuring a SSH server without
894 any consideration for how underlying TCP sessions are
895 established.
897 Note that this grouping uses fairly typical descendent
898 node names such that a stack of 'uses' statements will
899 have name conflicts. It is intended that the consuming
900 data model will resolve the issue (e.g., by wrapping
901 the 'uses' statement in a container called
902 'ssh-server-parameters'). This model purposely does
903 not do this itself so as to provide maximum flexibility
904 to consuming models.";
906 container server-identity {
907 nacm:default-deny-write;
908 description
909 "The list of host-keys the SSH server will present when
910 establishing a SSH connection.";
911 list host-key {
912 key "name";
913 min-elements 1;
914 ordered-by user;
915 description
916 "An ordered list of host keys the SSH server will use to
917 construct its ordered list of algorithms, when sending
918 its SSH_MSG_KEXINIT message, as defined in Section 7.1
919 of RFC 4253.";
921 reference
922 "RFC 4253: The Secure Shell (SSH) Transport Layer
923 Protocol";
924 leaf name {
925 type string;
926 description
927 "An arbitrary name for this host-key";
928 }
929 choice host-key-type {
930 mandatory true;
931 description
932 "The type of host key being specified";
933 container public-key {
934 uses ks:local-or-keystore-asymmetric-key-grouping;
935 description
936 "A locally-defined or referenced asymmetric key pair
937 to be used for the SSH server's host key.";
938 reference
939 "RFC ZZZZ: YANG Data Model for a Centralized
940 Keystore Mechanism";
941 }
942 container certificate {
943 if-feature "sshcmn:ssh-x509-certs";
944 uses
945 ks:local-or-keystore-end-entity-cert-with-key-grouping;
946 description
947 "A locally-defined or referenced end-entity
948 certificate to be used for the SSH server's
949 host key.";
950 reference
951 "RFC ZZZZ: YANG Data Model for a Centralized
952 Keystore Mechanism";
953 }
954 }
955 }
956 } // container server-identity
958 container client-authentication {
959 nacm:default-deny-write;
960 description
961 "Specifies if SSH client authentication is required or
962 optional, and specifies if the SSH client authentication
963 credentials are configured locally or externally.";
964 container supported-authentication-methods {
965 description
966 "Indicates which authentication methods the server
967 supports.";
968 leaf publickey {
969 type empty;
970 description
971 "Indicates that the 'publickey' method is supported.
972 Note that RFC 6187 X.509v3 Certificates for SSH uses
973 the 'publickey' method name.";
974 reference
975 "RFC 4252: The Secure Shell (SSH) Authentication
976 Protocol.
977 RFC 6187: X.509v3 Certificates for Secure Shell
978 Authentication.";
979 }
980 leaf passsword {
981 type empty;
982 description
983 "Indicates that the 'password' method is supported.";
984 reference
985 "RFC 4252: The Secure Shell (SSH) Authentication
986 Protocol.";
987 }
988 leaf hostbased {
989 type empty;
990 description
991 "Indicates that the 'hostbased' method is supported.";
992 reference
993 "RFC 4252: The Secure Shell (SSH) Authentication
994 Protocol.";
995 }
996 leaf none {
997 type empty;
998 description
999 "Indicates that the 'none' method is supported.";
1000 reference
1001 "RFC 4252: The Secure Shell (SSH) Authentication
1002 Protocol.";
1003 }
1004 leaf-list other {
1005 type string;
1006 description
1007 "Indicates a supported method name not defined by
1008 RFC 4253.";
1009 reference
1010 "RFC 4252: The Secure Shell (SSH) Authentication
1011 Protocol.";
1012 }
1013 }
1015 choice local-or-external {
1016 mandatory true;
1017 description
1018 "Indicates if the credentials needed to authenticate the
1019 clients are configured locally or externally.
1021 Configuring credentials externally enables applications
1022 to place client authentication with client definitions,
1023 rather then in a part of a data model principally
1024 concerned with configuring the SSH transport.";
1025 case local {
1026 if-feature "local-client-auth-supported";
1027 description
1028 "Client credentials are configured locally.";
1029 container users {
1030 description
1031 "A list of locally configured users.";
1032 list user {
1033 key name;
1034 description
1035 "The list of local users configured on this device.";
1037 leaf name {
1038 type string;
1039 description
1040 "The user name string identifying this entry.";
1041 }
1042 leaf password {
1043 type ianach:crypt-hash;
1044 description
1045 "The password for this entry.";
1046 }
1047 container host-keys { // FIXME: plural too much?
1048 presence
1049 "Indicates that the server can authenticate this
1050 user using the configured SSH host keys.";
1051 description
1052 "A set of SSH host keys used by the SSH server to
1053 authenticate this user. A user is authenticated
1054 if its host key is an exact match to a configured
1055 host key.";
1056 reference
1057 "RFC 4253: The Secure Shell (SSH) Transport Layer";
1058 uses ts:local-or-truststore-host-keys-grouping;
1059 }
1060 container ca-certs { // FIXME: plural too much?
1061 if-feature "sshcmn:ssh-x509-certs";
1062 presence
1063 "Indicates that the server can authenticate
1064 this user using the configured trust anchor
1065 certificates.";
1066 description
1067 "A set of certificate authority (CA) certificates
1068 used by the SSH server to authenticate this user.
1069 A user is authenticated if its certificate has
1070 a valid chain of trust to a configured CA
1071 certificate.";
1072 reference
1073 "RFC YYYY:
1074 YANG Data Model for Global Trust Anchors";
1075 uses ts:local-or-truststore-certs-grouping;
1076 }
1077 container client-certs { // FIXME: plural too much?
1078 if-feature "sshcmn:ssh-x509-certs";
1079 presence
1080 "Indicates that the server can authenticate this
1081 user using the configured client certificates.";
1082 description
1083 "A set of end-entity certificates used by the SSH
1084 server to authenticate this user. A user is
1085 authenticated if its certificate is an exact
1086 match to a configured user certificate.";
1087 reference
1088 "RFC YYYY:
1089 YANG Data Model for Global Trust Anchors";
1090 uses ts:local-or-truststore-certs-grouping;
1091 }
1092 } // list user
1093 } // container users
1094 } // case local
1095 case external {
1096 if-feature "external-client-auth-supported";
1097 description
1098 "Client credentials are configured externally, such
1099 as via RADIUS, RFC 7317, or another mechanism.";
1100 leaf client-auth-defined-elsewhere {
1101 type empty;
1102 description
1103 "Indicates that client credentials are configured
1104 elsewhere.";
1105 }
1106 }
1107 } // choice local-or-external
1108 } // container client-authentication
1110 container transport-params {
1111 nacm:default-deny-write;
1112 if-feature "ssh-server-transport-params-config";
1113 description
1114 "Configurable parameters of the SSH transport layer.";
1115 uses sshcmn:transport-params-grouping;
1116 } // container transport-params
1118 container keepalives {
1119 nacm:default-deny-write;
1120 if-feature "ssh-server-keepalives";
1121 presence "Indicates that keepalives are enabled.";
1122 description
1123 "Configures the keep-alive policy, to proactively test
1124 the aliveness of the SSL client. An unresponsive SSL
1125 client is dropped after approximately max-wait *
1126 max-attempts seconds.";
1127 leaf max-wait {
1128 type uint16 {
1129 range "1..max";
1130 }
1131 units "seconds";
1132 default "30";
1133 description
1134 "Sets the amount of time in seconds after which
1135 if no data has been received from the SSL client,
1136 a SSL-level message will be sent to test the
1137 aliveness of the SSL client.";
1138 }
1139 leaf max-attempts {
1140 type uint8;
1141 default "3";
1142 description
1143 "Sets the maximum number of sequential keep-alive
1144 messages that can fail to obtain a response from
1145 the SSL client before assuming the SSL client is
1146 no longer alive.";
1147 }
1148 } // container keepalives
1149 } // grouping server-identity-grouping
1150 }
1152
1154 5. The SSH Common Model
1156 The SSH common model presented in this section contains identities
1157 and groupings common to both SSH clients and SSH servers. The
1158 transport-params-grouping can be used to configure the list of SSH
1159 transport algorithms permitted by the SSH client or SSH server. The
1160 lists of algorithms are ordered such that, if multiple algorithms are
1161 permitted by the client, the algorithm that appears first in its list
1162 that is also permitted by the server is used for the SSH transport
1163 layer connection. The ability to restrict the algorithms allowed is
1164 provided in this grouping for SSH clients and SSH servers that are
1165 capable of doing so and may serve to make SSH clients and SSH servers
1166 compliant with security policies.
1168 [I-D.ietf-netconf-crypto-types] defines six categories of
1169 cryptographic algorithms (hash-algorithm, symmetric-key-encryption-
1170 algorithm, mac-algorithm, asymmetric-key-encryption-algorithm,
1171 signature-algorithm, key-negotiation-algorithm) and lists several
1172 widely accepted algorithms for each of them. The SSH client and
1173 server models use one or more of these algorithms. The SSH common
1174 model includes four parameters for configuring its permitted SSH
1175 algorithms, which are: host-key-alg, key-exchange-alg, encryption-alg
1176 and mac-alg. The following tables are provided, in part, to define
1177 the subset of algorithms defined in the crypto-types model used by
1178 SSH and, in part, to ensure compatibility of configured SSH
1179 cryptographic parameters for configuring its permitted SSH algorithms
1180 ("sshcmn" representing SSH common model, and "ct" representing
1181 crypto-types model which the SSH client/server model is based on):
1183 +-------------------------------+-------------------------------+
1184 | sshcmn:host-key-alg | ct:signature-algorithm |
1185 +-------------------------------+-------------------------------+
1186 | dsa-sha1 | dsa-sha1 |
1187 | rsa-pkcs1-sha1 | rsa-pkcs1-sha1 |
1188 | rsa-pkcs1-sha256 | rsa-pkcs1-sha256 |
1189 | rsa-pkcs1-sha512 | rsa-pkcs1-sha512 |
1190 | ecdsa-secp256r1-sha256 | ecdsa-secp256r1-sha256 |
1191 | ecdsa-secp384r1-sha384 | ecdsa-secp384r1-sha384 |
1192 | ecdsa-secp521r1-sha512 | ecdsa-secp521r1-sha512 |
1193 | x509v3-rsa-pkcs1-sha1 | x509v3-rsa-pkcs1-sha1 |
1194 | x509v3-rsa2048-pkcs1-sha256 | x509v3-rsa2048-pkcs1-sha1 |
1195 | x509v3-ecdsa-secp256r1-sha256 | x509v3-ecdsa-secp256r1-sha256 |
1196 | x509v3-ecdsa-secp384r1-sha384 | x509v3-ecdsa-secp384r1-sha384 |
1197 | x509v3-ecdsa-secp521r1-sha512 | x509v3-ecdsa-secp521r1-sha512 |
1198 +-------------------------------+-------------------------------+
1200 Table 1 The SSH Host-key-alg Compatibility Matrix
1202 +-------------------------------+-------------------------------+
1203 | sshcmn:key-exchange-alg | ct:key-negotiation-algorithm |
1204 +-------------------------------+-------------------------------+
1205 | diffie-hellman-group14-sha1 | diffie-hellman-group14-sha1 |
1206 | diffie-hellman-group14-sha256 | diffie-hellman-group14-sha256 |
1207 | diffie-hellman-group15-sha512 | diffie-hellman-group15-sha512 |
1208 | diffie-hellman-group16-sha512 | diffie-hellman-group16-sha512 |
1209 | diffie-hellman-group17-sha512 | diffie-hellman-group17-sha512 |
1210 | diffie-hellman-group18-sha512 | diffie-hellman-group18-sha512 |
1211 | ecdh-sha2-secp256r1 | ecdh-sha2-secp256r1 |
1212 | ecdh-sha2-secp384r1 | ecdh-sha2-secp384r1 |
1213 +-------------------------------+-------------------------------+
1215 Table 2 The SSH Key-exchange-alg Compatibility Matrix
1217 +-----------------------+---------------------------------------+
1218 | sshcmn:encryption-alg | ct:symmetric-key-encryption-algorithm |
1219 +-----------------------+---------------------------------------+
1220 | aes-128-cbc | aes-128-cbc |
1221 | aes-192-cbc | aes-192-cbc |
1222 | aes-256-cbc | aes-256-cbc |
1223 | aes-128-ctr | aes-128-ctr |
1224 | aes-192-ctr | aes-192-ctr |
1225 | aes-256-ctr | aes-256-ctr |
1226 +-----------------------+---------------------------------------+
1228 Table 3 The SSH Encryption-alg Compatibility Matrix
1230 +----------------+-------------------+
1231 | sshcmn:mac-alg | ct:mac-algorithm |
1232 +----------------+-------------------+
1233 | hmac-sha1 | hmac-sha1 |
1234 | hmac-sha1-96 | hmac-sha1-96 |
1235 | hmac-sha2-256 | hmac-sha2-256 |
1236 | hmac-sha2-512 | hmac-sha2-512 |
1237 +----------------+-------------------+
1239 Table 4 The SSH Mac-alg Compatibility Matrix
1241 As is seen in the tables above, the names of the "sshcmn" algorithms
1242 are all identical to the names of algorithms defined in
1243 [I-D.ietf-netconf-crypto-types]. While appearing to be redundant, it
1244 is important to realize that not all the algorithms defined in
1245 [I-D.ietf-netconf-crypto-types] are supported by SSH. That is, the
1246 algorithms supported by SSH are a subset of the algorithms defined in
1247 [I-D.ietf-netconf-crypto-types]. The algorithms used by SSH are
1248 redefined in this document in order to constrain the algorithms that
1249 may be selected to just the ones used by SSH.
1251 Features are defined for algorithms that are OPTIONAL or are not
1252 widely supported by popular implementations. Note that the list of
1253 algorithms is not exhaustive. As well, some algorithms that are
1254 REQUIRED by [RFC4253] are missing, notably "ssh-dss" and "diffie-
1255 hellman-group1-sha1" due to their weak security and there being
1256 alternatives that are widely supported.
1258 5.1. Tree Diagram
1260 The following tree diagram [RFC8340] provides an overview of the data
1261 model for the "ietf-ssh-common" module.
1263 module: ietf-ssh-common
1265 grouping transport-params-grouping
1266 +-- host-key
1267 | +-- host-key-alg* identityref
1268 +-- key-exchange
1269 | +-- key-exchange-alg* identityref
1270 +-- encryption
1271 | +-- encryption-alg* identityref
1272 +-- mac
1273 +-- mac-alg* identityref
1275 5.2. Example Usage
1277 This following example illustrates how the transport-params-grouping
1278 appears when populated with some data.
1280
1283
1284 algs:x509v3-rsa2048-sha256
1285 algs:ssh-rsa
1286
1287
1288
1289 algs:diffie-hellman-group-exchange-sha256
1290
1291
1292
1293 algs:aes256-ctr
1294 algs:aes192-ctr
1295 algs:aes128-ctr
1296 algs:aes256-cbc
1297 algs:aes192-cbc
1298 algs:aes128-cbc
1299
1300
1301 algs:hmac-sha2-256
1302 algs:hmac-sha2-512
1303
1304
1306 5.3. YANG Module
1308 This YANG module has normative references to [RFC4253], [RFC4344],
1309 [RFC4419], [RFC5656], [RFC6187], and [RFC6668].
1311 file "ietf-ssh-common@2019-11-02.yang"
1313 module ietf-ssh-common {
1314 yang-version 1.1;
1315 namespace "urn:ietf:params:xml:ns:yang:ietf-ssh-common";
1316 prefix sshcmn;
1318 organization
1319 "IETF NETCONF (Network Configuration) Working Group";
1321 contact
1322 "WG Web:
1323 WG List:
1324 Author: Kent Watsen
1325 Author: Gary Wu ";
1327 description
1328 "This module defines a common features, identities, and
1329 groupings for Secure Shell (SSH).
1331 Copyright (c) 2019 IETF Trust and the persons identified
1332 as authors of the code. All rights reserved.
1334 Redistribution and use in source and binary forms, with
1335 or without modification, is permitted pursuant to, and
1336 subject to the license terms contained in, the Simplified
1337 BSD License set forth in Section 4.c of the IETF Trust's
1338 Legal Provisions Relating to IETF Documents
1339 (https://trustee.ietf.org/license-info).
1341 This version of this YANG module is part of RFC XXXX
1342 (https://www.rfc-editor.org/info/rfcXXXX); see the RFC
1343 itself for full legal notices.;
1345 The key words 'MUST', 'MUST NOT', 'REQUIRED', 'SHALL',
1346 'SHALL NOT', 'SHOULD', 'SHOULD NOT', 'RECOMMENDED',
1347 'NOT RECOMMENDED', 'MAY', and 'OPTIONAL' in this document
1348 are to be interpreted as described in BCP 14 (RFC 2119)
1349 (RFC 8174) when, and only when, they appear in all
1350 capitals, as shown here.";
1352 revision 2019-11-02 {
1353 description
1354 "Initial version";
1355 reference
1356 "RFC XXXX: YANG Groupings for SSH Clients and SSH Servers";
1357 }
1359 // Features
1361 feature ssh-ecc {
1362 description
1363 "Elliptic Curve Cryptography is supported for SSH.";
1364 reference
1365 "RFC 5656: Elliptic Curve Algorithm Integration in the
1366 Secure Shell Transport Layer";
1367 }
1369 feature ssh-x509-certs {
1370 description
1371 "X.509v3 certificates are supported for SSH per RFC 6187.";
1372 reference
1373 "RFC 6187: X.509v3 Certificates for Secure Shell
1374 Authentication";
1375 }
1376 feature ssh-dh-group-exchange {
1377 description
1378 "Diffie-Hellman Group Exchange is supported for SSH.";
1379 reference
1380 "RFC 4419: Diffie-Hellman Group Exchange for the
1381 Secure Shell (SSH) Transport Layer Protocol";
1382 }
1384 feature ssh-ctr {
1385 description
1386 "SDCTR encryption mode is supported for SSH.";
1387 reference
1388 "RFC 4344: The Secure Shell (SSH) Transport Layer
1389 Encryption Modes";
1390 }
1392 feature ssh-sha2 {
1393 description
1394 "The SHA2 family of cryptographic hash functions is
1395 supported for SSH.";
1396 reference
1397 "FIPS PUB 180-4: Secure Hash Standard (SHS)";
1398 }
1400 // Identities
1402 identity public-key-alg-base {
1403 description
1404 "Base identity used to identify public key algorithms.";
1405 }
1407 identity ssh-dss {
1408 base public-key-alg-base;
1409 description
1410 "Digital Signature Algorithm using SHA-1 as the
1411 hashing algorithm.";
1412 reference
1413 "RFC 4253:
1414 The Secure Shell (SSH) Transport Layer Protocol";
1415 }
1417 identity ssh-rsa {
1418 base public-key-alg-base;
1419 description
1420 "RSASSA-PKCS1-v1_5 signature scheme using SHA-1 as the
1421 hashing algorithm.";
1422 reference
1423 "RFC 4253:
1425 The Secure Shell (SSH) Transport Layer Protocol";
1426 }
1428 identity ecdsa-sha2-nistp256 {
1429 if-feature "ssh-ecc and ssh-sha2";
1430 base public-key-alg-base;
1431 description
1432 "Elliptic Curve Digital Signature Algorithm (ECDSA) using the
1433 nistp256 curve and the SHA2 family of hashing algorithms.";
1434 reference
1435 "RFC 5656: Elliptic Curve Algorithm Integration in the
1436 Secure Shell Transport Layer";
1437 }
1439 identity ecdsa-sha2-nistp384 {
1440 if-feature "ssh-ecc and ssh-sha2";
1441 base public-key-alg-base;
1442 description
1443 "Elliptic Curve Digital Signature Algorithm (ECDSA) using the
1444 nistp384 curve and the SHA2 family of hashing algorithms.";
1445 reference
1446 "RFC 5656: Elliptic Curve Algorithm Integration in the
1447 Secure Shell Transport Layer";
1448 }
1450 identity ecdsa-sha2-nistp521 {
1451 if-feature "ssh-ecc and ssh-sha2";
1452 base public-key-alg-base;
1453 description
1454 "Elliptic Curve Digital Signature Algorithm (ECDSA) using the
1455 nistp521 curve and the SHA2 family of hashing algorithms.";
1456 reference
1457 "RFC 5656: Elliptic Curve Algorithm Integration in the
1458 Secure Shell Transport Layer";
1459 }
1461 identity x509v3-ssh-rsa {
1462 if-feature "ssh-x509-certs";
1463 base public-key-alg-base;
1464 description
1465 "RSASSA-PKCS1-v1_5 signature scheme using a public key stored
1466 in an X.509v3 certificate and using SHA-1 as the hashing
1467 algorithm.";
1468 reference
1469 "RFC 6187: X.509v3 Certificates for Secure Shell
1470 Authentication";
1471 }
1472 identity x509v3-rsa2048-sha256 {
1473 if-feature "ssh-x509-certs and ssh-sha2";
1474 base public-key-alg-base;
1475 description
1476 "RSASSA-PKCS1-v1_5 signature scheme using a public key stored
1477 in an X.509v3 certificate and using SHA-256 as the hashing
1478 algorithm. RSA keys conveyed using this format MUST have a
1479 modulus of at least 2048 bits.";
1480 reference
1481 "RFC 6187: X.509v3 Certificates for Secure Shell
1482 Authentication";
1483 }
1485 identity x509v3-ecdsa-sha2-nistp256 {
1486 if-feature "ssh-ecc and ssh-x509-certs and ssh-sha2";
1487 base public-key-alg-base;
1488 description
1489 "Elliptic Curve Digital Signature Algorithm (ECDSA)
1490 using the nistp256 curve with a public key stored in
1491 an X.509v3 certificate and using the SHA2 family of
1492 hashing algorithms.";
1493 reference
1494 "RFC 6187: X.509v3 Certificates for Secure Shell
1495 Authentication";
1496 }
1498 identity x509v3-ecdsa-sha2-nistp384 {
1499 if-feature "ssh-ecc and ssh-x509-certs and ssh-sha2";
1500 base public-key-alg-base;
1501 description
1502 "Elliptic Curve Digital Signature Algorithm (ECDSA)
1503 using the nistp384 curve with a public key stored in
1504 an X.509v3 certificate and using the SHA2 family of
1505 hashing algorithms.";
1506 reference
1507 "RFC 6187: X.509v3 Certificates for Secure Shell
1508 Authentication";
1509 }
1511 identity x509v3-ecdsa-sha2-nistp521 {
1512 if-feature "ssh-ecc and ssh-x509-certs and ssh-sha2";
1513 base public-key-alg-base;
1514 description
1515 "Elliptic Curve Digital Signature Algorithm (ECDSA)
1516 using the nistp521 curve with a public key stored in
1517 an X.509v3 certificate and using the SHA2 family of
1518 hashing algorithms.";
1519 reference
1520 "RFC 6187: X.509v3 Certificates for Secure Shell
1521 Authentication";
1522 }
1524 identity key-exchange-alg-base {
1525 description
1526 "Base identity used to identify key exchange algorithms.";
1527 }
1529 identity diffie-hellman-group14-sha1 {
1530 base key-exchange-alg-base;
1531 description
1532 "Diffie-Hellman key exchange with SHA-1 as HASH and
1533 Oakley Group 14 (2048-bit MODP Group).";
1534 reference
1535 "RFC 4253: The Secure Shell (SSH) Transport Layer Protocol";
1536 }
1538 identity diffie-hellman-group-exchange-sha1 {
1539 if-feature "ssh-dh-group-exchange";
1540 base key-exchange-alg-base;
1541 description
1542 "Diffie-Hellman Group and Key Exchange with SHA-1 as HASH.";
1543 reference
1544 "RFC 4419: Diffie-Hellman Group Exchange for the
1545 Secure Shell (SSH) Transport Layer Protocol";
1546 }
1548 identity diffie-hellman-group-exchange-sha256 {
1549 if-feature "ssh-dh-group-exchange and ssh-sha2";
1550 base key-exchange-alg-base;
1551 description
1552 "Diffie-Hellman Group and Key Exchange with SHA-256 as HASH.";
1553 reference
1554 "RFC 4419: Diffie-Hellman Group Exchange for the
1555 Secure Shell (SSH) Transport Layer Protocol";
1556 }
1558 identity ecdh-sha2-nistp256 {
1559 if-feature "ssh-ecc and ssh-sha2";
1560 base key-exchange-alg-base;
1561 description
1562 "Elliptic Curve Diffie-Hellman (ECDH) key exchange using the
1563 nistp256 curve and the SHA2 family of hashing algorithms.";
1564 reference
1565 "RFC 5656: Elliptic Curve Algorithm Integration in the
1566 Secure Shell Transport Layer";
1567 }
1568 identity ecdh-sha2-nistp384 {
1569 if-feature "ssh-ecc and ssh-sha2";
1570 base key-exchange-alg-base;
1571 description
1572 "Elliptic Curve Diffie-Hellman (ECDH) key exchange using the
1573 nistp384 curve and the SHA2 family of hashing algorithms.";
1574 reference
1575 "RFC 5656: Elliptic Curve Algorithm Integration in the
1576 Secure Shell Transport Layer";
1577 }
1579 identity ecdh-sha2-nistp521 {
1580 if-feature "ssh-ecc and ssh-sha2";
1581 base key-exchange-alg-base;
1582 description
1583 "Elliptic Curve Diffie-Hellman (ECDH) key exchange using the
1584 nistp521 curve and the SHA2 family of hashing algorithms.";
1585 reference
1586 "RFC 5656: Elliptic Curve Algorithm Integration in the
1587 Secure Shell Transport Layer";
1588 }
1590 identity encryption-alg-base {
1591 description
1592 "Base identity used to identify encryption algorithms.";
1593 }
1595 identity triple-des-cbc {
1596 base encryption-alg-base;
1597 description
1598 "Three-key 3DES in CBC mode.";
1599 reference
1600 "RFC 4253: The Secure Shell (SSH) Transport Layer Protocol";
1601 }
1603 identity aes128-cbc {
1604 base encryption-alg-base;
1605 description
1606 "AES in CBC mode, with a 128-bit key.";
1607 reference
1608 "RFC 4253: The Secure Shell (SSH) Transport Layer Protocol";
1609 }
1611 identity aes192-cbc {
1612 base encryption-alg-base;
1613 description
1614 "AES in CBC mode, with a 192-bit key.";
1615 reference
1616 "RFC 4253: The Secure Shell (SSH) Transport Layer Protocol";
1617 }
1619 identity aes256-cbc {
1620 base encryption-alg-base;
1621 description
1622 "AES in CBC mode, with a 256-bit key.";
1623 reference
1624 "RFC 4253: The Secure Shell (SSH) Transport Layer Protocol";
1625 }
1627 identity aes128-ctr {
1628 if-feature "ssh-ctr";
1629 base encryption-alg-base;
1630 description
1631 "AES in SDCTR mode, with 128-bit key.";
1632 reference
1633 "RFC 4344: The Secure Shell (SSH) Transport Layer Encryption
1634 Modes";
1635 }
1637 identity aes192-ctr {
1638 if-feature "ssh-ctr";
1639 base encryption-alg-base;
1640 description
1641 "AES in SDCTR mode, with 192-bit key.";
1642 reference
1643 "RFC 4344: The Secure Shell (SSH) Transport Layer Encryption
1644 Modes";
1645 }
1647 identity aes256-ctr {
1648 if-feature "ssh-ctr";
1649 base encryption-alg-base;
1650 description
1651 "AES in SDCTR mode, with 256-bit key.";
1652 reference
1653 "RFC 4344: The Secure Shell (SSH) Transport Layer Encryption
1654 Modes";
1655 }
1657 identity mac-alg-base {
1658 description
1659 "Base identity used to identify message authentication
1660 code (MAC) algorithms.";
1661 }
1663 identity hmac-sha1 {
1664 base mac-alg-base;
1665 description
1666 "HMAC-SHA1";
1667 reference
1668 "RFC 4253: The Secure Shell (SSH) Transport Layer Protocol";
1669 }
1671 identity hmac-sha2-256 {
1672 if-feature "ssh-sha2";
1673 base mac-alg-base;
1674 description
1675 "HMAC-SHA2-256";
1676 reference
1677 "RFC 6668: SHA-2 Data Integrity Verification for the
1678 Secure Shell (SSH) Transport Layer Protocol";
1679 }
1681 identity hmac-sha2-512 {
1682 if-feature "ssh-sha2";
1683 base mac-alg-base;
1684 description
1685 "HMAC-SHA2-512";
1686 reference
1687 "RFC 6668: SHA-2 Data Integrity Verification for the
1688 Secure Shell (SSH) Transport Layer Protocol";
1689 }
1691 // Groupings
1693 grouping transport-params-grouping {
1694 description
1695 "A reusable grouping for SSH transport parameters.";
1696 reference
1697 "RFC 4253: The Secure Shell (SSH) Transport Layer Protocol";
1698 container host-key {
1699 description
1700 "Parameters regarding host key.";
1701 leaf-list host-key-alg {
1702 type identityref {
1703 base public-key-alg-base;
1704 }
1705 ordered-by user;
1706 description
1707 "Acceptable host key algorithms in order of descending
1708 preference. The configured host key algorithms should
1709 be compatible with the algorithm used by the configured
1710 private key. Please see Section 5 of RFC XXXX for
1711 valid combinations.
1713 If this leaf-list is not configured (has zero elements)
1714 the acceptable host key algorithms are implementation-
1715 defined.";
1716 reference
1717 "RFC XXXX: YANG Groupings for SSH Clients and SSH Servers";
1718 }
1719 }
1720 container key-exchange {
1721 description
1722 "Parameters regarding key exchange.";
1723 leaf-list key-exchange-alg {
1724 type identityref {
1725 base key-exchange-alg-base;
1726 }
1727 ordered-by user;
1728 description
1729 "Acceptable key exchange algorithms in order of descending
1730 preference.
1732 If this leaf-list is not configured (has zero elements)
1733 the acceptable key exchange algorithms are implementation
1734 defined.";
1735 }
1736 }
1737 container encryption {
1738 description
1739 "Parameters regarding encryption.";
1740 leaf-list encryption-alg {
1741 type identityref {
1742 base encryption-alg-base;
1743 }
1744 ordered-by user;
1745 description
1746 "Acceptable encryption algorithms in order of descending
1747 preference.
1749 If this leaf-list is not configured (has zero elements)
1750 the acceptable encryption algorithms are implementation
1751 defined.";
1752 }
1753 }
1754 container mac {
1755 description
1756 "Parameters regarding message authentication code (MAC).";
1757 leaf-list mac-alg {
1758 type identityref {
1759 base mac-alg-base;
1760 }
1761 ordered-by user;
1762 description
1763 "Acceptable MAC algorithms in order of descending
1764 preference.
1766 If this leaf-list is not configured (has zero elements)
1767 the acceptable MAC algorithms are implementation-
1768 defined.";
1769 }
1770 }
1771 }
1772 }
1774
1776 6. Security Considerations
1778 The YANG modules defined in this document are designed to be accessed
1779 via YANG based management protocols, such as NETCONF [RFC6241] and
1780 RESTCONF [RFC8040]. Both of these protocols have mandatory-to-
1781 implement secure transport layers (e.g., SSH, TLS) with mutual
1782 authentication.
1784 The NETCONF access control model (NACM) [RFC8341] provides the means
1785 to restrict access for particular users to a pre-configured subset of
1786 all available protocol operations and content.
1788 Since the modules in this document only define groupings, these
1789 considerations are primarily for the designers of other modules that
1790 use these groupings.
1792 There are a number of data nodes defined in the YANG modules that are
1793 writable/creatable/deletable (i.e., config true, which is the
1794 default). These data nodes may be considered sensitive or vulnerable
1795 in some network environments. Write operations (e.g., edit-config)
1796 to these data nodes without proper protection can have a negative
1797 effect on network operations. These are the subtrees and data nodes
1798 and their sensitivity/vulnerability:
1800 *: All of the nodes defined by the grouping statement in both the
1801 "ietf-ssh-client" and "ietf-ssh-server" modules are sensitive
1802 to write operations. For instance, the addition or removal of
1803 references to keys, certificates, trusted anchors, etc., or
1804 even the modification of transport or keepalive parameters can
1805 dramatically alter the implemented security policy. For this
1806 reason, all the nodes are protected the NACM extension
1807 "default-deny-write".
1809 Some of the readable data nodes in the YANG modules may be considered
1810 sensitive or vulnerable in some network environments. It is thus
1811 important to control read access (e.g., via get, get-config, or
1812 notification) to these data nodes. These are the subtrees and data
1813 nodes and their sensitivity/vulnerability:
1815 ssh-client-grouping/client-identity/: This subtree in the "ietf-
1816 ssh-client" module contains nodes that are additionally
1817 sensitive to read operations such that, in normal use cases,
1818 they should never be returned to a client. Specifically, the
1819 descendent nodes 'password', 'public-key/local-definition/
1820 private-key' and 'certificate/local-definition/private-key'.
1821 For this reason, all of these node are protected by the NACM
1822 extension "default-deny-all".
1824 ssh-server-grouping/server-identity/: This subtree in the "ietf-
1825 ssh-server" module contains nodes that are additionally
1826 sensitive to read operations such that, in normal use cases,
1827 they should never be returned to a client. Specifically, the
1828 descendent nodes 'host-key/public-key/local-definition/private-
1829 key' and 'host-key/certificate/local-definition/private-key'.
1830 For this reason, both of these node are protected by the NACM
1831 extension "default-deny-all".
1833 Some of the operations in this YANG module may be considered
1834 sensitive or vulnerable in some network environments. It is thus
1835 important to control access to these operations. These are the
1836 operations and their sensitivity/vulnerability:
1838 *: The groupings defined in this document include "action"
1839 statements that come from groupings defined in
1840 [I-D.ietf-netconf-crypto-types]. Please consult that document
1841 for the security considerations of the "action" statements
1842 defined by the "grouping" statements defined in this document.
1844 7. IANA Considerations
1846 7.1. The IETF XML Registry
1848 This document registers three URIs in the "ns" subregistry of the
1849 IETF XML Registry [RFC3688]. Following the format in [RFC3688], the
1850 following registrations are requested:
1852 URI: urn:ietf:params:xml:ns:yang:ietf-ssh-client
1853 Registrant Contact: The NETCONF WG of the IETF.
1854 XML: N/A, the requested URI is an XML namespace.
1856 URI: urn:ietf:params:xml:ns:yang:ietf-ssh-server
1857 Registrant Contact: The NETCONF WG of the IETF.
1858 XML: N/A, the requested URI is an XML namespace.
1860 URI: urn:ietf:params:xml:ns:yang:ietf-ssh-common
1861 Registrant Contact: The NETCONF WG of the IETF.
1862 XML: N/A, the requested URI is an XML namespace.
1864 7.2. The YANG Module Names Registry
1866 This document registers three YANG modules in the YANG Module Names
1867 registry [RFC6020]. Following the format in [RFC6020], the following
1868 registrations are requested:
1870 name: ietf-ssh-client
1871 namespace: urn:ietf:params:xml:ns:yang:ietf-ssh-client
1872 prefix: sshc
1873 reference: RFC XXXX
1875 name: ietf-ssh-server
1876 namespace: urn:ietf:params:xml:ns:yang:ietf-ssh-server
1877 prefix: sshs
1878 reference: RFC XXXX
1880 name: ietf-ssh-common
1881 namespace: urn:ietf:params:xml:ns:yang:ietf-ssh-common
1882 prefix: sshcmn
1883 reference: RFC XXXX
1885 8. References
1887 8.1. Normative References
1889 [I-D.ietf-netconf-crypto-types]
1890 Watsen, K. and H. Wang, "Common YANG Data Types for
1891 Cryptography", draft-ietf-netconf-crypto-types-11 (work in
1892 progress), October 2019.
1894 [I-D.ietf-netconf-keystore]
1895 Watsen, K., "A YANG Data Model for a Keystore", draft-
1896 ietf-netconf-keystore-13 (work in progress), October 2019.
1898 [I-D.ietf-netconf-trust-anchors]
1899 Watsen, K., "A YANG Data Model for a Truststore", draft-
1900 ietf-netconf-trust-anchors-06 (work in progress), October
1901 2019.
1903 [RFC2119] Bradner, S., "Key words for use in RFCs to Indicate
1904 Requirement Levels", BCP 14, RFC 2119,
1905 DOI 10.17487/RFC2119, March 1997,
1906 .
1908 [RFC4344] Bellare, M., Kohno, T., and C. Namprempre, "The Secure
1909 Shell (SSH) Transport Layer Encryption Modes", RFC 4344,
1910 DOI 10.17487/RFC4344, January 2006,
1911 .
1913 [RFC4419] Friedl, M., Provos, N., and W. Simpson, "Diffie-Hellman
1914 Group Exchange for the Secure Shell (SSH) Transport Layer
1915 Protocol", RFC 4419, DOI 10.17487/RFC4419, March 2006,
1916 .
1918 [RFC5656] Stebila, D. and J. Green, "Elliptic Curve Algorithm
1919 Integration in the Secure Shell Transport Layer",
1920 RFC 5656, DOI 10.17487/RFC5656, December 2009,
1921 .
1923 [RFC6020] Bjorklund, M., Ed., "YANG - A Data Modeling Language for
1924 the Network Configuration Protocol (NETCONF)", RFC 6020,
1925 DOI 10.17487/RFC6020, October 2010,
1926 .
1928 [RFC6187] Igoe, K. and D. Stebila, "X.509v3 Certificates for Secure
1929 Shell Authentication", RFC 6187, DOI 10.17487/RFC6187,
1930 March 2011, .
1932 [RFC6668] Bider, D. and M. Baushke, "SHA-2 Data Integrity
1933 Verification for the Secure Shell (SSH) Transport Layer
1934 Protocol", RFC 6668, DOI 10.17487/RFC6668, July 2012,
1935 .
1937 [RFC7950] Bjorklund, M., Ed., "The YANG 1.1 Data Modeling Language",
1938 RFC 7950, DOI 10.17487/RFC7950, August 2016,
1939 .
1941 [RFC8174] Leiba, B., "Ambiguity of Uppercase vs Lowercase in RFC
1942 2119 Key Words", BCP 14, RFC 8174, DOI 10.17487/RFC8174,
1943 May 2017, .
1945 [RFC8341] Bierman, A. and M. Bjorklund, "Network Configuration
1946 Access Control Model", STD 91, RFC 8341,
1947 DOI 10.17487/RFC8341, March 2018,
1948 .
1950 8.2. Informative References
1952 [OPENSSH] Project, T. O., "OpenSSH", 2016, .
1954 [RFC3688] Mealling, M., "The IETF XML Registry", BCP 81, RFC 3688,
1955 DOI 10.17487/RFC3688, January 2004,
1956 .
1958 [RFC4252] Ylonen, T. and C. Lonvick, Ed., "The Secure Shell (SSH)
1959 Authentication Protocol", RFC 4252, DOI 10.17487/RFC4252,
1960 January 2006, .
1962 [RFC4253] Ylonen, T. and C. Lonvick, Ed., "The Secure Shell (SSH)
1963 Transport Layer Protocol", RFC 4253, DOI 10.17487/RFC4253,
1964 January 2006, .
1966 [RFC4254] Ylonen, T. and C. Lonvick, Ed., "The Secure Shell (SSH)
1967 Connection Protocol", RFC 4254, DOI 10.17487/RFC4254,
1968 January 2006, .
1970 [RFC6241] Enns, R., Ed., Bjorklund, M., Ed., Schoenwaelder, J., Ed.,
1971 and A. Bierman, Ed., "Network Configuration Protocol
1972 (NETCONF)", RFC 6241, DOI 10.17487/RFC6241, June 2011,
1973 .
1975 [RFC6242] Wasserman, M., "Using the NETCONF Protocol over Secure
1976 Shell (SSH)", RFC 6242, DOI 10.17487/RFC6242, June 2011,
1977 .
1979 [RFC7317] Bierman, A. and M. Bjorklund, "A YANG Data Model for
1980 System Management", RFC 7317, DOI 10.17487/RFC7317, August
1981 2014, .
1983 [RFC8040] Bierman, A., Bjorklund, M., and K. Watsen, "RESTCONF
1984 Protocol", RFC 8040, DOI 10.17487/RFC8040, January 2017,
1985 .
1987 [RFC8071] Watsen, K., "NETCONF Call Home and RESTCONF Call Home",
1988 RFC 8071, DOI 10.17487/RFC8071, February 2017,
1989 .
1991 [RFC8340] Bjorklund, M. and L. Berger, Ed., "YANG Tree Diagrams",
1992 BCP 215, RFC 8340, DOI 10.17487/RFC8340, March 2018,
1993 .
1995 Appendix A. Change Log
1997 A.1. 00 to 01
1999 o Noted that '0.0.0.0' and '::' might have special meanings.
2001 o Renamed "keychain" to "keystore".
2003 A.2. 01 to 02
2005 o Removed the groupings 'listening-ssh-client-grouping' and
2006 'listening-ssh-server-grouping'. Now modules only contain the
2007 transport-independent groupings.
2009 o Simplified the "client-auth" part in the ietf-ssh-client module.
2010 It now inlines what it used to point to keystore for.
2012 o Added cipher suites for various algorithms into new 'ietf-ssh-
2013 common' module.
2015 A.3. 02 to 03
2017 o Removed 'RESTRICTED' enum from 'password' leaf type.
2019 o Added a 'must' statement to container 'server-auth' asserting that
2020 at least one of the various auth mechanisms must be specified.
2022 o Fixed description statement for leaf 'trusted-ca-certs'.
2024 A.4. 03 to 04
2026 o Change title to "YANG Groupings for SSH Clients and SSH Servers"
2028 o Added reference to RFC 6668
2030 o Added RFC 8174 to Requirements Language Section.
2032 o Enhanced description statement for ietf-ssh-server's "trusted-ca-
2033 certs" leaf.
2035 o Added mandatory true to ietf-ssh-client's "client-auth" 'choice'
2036 statement.
2038 o Changed the YANG prefix for module ietf-ssh-common from 'sshcom'
2039 to 'sshcmn'.
2041 o Removed the compression algorithms as they are not commonly
2042 configurable in vendors' implementations.
2044 o Updating descriptions in transport-params-grouping and the
2045 servers's usage of it.
2047 o Now tree diagrams reference ietf-netmod-yang-tree-diagrams
2049 o Updated YANG to use typedefs around leafrefs to common keystore
2050 paths
2052 o Now inlines key and certificates (no longer a leafref to keystore)
2054 A.5. 04 to 05
2056 o Merged changes from co-author.
2058 A.6. 05 to 06
2060 o Updated to use trust anchors from trust-anchors draft (was
2061 keystore draft)
2063 o Now uses new keystore grouping enabling asymmetric key to be
2064 either locally defined or a reference to the keystore.
2066 A.7. 06 to 07
2068 o factored the ssh-[client|server]-groupings into more reusable
2069 groupings.
2071 o added if-feature statements for the new "ssh-host-keys" and
2072 "x509-certificates" features defined in draft-ietf-netconf-trust-
2073 anchors.
2075 A.8. 07 to 08
2077 o Added a number of compatibility matrices to Section 5 (thanks
2078 Frank!)
2080 o Clarified that any configured "host-key-alg" values need to be
2081 compatible with the configured private key.
2083 A.9. 08 to 09
2085 o Updated examples to reflect update to groupings defined in the
2086 keystore -09 draft.
2088 o Add SSH keepalives features and groupings.
2090 o Prefixed top-level SSH grouping nodes with 'ssh-' and support
2091 mashups.
2093 o Updated copyright date, boilerplate template, affiliation, and
2094 folding algorithm.
2096 A.10. 09 to 10
2098 o Reformatted the YANG modules.
2100 A.11. 10 to 11
2102 o Reformatted lines causing folding to occur.
2104 A.12. 11 to 12
2106 o Collapsed all the inner groupings into the top-level grouping.
2108 o Added a top-level "demux container" inside the top-level grouping.
2110 o Added NACM statements and updated the Security Considerations
2111 section.
2113 o Added "presence" statements on the "keepalive" containers, as was
2114 needed to address a validation error that appeared after adding
2115 the "must" statements into the NETCONF/RESTCONF client/server
2116 modules.
2118 o Updated the boilerplate text in module-level "description"
2119 statement to match copyeditor convention.
2121 A.13. 12 to 13
2123 o Removed the "demux containers", floating the nacm:default-deny-
2124 write to each descendent node, and adding a note to model
2125 designers regarding the potential need to add their own demux
2126 containers.
2128 o Fixed a couple references (section 2 --> section 3)
2130 o In the server model, replaced with and introduced 'local-or-external' choice.
2133 A.14. 13 to 14
2135 o Updated to reflect changes in trust-anchors drafts (e.g., s/trust-
2136 anchors/truststore/g + s/pinned.//)
2138 A.15. 14 to 15
2140 o Updated examples to reflect ietf-crypto-types change (e.g.,
2141 identities --> enumerations)
2143 o Updated "server-authentication" and "client-authentication" nodes
2144 from being a leaf of type "ts:host-keys-ref" or "ts:certificates-
2145 ref" to a container that uses "ts:local-or-truststore-host-keys-
2146 grouping" or "ts:local-or-truststore-certs-grouping".
2148 A.16. 15 to 16
2150 o Removed unnecessary if-feature statements in the -client and
2151 -server modules.
2153 o Cleaned up some description statements in the -client and -server
2154 modules.
2156 Acknowledgements
2158 The authors would like to thank for following for lively discussions
2159 on list and in the halls (ordered by last name): Andy Bierman, Martin
2160 Bjorklund, Benoit Claise, Mehmet Ersue, Balazs Kovacs, David
2161 Lamparter, Alan Luchuk, Ladislav Lhotka, Radek Krejci, Tom Petch,
2162 Juergen Schoenwaelder, Phil Shafer, Sean Turner, Michal Vasko, and
2163 Bert Wijnen.
2165 Authors' Addresses
2167 Kent Watsen
2168 Watsen Networks
2170 EMail: kent+ietf@watsen.net
2172 Gary Wu
2173 Cisco Systems
2175 EMail: garywu@cisco.com
2177 Liang Xia
2178 Huawei
2180 EMail: frank.xialiang@huawei.com