Adding TestVNF netconf server
[demo.git] / vnfs / TestVNF / netconftemplates / netconftemplates / ietf-x509-cert-to-name@2014-12-10.yin
1 <rpc-reply xmlns="urn:ietf:params:xml:ns:netconf:base:1.0" message-id="m-1">
2   <data xmlns="urn:ietf:params:xml:ns:yang:ietf-netconf-monitoring">&lt;?xml version="1.0" encoding="UTF-8"?&gt;
3 &lt;module name="ietf-x509-cert-to-name"
4         xmlns="urn:ietf:params:xml:ns:yang:yin:1"
5         xmlns:x509c2n="urn:ietf:params:xml:ns:yang:ietf-x509-cert-to-name"
6         xmlns:yang="urn:ietf:params:xml:ns:yang:ietf-yang-types"&gt;
7   &lt;namespace uri="urn:ietf:params:xml:ns:yang:ietf-x509-cert-to-name"/&gt;
8   &lt;prefix value="x509c2n"/&gt;
9   &lt;import module="ietf-yang-types"&gt;
10     &lt;prefix value="yang"/&gt;
11   &lt;/import&gt;
12   &lt;organization&gt;
13     &lt;text&gt;IETF NETMOD (NETCONF Data Modeling Language) Working Group&lt;/text&gt;
14   &lt;/organization&gt;
15   &lt;contact&gt;
16     &lt;text&gt;WG Web:   &amp;lt;http://tools.ietf.org/wg/netmod/&amp;gt;
17 WG List:  &amp;lt;mailto:netmod@ietf.org&amp;gt;
18
19 WG Chair: Thomas Nadeau
20           &amp;lt;mailto:tnadeau@lucidvision.com&amp;gt;
21
22 WG Chair: Juergen Schoenwaelder
23           &amp;lt;mailto:j.schoenwaelder@jacobs-university.de&amp;gt;
24
25 Editor:   Martin Bjorklund
26           &amp;lt;mailto:mbj@tail-f.com&amp;gt;
27
28 Editor:   Juergen Schoenwaelder
29           &amp;lt;mailto:j.schoenwaelder@jacobs-university.de&amp;gt;&lt;/text&gt;
30   &lt;/contact&gt;
31   &lt;description&gt;
32     &lt;text&gt;This module contains a collection of YANG definitions for
33 extracting a name from an X.509 certificate.
34 The algorithm used to extract a name from an X.509 certificate
35 was first defined in RFC 6353.
36
37 Copyright (c) 2014 IETF Trust and the persons identified as
38 authors of the code.  All rights reserved.
39
40 Redistribution and use in source and binary forms, with or
41 without modification, is permitted pursuant to, and subject
42 to the license terms contained in, the Simplified BSD License
43 set forth in Section 4.c of the IETF Trust's Legal Provisions
44 Relating to IETF Documents
45 (http://trustee.ietf.org/license-info).
46
47 This version of this YANG module is part of RFC 7407; see
48 the RFC itself for full legal notices.&lt;/text&gt;
49   &lt;/description&gt;
50   &lt;reference&gt;
51     &lt;text&gt;RFC 6353: Transport Layer Security (TLS) Transport Model for
52   the Simple Network Management Protocol (SNMP)&lt;/text&gt;
53   &lt;/reference&gt;
54   &lt;revision date="2014-12-10"&gt;
55     &lt;description&gt;
56       &lt;text&gt;Initial revision.&lt;/text&gt;
57     &lt;/description&gt;
58     &lt;reference&gt;
59       &lt;text&gt;RFC 7407: A YANG Data Model for SNMP Configuration&lt;/text&gt;
60     &lt;/reference&gt;
61   &lt;/revision&gt;
62   &lt;identity name="cert-to-name"&gt;
63     &lt;description&gt;
64       &lt;text&gt;Base identity for algorithms to derive a name from a
65 certificate.&lt;/text&gt;
66     &lt;/description&gt;
67   &lt;/identity&gt;
68   &lt;identity name="specified"&gt;
69     &lt;base name="cert-to-name"/&gt;
70     &lt;description&gt;
71       &lt;text&gt;Directly specifies the name to be used for the certificate.
72 The value of the leaf 'name' in the cert-to-name list is
73 used.&lt;/text&gt;
74     &lt;/description&gt;
75     &lt;reference&gt;
76       &lt;text&gt;RFC 6353: Transport Layer Security (TLS) Transport Model
77   for the Simple Network Management Protocol (SNMP).
78   SNMP-TLS-TM-MIB.snmpTlstmCertSpecified&lt;/text&gt;
79     &lt;/reference&gt;
80   &lt;/identity&gt;
81   &lt;identity name="san-rfc822-name"&gt;
82     &lt;base name="cert-to-name"/&gt;
83     &lt;description&gt;
84       &lt;text&gt;Maps a subjectAltName's rfc822Name to a name.  The local part
85 of the rfc822Name is passed unaltered, but the host-part of
86 the name must be passed in lowercase.  For example, the
87 rfc822Name field FooBar@Example.COM is mapped to name
88 FooBar@example.com.&lt;/text&gt;
89     &lt;/description&gt;
90     &lt;reference&gt;
91       &lt;text&gt;RFC 6353: Transport Layer Security (TLS) Transport Model
92   for the Simple Network Management Protocol (SNMP).
93   SNMP-TLS-TM-MIB.snmpTlstmCertSANRFC822Name&lt;/text&gt;
94     &lt;/reference&gt;
95   &lt;/identity&gt;
96   &lt;identity name="san-dns-name"&gt;
97     &lt;base name="cert-to-name"/&gt;
98     &lt;description&gt;
99       &lt;text&gt;Maps a subjectAltName's dNSName to a name after first
100 converting it to all lowercase (RFC 5280 does not specify
101 converting to lowercase, so this involves an extra step).
102 This mapping results in a 1:1 correspondence between
103 subjectAltName dNSName values and the name values.&lt;/text&gt;
104     &lt;/description&gt;
105     &lt;reference&gt;
106       &lt;text&gt;RFC 6353: Transport Layer Security (TLS) Transport Model
107   for the Simple Network Management Protocol (SNMP).
108   SNMP-TLS-TM-MIB.snmpTlstmCertSANDNSName&lt;/text&gt;
109     &lt;/reference&gt;
110   &lt;/identity&gt;
111   &lt;identity name="san-ip-address"&gt;
112     &lt;base name="cert-to-name"/&gt;
113     &lt;description&gt;
114       &lt;text&gt;Maps a subjectAltName's iPAddress to a name by
115 transforming the binary-encoded address as follows:
116
117   1) for IPv4, the value is converted into a
118      decimal-dotted quad address (e.g., '192.0.2.1').
119
120   2) for IPv6 addresses, the value is converted into a
121      32-character, all-lowercase hexadecimal string
122      without any colon separators.
123
124 This mapping results in a 1:1 correspondence between
125 subjectAltName iPAddress values and the name values.&lt;/text&gt;
126     &lt;/description&gt;
127     &lt;reference&gt;
128       &lt;text&gt;RFC 6353: Transport Layer Security (TLS) Transport Model
129   for the Simple Network Management Protocol (SNMP).
130   SNMP-TLS-TM-MIB.snmpTlstmCertSANIpAddress&lt;/text&gt;
131     &lt;/reference&gt;
132   &lt;/identity&gt;
133   &lt;identity name="san-any"&gt;
134     &lt;base name="cert-to-name"/&gt;
135     &lt;description&gt;
136       &lt;text&gt;Maps any of the following fields using the corresponding
137 mapping algorithms:
138
139   +------------+-----------------+
140   | Type       | Algorithm       |
141   |------------+-----------------|
142   | rfc822Name | san-rfc822-name |
143   | dNSName    | san-dns-name    |
144   | iPAddress  | san-ip-address  |
145   +------------+-----------------+
146
147 The first matching subjectAltName value found in the
148 certificate of the above types MUST be used when deriving
149 the name.  The mapping algorithm specified in the
150 'Algorithm' column MUST be used to derive the name.
151
152 This mapping results in a 1:1 correspondence between
153 subjectAltName values and name values.  The three sub-mapping
154 algorithms produced by this combined algorithm cannot produce
155 conflicting results between themselves.&lt;/text&gt;
156     &lt;/description&gt;
157     &lt;reference&gt;
158       &lt;text&gt;RFC 6353: Transport Layer Security (TLS) Transport Model
159   for the Simple Network Management Protocol (SNMP).
160   SNMP-TLS-TM-MIB.snmpTlstmCertSANAny&lt;/text&gt;
161     &lt;/reference&gt;
162   &lt;/identity&gt;
163   &lt;identity name="common-name"&gt;
164     &lt;base name="cert-to-name"/&gt;
165     &lt;description&gt;
166       &lt;text&gt;Maps a certificate's CommonName to a name after converting
167 it to a UTF-8 encoding.  The usage of CommonNames is
168 deprecated, and users are encouraged to use subjectAltName
169 mapping methods instead.  This mapping results in a 1:1
170 correspondence between certificate CommonName values and name
171 values.&lt;/text&gt;
172     &lt;/description&gt;
173     &lt;reference&gt;
174       &lt;text&gt;RFC 6353: Transport Layer Security (TLS) Transport Model
175   for the Simple Network Management Protocol (SNMP).
176   SNMP-TLS-TM-MIB.snmpTlstmCertCommonName&lt;/text&gt;
177     &lt;/reference&gt;
178   &lt;/identity&gt;
179   &lt;typedef name="tls-fingerprint"&gt;
180     &lt;type name="yang:hex-string"&gt;
181       &lt;pattern value="([0-9a-fA-F]){2}(:([0-9a-fA-F]){2}){0,254}"/&gt;
182     &lt;/type&gt;
183     &lt;description&gt;
184       &lt;text&gt;A fingerprint value that can be used to uniquely reference
185 other data of potentially arbitrary length.
186
187 A tls-fingerprint value is composed of a 1-octet hashing
188 algorithm identifier followed by the fingerprint value.  The
189 first octet value identifying the hashing algorithm is taken
190 from the IANA 'TLS HashAlgorithm Registry' (RFC 5246).  The
191 remaining octets are filled using the results of the hashing
192 algorithm.&lt;/text&gt;
193     &lt;/description&gt;
194     &lt;reference&gt;
195       &lt;text&gt;RFC 6353: Transport Layer Security (TLS) Transport Model
196   for the Simple Network Management Protocol (SNMP).
197   SNMP-TLS-TM-MIB.SnmpTLSFingerprint&lt;/text&gt;
198     &lt;/reference&gt;
199   &lt;/typedef&gt;
200   &lt;grouping name="cert-to-name"&gt;
201     &lt;description&gt;
202       &lt;text&gt;Defines nodes for mapping certificates to names.  Modules
203 that use this grouping should describe how the resulting
204 name is used.&lt;/text&gt;
205     &lt;/description&gt;
206     &lt;list name="cert-to-name"&gt;
207       &lt;key value="id"/&gt;
208       &lt;description&gt;
209         &lt;text&gt;This list defines how certificates are mapped to names.
210 The name is derived by considering each cert-to-name
211 list entry in order.  The cert-to-name entry's fingerprint
212 determines whether the list entry is a match:
213
214 1) If the cert-to-name list entry's fingerprint value
215    matches that of the presented certificate, then consider
216    the list entry a successful match.
217
218 2) If the cert-to-name list entry's fingerprint value
219    matches that of a locally held copy of a trusted CA
220    certificate, and that CA certificate was part of the CA
221    certificate chain to the presented certificate, then
222    consider the list entry a successful match.
223
224 Once a matching cert-to-name list entry has been found, the
225 map-type is used to determine how the name associated with
226 the certificate should be determined.  See the map-type
227 leaf's description for details on determining the name value.
228 If it is impossible to determine a name from the cert-to-name
229 list entry's data combined with the data presented in the
230 certificate, then additional cert-to-name list entries MUST
231 be searched to look for another potential match.
232
233 Security administrators are encouraged to make use of
234 certificates with subjectAltName fields that can be mapped to
235 names so that a single root CA certificate can allow all
236 child certificates' subjectAltName fields to map directly to
237 a name via a 1:1 transformation.&lt;/text&gt;
238       &lt;/description&gt;
239       &lt;reference&gt;
240         &lt;text&gt;RFC 6353: Transport Layer Security (TLS) Transport Model
241   for the Simple Network Management Protocol (SNMP).
242   SNMP-TLS-TM-MIB.snmpTlstmCertToTSNEntry&lt;/text&gt;
243       &lt;/reference&gt;
244       &lt;leaf name="id"&gt;
245         &lt;type name="uint32"/&gt;
246         &lt;description&gt;
247           &lt;text&gt;The id specifies the order in which the entries in the
248 cert-to-name list are searched.  Entries with lower
249 numbers are searched first.&lt;/text&gt;
250         &lt;/description&gt;
251         &lt;reference&gt;
252           &lt;text&gt;RFC 6353: Transport Layer Security (TLS) Transport Model
253   for the Simple Network Management Protocol
254   (SNMP).
255   SNMP-TLS-TM-MIB.snmpTlstmCertToTSNID&lt;/text&gt;
256         &lt;/reference&gt;
257       &lt;/leaf&gt;
258       &lt;leaf name="fingerprint"&gt;
259         &lt;type name="x509c2n:tls-fingerprint"/&gt;
260         &lt;mandatory value="true"/&gt;
261         &lt;description&gt;
262           &lt;text&gt;Specifies a value with which the fingerprint of the
263 full certificate presented by the peer is compared.  If
264 the fingerprint of the full certificate presented by the
265 peer does not match the fingerprint configured, then the
266 entry is skipped, and the search for a match continues.&lt;/text&gt;
267         &lt;/description&gt;
268         &lt;reference&gt;
269           &lt;text&gt;RFC 6353: Transport Layer Security (TLS) Transport Model
270   for the Simple Network Management Protocol
271   (SNMP).
272   SNMP-TLS-TM-MIB.snmpTlstmCertToTSNFingerprint&lt;/text&gt;
273         &lt;/reference&gt;
274       &lt;/leaf&gt;
275       &lt;leaf name="map-type"&gt;
276         &lt;type name="identityref"&gt;
277           &lt;base name="cert-to-name"/&gt;
278         &lt;/type&gt;
279         &lt;mandatory value="true"/&gt;
280         &lt;description&gt;
281           &lt;text&gt;Specifies the algorithm used to map the certificate
282 presented by the peer to a name.
283
284 Mappings that need additional configuration objects should
285 use the 'when' statement to make them conditional based on
286 the map-type.&lt;/text&gt;
287         &lt;/description&gt;
288         &lt;reference&gt;
289           &lt;text&gt;RFC 6353: Transport Layer Security (TLS) Transport Model
290   for the Simple Network Management Protocol
291   (SNMP).
292   SNMP-TLS-TM-MIB.snmpTlstmCertToTSNMapType&lt;/text&gt;
293         &lt;/reference&gt;
294       &lt;/leaf&gt;
295       &lt;leaf name="name"&gt;
296         &lt;when condition="../map-type = 'x509c2n:specified'"/&gt;
297         &lt;type name="string"/&gt;
298         &lt;mandatory value="true"/&gt;
299         &lt;description&gt;
300           &lt;text&gt;Directly specifies the NETCONF username when the
301 map-type is 'specified'.&lt;/text&gt;
302         &lt;/description&gt;
303         &lt;reference&gt;
304           &lt;text&gt;RFC 6353: Transport Layer Security (TLS) Transport Model
305   for the Simple Network Management Protocol
306   (SNMP).
307   SNMP-TLS-TM-MIB.snmpTlstmCertToTSNData&lt;/text&gt;
308         &lt;/reference&gt;
309       &lt;/leaf&gt;
310     &lt;/list&gt;
311   &lt;/grouping&gt;
312 &lt;/module&gt;
313 </data>
314 </rpc-reply>