Adding TestVNF netconf server
[demo.git] / vnfs / TestVNF / netconftemplates / netconftemplates / iana-crypt-hash@2014-08-06.yang
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">module iana-crypt-hash {
3   namespace "urn:ietf:params:xml:ns:yang:iana-crypt-hash";
4   prefix ianach;
5
6   organization
7     "IANA";
8   contact
9     "        Internet Assigned Numbers Authority
10
11      Postal: ICANN
12              12025 Waterfront Drive, Suite 300
13              Los Angeles, CA  90094-2536
14              United States
15
16      Tel:    +1 310 301 5800
17      E-Mail: iana@iana.org&gt;";
18   description
19     "This YANG module defines a type for storing passwords
20      using a hash function and features to indicate which hash
21      functions are supported by an implementation.
22
23      The latest revision of this YANG module can be obtained from
24      the IANA web site.
25
26      Requests for new values should be made to IANA via
27      email (iana@iana.org).
28
29      Copyright (c) 2014 IETF Trust and the persons identified as
30      authors of the code.  All rights reserved.
31
32      Redistribution and use in source and binary forms, with or
33      without modification, is permitted pursuant to, and subject
34      to the license terms contained in, the Simplified BSD License
35      set forth in Section 4.c of the IETF Trust's Legal Provisions
36      Relating to IETF Documents
37      (http://trustee.ietf.org/license-info).
38
39      The initial version of this YANG module is part of RFC 7317;
40      see the RFC itself for full legal notices.";
41
42   revision 2014-08-06 {
43     description
44       "Initial revision.";
45     reference
46       "RFC 7317: A YANG Data Model for System Management";
47   }
48
49   feature crypt-hash-md5 {
50     description
51       "Indicates that the device supports the MD5
52        hash function in 'crypt-hash' values.";
53     reference
54       "RFC 1321: The MD5 Message-Digest Algorithm";
55   }
56
57   feature crypt-hash-sha-256 {
58     description
59       "Indicates that the device supports the SHA-256
60        hash function in 'crypt-hash' values.";
61     reference
62       "FIPS.180-4.2012: Secure Hash Standard (SHS)";
63   }
64
65   feature crypt-hash-sha-512 {
66     description
67       "Indicates that the device supports the SHA-512
68        hash function in 'crypt-hash' values.";
69     reference
70       "FIPS.180-4.2012: Secure Hash Standard (SHS)";
71   }
72
73   typedef crypt-hash {
74     type string {
75       pattern "$0$.*|$1$[a-zA-Z0-9./]{1,8}$[a-zA-Z0-9./]{22}|$5$(rounds=\\d+$)?[a-zA-Z0-9./]{1,16}$[a-zA-Z0-9./]{43}|$6$(rounds=\\d+$)?[a-zA-Z0-9./]{1,16}$[a-zA-Z0-9./]{86}";
76     }
77     description
78       "The crypt-hash type is used to store passwords using
79        a hash function.  The algorithms for applying the hash
80        function and encoding the result are implemented in
81        various UNIX systems as the function crypt(3).
82
83        A value of this type matches one of the forms:
84
85          $0$&lt;clear text password&gt;
86          $&lt;id&gt;$&lt;salt&gt;$&lt;password hash&gt;
87          $&lt;id&gt;$&lt;parameter&gt;$&lt;salt&gt;$&lt;password hash&gt;
88
89        The '$0$' prefix signals that the value is clear text.  When
90        such a value is received by the server, a hash value is
91        calculated, and the string '$&lt;id&gt;$&lt;salt&gt;$' or
92        $&lt;id&gt;$&lt;parameter&gt;$&lt;salt&gt;$ is prepended to the result.  This
93        value is stored in the configuration data store.
94        If a value starting with '$&lt;id&gt;$', where &lt;id&gt; is not '0', is
95        received, the server knows that the value already represents a
96        hashed value and stores it 'as is' in the data store.
97
98        When a server needs to verify a password given by a user, it
99        finds the stored password hash string for that user, extracts
100        the salt, and calculates the hash with the salt and given
101        password as input.  If the calculated hash value is the same
102        as the stored value, the password given by the client is
103        accepted.
104
105        This type defines the following hash functions:
106
107          id | hash function | feature
108          ---+---------------+-------------------
109           1 | MD5           | crypt-hash-md5
110           5 | SHA-256       | crypt-hash-sha-256
111           6 | SHA-512       | crypt-hash-sha-512
112
113        The server indicates support for the different hash functions
114        by advertising the corresponding feature.";
115     reference
116       "IEEE Std 1003.1-2008 - crypt() function
117        RFC 1321: The MD5 Message-Digest Algorithm
118        FIPS.180-4.2012: Secure Hash Standard (SHS)";
119   }
120 }
121 </data>
122 </rpc-reply>