This module defines a 'truststore' to centralize management of trust anchors, including certificates and public keys. The key w...
Version: 2024-10-10
module ietf-truststore { yang-version 1.1; namespace "urn:ietf:params:xml:ns:yang:ietf-truststore"; prefix ts; import ietf-netconf-acm { prefix nacm; reference "RFC 8341: Network Configuration Access Control Model"; } import ietf-crypto-types { prefix ct; reference "RFC 9640: YANG Data Types and Groupings for Cryptography"; } organization "IETF NETCONF (Network Configuration) Working Group"; contact "WG Web: https://datatracker.ietf.org/wg/netconf WG List: NETCONF WG list <mailto:netconf@ietf.org> Author: Kent Watsen <kent+ietf@watsen.net>"; description "This module defines a 'truststore' to centralize management of trust anchors, including certificates and public keys. 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. Copyright (c) 2024 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 Revised 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 9641 (https://www.rfc-editor.org/info/rfc9641); see the RFC itself for full legal notices."; revision "2024-10-10" { description "Initial version."; reference "RFC 9641: A YANG Data Model for a Truststore"; } feature central-truststore-supported { description "The 'central-truststore-supported' feature indicates that the server supports the truststore (i.e., implements the 'ietf-truststore' module)."; } feature inline-definitions-supported { description "The 'inline-definitions-supported' feature indicates that the server supports locally defined trust anchors."; } feature certificates { description "The 'certificates' feature indicates that the server implements the /truststore/certificate-bags subtree."; } feature public-keys { description "The 'public-keys' feature indicates that the server implements the /truststore/public-key-bags subtree."; } typedef central-certificate-bag-ref { type leafref { path "/ts:truststore/ts:certificate-bags/ts:certificate-bag/ts:name"; } description "This typedef defines a reference to a certificate bag in the central truststore."; } typedef central-certificate-ref { type leafref { path "/ts:truststore/ts:certificate-bags/ts:certificate-bag[ts:name = current()/../certificate-bag]/ts:certificate/ts:name"; } description "This typedef defines a reference to a specific certificate in a certificate bag in the central truststore. This typedef requires that there exist a sibling 'leaf' node called 'certificate-bag' that SHOULD have the 'central-certificate-bag-ref' typedef."; } typedef central-public-key-bag-ref { type leafref { path "/ts:truststore/ts:public-key-bags/ts:public-key-bag/ts:name"; } description "This typedef defines a reference to a public key bag in the central truststore."; } typedef central-public-key-ref { type leafref { path "/ts:truststore/ts:public-key-bags/ts:public-key-bag[ts:name = current()/../public-key-bag]/ts:public-key/ts:name"; } description "This typedef defines a reference to a specific public key in a public key bag in the truststore. This typedef requires that there exist a sibling 'leaf' node called 'public-key-bag' SHOULD have the 'central-public-key-bag-ref' typedef."; } container truststore { nacm:default-deny-write; if-feature central-truststore-supported; description "The truststore contains bags of certificates and public keys."; container certificate-bags { nacm:default-deny-write; if-feature certificates; description "A collection of certificate bags."; list certificate-bag { key "name"; description "A bag of certificates. Each bag of certificates should be for a specific purpose. For instance, one bag could be used to authenticate a specific set of servers, while another could be used to authenticate a specific set of clients."; leaf name { type string; description "An arbitrary name for this bag of certificates."; } leaf description { type string; description "A description for this bag of certificates. The intended purpose for the bag SHOULD be described."; } list certificate { key "name"; description "A trust anchor certificate or chain of certificates."; leaf name { type string; description "An arbitrary name for this certificate."; } leaf cert-data { nacm:default-deny-all; type trust-anchor-cert-cms; mandatory true; description "The binary certificate data for this certificate."; } notification certificate-expiration { if-feature certificate-expiration-notification; description "A notification indicating that the configured certificate is either about to expire or has already expired. When to send notifications is an implementation-specific decision, but it is RECOMMENDED that a notification be sent once a month for 3 months, then once a week for four weeks, and then once a day thereafter until the issue is resolved. If the certificate's issuer maintains a Certificate Revocation List (CRL), the expiration notification MAY be sent if the CRL is about to expire."; leaf expiration-date { type yang:date-and-time; mandatory true; description "Identifies the expiration date on the certificate."; } } // notification certificate-expiration } // list certificate } // list certificate-bag } // container certificate-bags container public-key-bags { nacm:default-deny-write; if-feature public-keys; description "A collection of public key bags."; list public-key-bag { key "name"; description "A bag of public keys. Each bag of keys SHOULD be for a specific purpose. For instance, one bag could be used to authenticate a specific set of servers, while another could be used to authenticate a specific set of clients."; leaf name { type string; description "An arbitrary name for this bag of public keys."; } leaf description { type string; description "A description for this bag of public keys. The intended purpose for the bag MUST be described."; } list public-key { key "name"; description "A public key."; leaf name { type string; description "An arbitrary name for this public key."; } leaf public-key-format { nacm:default-deny-write; type identityref { base public-key-format; } mandatory true; description "Identifies the public key's format. Implementations SHOULD ensure that the incoming public key value is encoded in the specified format."; } leaf public-key { nacm:default-deny-write; type binary; mandatory true; description "The binary value of the public key. The interpretation of the value is defined by the 'public-key-format' field."; } } // list public-key } // list public-key-bag } // container public-key-bags } // container truststore } // module ietf-truststore
© 2024 YumaWorks, Inc. All rights reserved.