|
| 1 | +module gnsi-certz { |
| 2 | + yang-version 1.1; |
| 3 | + namespace "https://github.com/openconfig/gnsi/certz/yang"; |
| 4 | + prefix gnsi-certz; |
| 5 | + |
| 6 | + import openconfig-system { |
| 7 | + prefix oc-sys; |
| 8 | + } |
| 9 | + import openconfig-system-grpc { |
| 10 | + prefix oc-sys-grpc; |
| 11 | + } |
| 12 | + import openconfig-types { |
| 13 | + prefix oc-types; |
| 14 | + } |
| 15 | + import openconfig-yang-types { |
| 16 | + prefix oc-yang; |
| 17 | + } |
| 18 | + organization |
| 19 | + "Google LLC"; |
| 20 | + |
| 21 | + contact |
| 22 | + "Google LLC"; |
| 23 | + |
| 24 | + description |
| 25 | + "This module provides a data model for the metadata of gRPC credentials |
| 26 | + installed on a networking device."; |
| 27 | + |
| 28 | + revision 2023-02-13 { |
| 29 | + description |
| 30 | + "rename access/reject counters"; |
| 31 | + reference "0.5.0"; |
| 32 | + } |
| 33 | + |
| 34 | + revision 2023-08-24 { |
| 35 | + description |
| 36 | + "Adds ssl-profile-id leaf"; |
| 37 | + reference "0.4.0"; |
| 38 | + } |
| 39 | + |
| 40 | + revision 2023-05-10 { |
| 41 | + description |
| 42 | + "Adds authentication policy freshness information."; |
| 43 | + reference "0.3.0"; |
| 44 | + } |
| 45 | + |
| 46 | + revision 2022-10-30 { |
| 47 | + description |
| 48 | + "Adds success/failure counters."; |
| 49 | + reference "0.2.0"; |
| 50 | + } |
| 51 | + |
| 52 | + revision 2022-09-20 { |
| 53 | + description |
| 54 | + "Initial revision."; |
| 55 | + reference "0.1.0"; |
| 56 | + } |
| 57 | + |
| 58 | + typedef version { |
| 59 | + type string; |
| 60 | + description |
| 61 | + "The version ID of the credential as provided by the credential |
| 62 | + manager when the credential was pushed. This leaf persists through |
| 63 | + a reboot."; |
| 64 | + } |
| 65 | + |
| 66 | + typedef created-on { |
| 67 | + type oc-types:timeticks64; |
| 68 | + description |
| 69 | + "The creation time of the credential as reported by the credential |
| 70 | + manager when the credential was pushed to the device. This value is |
| 71 | + reported as nanoseconds since epoch (January 1st, 1970 00:00:00 GMT). |
| 72 | + This leaf persists through a reboot."; |
| 73 | + } |
| 74 | + // gRPC server related definitions. |
| 75 | + // Success/failure counters. |
| 76 | + grouping counters { |
| 77 | + description |
| 78 | + "A collection of counters that were collected while attempting |
| 79 | + to establish connections to the gRPC server."; |
| 80 | + |
| 81 | + container counters { |
| 82 | + config false; |
| 83 | + description |
| 84 | + "A collection of counters that were collected by the gRPC during |
| 85 | + the authentication process."; |
| 86 | + |
| 87 | + leaf connection-rejects { |
| 88 | + type oc-yang:counter64; |
| 89 | + description |
| 90 | + "The total number of times that gRPC clients have failed |
| 91 | + in establishing a connection to the server."; |
| 92 | + } |
| 93 | + leaf last-connection-reject { |
| 94 | + type oc-types:timeticks64; |
| 95 | + description |
| 96 | + "A timestamp of the last time a gRPC client failed |
| 97 | + in establishing a connection to the server."; |
| 98 | + } |
| 99 | + leaf connection-accepts { |
| 100 | + type oc-yang:counter64; |
| 101 | + description |
| 102 | + "The total number of times that gRPC clients have succeeded |
| 103 | + in establishing a connection to the server."; |
| 104 | + } |
| 105 | + leaf last-connection-accept { |
| 106 | + type oc-types:timeticks64; |
| 107 | + description |
| 108 | + "A timestamp of the last time a gRPC client succeeded |
| 109 | + in establishing a connection to the server."; |
| 110 | + } |
| 111 | + } |
| 112 | + } |
| 113 | + |
| 114 | + grouping grpc-server-credentials-state { |
| 115 | + description |
| 116 | + "gRPC server credentials freshness-related data."; |
| 117 | + |
| 118 | + leaf certificate-version { |
| 119 | + type version; |
| 120 | + description |
| 121 | + "The version of the certificate (and associated |
| 122 | + private key) that is used by this gRPC server."; |
| 123 | + } |
| 124 | + leaf certificate-created-on { |
| 125 | + type created-on; |
| 126 | + description |
| 127 | + "The timestamp of the moment when the certificate |
| 128 | + (and associated private key) that is currently used |
| 129 | + by this gRPC server was created."; |
| 130 | + } |
| 131 | + leaf ca-trust-bundle-version { |
| 132 | + type version; |
| 133 | + description |
| 134 | + "The version of the bundle of the Certificate |
| 135 | + Authority certificates a.k.a. trust bundle used by |
| 136 | + this gRPC server."; |
| 137 | + } |
| 138 | + leaf ca-trust-bundle-created-on { |
| 139 | + type created-on; |
| 140 | + description |
| 141 | + "The timestamp of the moment when the bundle of |
| 142 | + the Certificate Authority certificates (a.k.a. |
| 143 | + trust bundle) was created."; |
| 144 | + } |
| 145 | + leaf certificate-revocation-list-bundle-version { |
| 146 | + type version; |
| 147 | + description |
| 148 | + "The version of the Certificate Revocation List bundle used by |
| 149 | + this gRPC server."; |
| 150 | + } |
| 151 | + leaf certificate-revocation-list-bundle-created-on { |
| 152 | + type created-on; |
| 153 | + description |
| 154 | + "The timestamp of the moment when the Certificate Revocation |
| 155 | + List bundle was created."; |
| 156 | + } |
| 157 | + leaf authentication-policy-version { |
| 158 | + type version; |
| 159 | + description |
| 160 | + "The version of the authentication policy that is used by |
| 161 | + this gRPC server."; |
| 162 | + } |
| 163 | + leaf authentication-policy-created-on { |
| 164 | + type created-on; |
| 165 | + description |
| 166 | + "The timestamp of the moment when the authentication policy |
| 167 | + that is currently used by this gRPC server was created."; |
| 168 | + } |
| 169 | + leaf ssl-profile-id { |
| 170 | + type string; |
| 171 | + description |
| 172 | + "The ID of this gRPC server's SSL profile |
| 173 | + as used by the gNSI Certz service"; |
| 174 | + } |
| 175 | + } |
| 176 | + |
| 177 | + // Augments section. |
| 178 | + |
| 179 | + augment "/oc-sys:system/oc-sys-grpc:grpc-servers/oc-sys-grpc:grpc-server/" + |
| 180 | + "oc-sys-grpc:state" { |
| 181 | + description |
| 182 | + "A gRPC server credentials freshness information."; |
| 183 | + |
| 184 | + uses grpc-server-credentials-state; |
| 185 | + uses counters; |
| 186 | + } |
| 187 | +} |
0 commit comments