summaryrefslogtreecommitdiffstats
path: root/sdnr/wt/devicemanager-onap/onf14/provider/src/test/resources/currentRevision/ietf-ssh-server@2019-07-02.yang
blob: 62ecaad21c57cb8a69a56cbb33f0af92432d39f5 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
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-07-02;
    reference
      "RFC XXXX: YANG Groupings for SSH Clients and SSH Servers";
  }
  import ietf-keystore {
    prefix ks;
    reference
      "RFC ZZZZ: A YANG Data Model for a Keystore";
  }
  import iana-crypt-hash {
    prefix ianach;
    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 NETCONF (Network Configuration) Working Group";
  contact
    "WG Web:   <http://datatracker.ietf.org/wg/netconf/>
     WG List:  <mailto:netconf@ietf.org>
     Author:   Kent Watsen <mailto:kent+ietf@watsen.net>
     Author:   Gary Wu <mailto:garywu@cisco.com>";
  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-07-02 {
    description
      "Initial version";
    reference
      "RFC XXXX: YANG Groupings for SSH Clients and SSH Servers";
  }

  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.";
  }

  feature local-client-auth-supported {
    description
      "Indicates that the SSH server supports local configuration
       of client credentials.";
  }

  feature external-client-auth-supported {
    description
      "Indicates that the SSH server supports external configuration
       of client credentials.";
  }

  grouping ssh-server-grouping {
    description
      "A reusable grouping for configuring a SSH server without
       any consideration for how underlying TCP sessions are
       established.

       Note that this grouping uses fairly typical descendent
       node names such that a stack of 'uses' statements will
       have name conflicts.  It is intended that the consuming
       data model will resolve the issue (e.g., by wrapping
       the 'uses' statement in a container called
       'ssh-server-parameters').  This model purposely does
       not do this itself so as to provide maximum flexibility
       to consuming models.";
    container server-identity {
      nacm:default-deny-write;
      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 {
            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";
            uses ks:local-or-keystore-asymmetric-key-grouping;
          }
          container certificate {
            if-feature "sshcmn:ssh-x509-certs";
            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";
            uses ks:local-or-keystore-end-entity-cert-with-key-grouping;
          }
        }
      }
    }
    container client-authentication {
      nacm:default-deny-write;
      description
        "Specifies if SSH client authentication is required or
         optional, and specifies if the SSH client authentication
         credentials are configured locally or externally.";
      container supported-authentication-methods {
        description
          "Indicates which authentication methods the server
           supports.";
        leaf publickey {
          type empty;
          description
            "Indicates that the 'publickey' method is supported.
             Note that RFC 6187 X.509v3 Certificates for SSH uses
             the 'publickey' method name.";
          reference
            "RFC 4252: The Secure Shell (SSH) Authentication
                       Protocol.
             RFC 6187: X.509v3 Certificates for Secure Shell
                       Authentication.";
        }
        leaf passsword {
          type empty;
          description
            "Indicates that the 'password' method is supported.";
          reference
            "RFC 4252: The Secure Shell (SSH) Authentication
                       Protocol.";
        }
        leaf hostbased {
          type empty;
          description
            "Indicates that the 'hostbased' method is supported.";
          reference
            "RFC 4252: The Secure Shell (SSH) Authentication
                       Protocol.";
        }
        leaf none {
          type empty;
          description
            "Indicates that the 'none' method is supported.";
          reference
            "RFC 4252: The Secure Shell (SSH) Authentication
                       Protocol.";
        }
        leaf-list other {
          type string;
          description
            "Indicates a supported method name not defined by
             RFC 4253.";
          reference
            "RFC 4252: The Secure Shell (SSH) Authentication
                       Protocol.";
        }
      }
      choice local-or-external {
        description
          "Indicates if the client credentials are configured
           locally or externally.";
        case local {
          if-feature "local-client-auth-supported";
          description
            "Client credentials are configured locally.";
          container users {
            description
              "A list of locally configured users.";
            list user {
              key "name";
              description
                "The list of local users configured on this device.";
              leaf name {
                type string;
                description
                  "The user name string identifying this entry.";
              }
              leaf password {
                type ianach:crypt-hash;
                description
                  "The password for this entry.";
              }
              list authorized-key {
                key "name";
                description
                  "A list of public SSH keys for this user.  These
                   keys are allowed for SSH authentication, as
                   described in RFC 4253.";
                reference
                  "RFC 4253: The Secure Shell (SSH) Transport Layer
                             Protocol";
                leaf name {
                  type string;
                  description
                    "An arbitrary name for the SSH key.";
                }
                leaf algorithm {
                  type string;
                  mandatory true;
                  description
                    "The public key algorithm name for this SSH key.

                     Valid values are the values in the IANA 'Secure
                     Shell (SSH) Protocol Parameters' registry,
                     Public Key Algorithm Names.";
                  reference
                    "IANA 'Secure Shell (SSH) Protocol Parameters'
                     registry, Public Key Algorithm Names";
                }
                leaf key-data {
                  type binary;
                  mandatory true;
                  description
                    "The binary public key data for this SSH key, as
                     specified by RFC 4253, Section 6.6, i.e.:

                       string    certificate or public key format
                                 identifier
                       byte[n]   key/certificate data.";
                  reference
                    "RFC 4253: The Secure Shell (SSH) Transport Layer
                               Protocol";
                }
              }
            }
          }
        }
        case external {
          if-feature "external-client-auth-supported";
          description
            "Client credentials are configured externally, such
             as via RADIUS, RFC 7317, or another mechanism.";
          leaf client-auth-defined-elsewhere {
            type empty;
            description
              "Indicates that client credentials are configured
               elsewhere.";
          }
        }
      }
    }
    container transport-params {
      nacm:default-deny-write;
      if-feature "ssh-server-transport-params-config";
      description
        "Configurable parameters of the SSH transport layer.";
      uses sshcmn:transport-params-grouping;
    }
    container keepalives {
      nacm:default-deny-write;
      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.";
      }
    }
  }
}