@@ -31,11 +31,13 @@ module libnetconf2-netconf-server {
3131 prefix tlss;
3232 }
3333
34- revision "2024-01-15 " {
35- description "Initial revision." ;
34+ revision "2024-07-09 " {
35+ description "Second revision." ;
3636 }
3737
38- /*
38+ // Identities
39+
40+ /*
3941 identity ed25519-private-key-format {
4042 base ct:private-key-format;
4143 description
@@ -240,6 +242,20 @@ module libnetconf2-netconf-server {
240242 https://cvsweb.openbsd.org/src/usr.bin/ssh/PROTOCOL?annotate=HEAD" ;
241243 }
242244
245+ // Typedefs
246+
247+ typedef certificate-expiration-time {
248+ type string {
249+ pattern '(1[0-2]|[1-9])m|[1-4]w|[1-7]d|(2[0-4]|1[0-9]|[1-9])h' ;
250+ }
251+
252+ description
253+ "The certificate-expiration-time type allows to specify time in either months, weeks, days, or hours.
254+ Its purpose is to create time intervals for the certificate expiration notifications." ;
255+ }
256+
257+ // Groupings
258+
243259 grouping ssh-authentication-params-grouping {
244260 description
245261 "Grouping for SSH authentication parameters." ;
@@ -322,6 +338,8 @@ module libnetconf2-netconf-server {
322338 }
323339 }
324340
341+ // Augments
342+
325343 augment "/ncs:netconf-server/ncs:listen/ncs:endpoints/ncs:endpoint/ncs:transport/ncs:ssh" +
326344 "/ncs:ssh/ncs:ssh-server-parameters/ncs:client-authentication" {
327345 uses ssh-authentication-params-grouping;
@@ -375,4 +393,56 @@ module libnetconf2-netconf-server {
375393 "/ncs:endpoint/ncs:transport/ncs:tls/ncs:tls/ncs:tls-server-parameters/ncs:client-authentication" {
376394 uses endpoint-reference-grouping;
377395 }
396+
397+ // Protocol-accessible Nodes
398+
399+ container ln2-netconf-server {
400+ container certificate-expiration-notif-intervals {
401+ if-feature "ct:certificate-expiration-notification" ;
402+
403+ description
404+ "Container for the certificate expiration notification intervals.
405+ Its child nodes describe the ability to set the time intervals for the certificate
406+ expiration notifications. These intervals are given in the form of an anchor and a period.
407+ By default, these notifications are generated 3, 2, and 1 month; 2 weeks; 7, 6, 5, 4, 3, 2 and 1 day before a certificate expires.
408+ Additionally, notifications are generated on the day of expiration and every day thereafter.
409+
410+ Simplified example of YANG data that describe the default intervals:
411+
412+ Anchor Period
413+ 3m ... 1m
414+ 2w ... 1w
415+ 7d ... 1d
416+ " ;
417+
418+ list interval {
419+ key "anchor period" ;
420+
421+ leaf anchor {
422+ type certificate-expiration-time;
423+
424+ description
425+ "The time anchor for the notification. The anchor is the time
426+ before the certificate expiration when a notification will be sent.
427+ It is essentially the lower bound of the given interval." ;
428+ }
429+ leaf period {
430+ type certificate-expiration-time;
431+
432+ // Require the period to be smaller than the anchor (only units are checked for simplicity)
433+ must "(contains(., 'm') and contains(../anchor, 'm')) or
434+ (contains(., 'w') and (contains(../anchor, 'm') or contains(../anchor, 'w'))) or
435+ (contains(., 'd') and (contains(../anchor, 'm') or contains(../anchor, 'w') or contains(../anchor, 'd'))) or
436+ contains(., 'h')" {
437+ error-message
438+ "Certificate expiration notification period must be smaller than the anchor." ;
439+ }
440+
441+ description
442+ "The period of the notification. The period is the time
443+ between two notifications within the given time interval." ;
444+ }
445+ }
446+ }
447+ }
378448}
0 commit comments