RFC 9646: Conveying a Certificate Signing Request (CSR) in a Secure Zero-Touch Provisioning (SZTP) Bootstrapping Request
- K. Watsen,
- R. Housley,
- S. Turner
Abstract
This document extends the input to the "get
Status of This Memo
This is an Internet Standards Track document.¶
This document is a product of the Internet Engineering Task Force (IETF). It represents the consensus of the IETF community. It has received public review and has been approved for publication by the Internet Engineering Steering Group (IESG). Further information on Internet Standards is available in Section 2 of RFC 7841.¶
Information about the current status of this document, any
errata, and how to provide feedback on it may be obtained at
https://
Copyright Notice
Copyright (c) 2024 IETF Trust and the persons identified as the document authors. All rights reserved.¶
This document is subject to BCP 78 and the IETF Trust's Legal
Provisions Relating to IETF Documents
(https://
1. Introduction
1.1. Overview
This document extends the input to the "get
The ability to provision an identity certificate that is purpose-built for a production environment during the bootstrapping process removes reliance on the manufacturer Certification Authority (CA), and it also enables the bootstrapped device to join the production environment with an appropriate identity and other attributes in its identity certificate (e.g., an LDevID).¶
Two YANG [RFC7950] modules are defined. The
"ietf
1.2. Terminology
This document uses the following terms from [RFC8572]:¶
This document defines the following new terms:¶
1.3. Requirements Language
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 [RFC2119] [RFC8174] when, and only when, they appear in all capitals, as shown here.¶
1.4. Conventions
Various examples in this document use "BASE64VALUE=" as a placeholder value for binary data that has been base64 encoded (per Section 9.8 of [RFC7950]). This placeholder value is used because real base64-encoded structures are often many lines long and hence distracting to the example being presented.¶
Various examples in this document contain long lines that may be folded, as described in [RFC8792].¶
2. The "ietf-sztp-csr" Module
The "ietf-sztp-csr" module is a YANG 1.1 [RFC7950]
module that augments the "ietf
2.1. Data Model Overview
The following tree diagram [RFC8340] illustrates the "ietf-sztp-csr" module.¶
The augmentation defines two kinds of parameters that an SZTP-client can send to an SZTP-server. The YANG structure defines one collection of parameters that an SZTP-server can send to an SZTP-client.¶
In the order of their intended use:¶
To further illustrate how the augmentation and structure defined by the "ietf-sztp-csr" module are used, below are two additional tree diagrams showing these nodes placed where they are used.¶
The following tree diagram [RFC8340] illustrates SZTP's
"get
The following tree diagram [RFC8340] illustrates RESTCONF's "errors" RPC-reply message with the "csr-request" structure in place.¶
2.2. Example Usage
An SZTP-client implementing this specification would signal
to the bootstrap server its willingness to generate a CSR by
including the "csr-support" node in its "get
REQUEST¶
Assuming the SZTP-server wishes to prompt the SZTP-client to provide a CSR, then it would respond with an HTTP 400 Bad Request error code. In the example below, the SZTP-server specifies that it wishes the SZTP-client to generate a key using a specific algorithm and generate a PKCS#10-based CSR containing specific content.¶
RESPONSE¶
Upon being prompted to provide a CSR, the SZTP-client would
POST another "get
REQUEST¶
At this point, it is expected that the SZTP-server, perhaps
in conjunction with other systems, such as a backend CA or registration authority (RA),
will validate the CSR's origin and proof
The SZTP-server responds with conveyed information
(the "conveyed
RESPONSE¶
How the signed certificate is conveyed inside the onboarding information
is outside the scope of this document. Some implementations may choose
to convey it inside a script (e.g., SZTP's "pre
Below are two examples of conveying the signed certificate inside the "configuration" node. Both examples assume that the SZTP-client understands the "ietf-keystore" module defined in [RFC9642].¶
This first example illustrates the case where the signed certificate is
for the same asymmetric key used by the SZTP-client's manufacturer
This second example illustrates the case where the signed certificate is for a newly generated asymmetric key. As such, the configuration needs to associate the newly signed certificate with the newly generated asymmetric key:¶
In addition to configuring the signed certificate, it is often
necessary to also configure the issuer's signing certificate
so that the device (i.e., STZP-client) can authenticate
certificates presented by peer devices signed by the same
issuer as its own. While outside the scope of this document,
one way to do this would be to use the "ietf
2.3. YANG Module
This module augments an RPC defined in [RFC8572]. The module uses data types and groupings defined in [RFC8572], [RFC8791], and [RFC9640]. The module also has an informative reference to [Std-802.1AR-2018].¶
3. The "ietf-ztp-types" Module
This section defines a YANG 1.1 [RFC7950] module that defines three YANG groupings, one for each message sent between a ZTP-client and ZTP-server. This module is defined independently of the "ietf-sztp-csr" module so that its groupings may be used by bootstrapping protocols other than SZTP [RFC8572].¶
3.1. Data Model Overview
The following tree diagram [RFC8340] illustrates
the three groupings defined in the "ietf
3.2. YANG Module
This module uses data types and groupings defined in [RFC8791] and [RFC9640]. The module has additional normative references to [RFC2986], [RFC4210], [RFC5272], and [ITU.X690.2021] and an informative reference to [Std-802.1AR-2018].¶
4. Security Considerations
This document builds on top of the solution presented in [RFC8572], and therefore all the security considerations discussed in [RFC8572] apply here as well.¶
For the various CSR formats, when using PKCS#10, the security considerations in [RFC2986] apply; when using CMP, the security considerations in [RFC4210] apply; and when using CMC, the security considerations in [RFC5272] apply.¶
For the various authentication mechanisms, when using TLS-level authentication, the security considerations in [RFC8446] apply, and when using HTTP-level authentication, the security considerations in [RFC9110] apply.¶
4.1. SZTP-Client Considerations
4.1.1. Ensuring the Integrity of Asymmetric Private Keys
The private key the SZTP-client uses for the dynamically generated identity certificate MUST be protected from inadvertent disclosure in order to prevent identity fraud.¶
The security of this private key is essential in order to ensure the associated identity certificate can be used to authenticate the device it is issued to.¶
It is RECOMMENDED that devices are manufactured with a hardware security module (HSM), such as a trusted platform module (TPM), to generate and contain the private key within the security perimeter of the HSM. In such cases, the private key and its associated certificates MAY have long validity periods.¶
In cases where the SZTP-client does not possess an HSM or
is unable to use an HSM to protect the private key, it is
RECOMMENDED to periodically reset the private key (and
associated identity certificates) in order to minimize the
lifetime of unprotected private keys. For instance, a Network Management System (NMS)
controller
4.1.2. Reuse of a Manufacturer-Generated Private Key
It is RECOMMENDED that a new private key is generated for each CSR described in this document.¶
Implementations must randomly generate nonces and private keys.
The use of inadequate pseudorandom number generators (PRNGs) to
generate cryptographic keys can result in little or no security.
An attacker may find it much easier to reproduce the PRNG environment
that produced the keys, searching the resulting small set of
possibilities, rather than brute force searching the whole
key space. As an example of predictable random numbers, see
CVE-2008-0166 [CVE-2008-0166], and some consequences
of low-entropy random numbers are discussed in "Mining Your Ps and Qs"
[MiningPsQs]. The generation of quality random
numbers is difficult. [ISO.20543-2019],
[NIST
This private key SHOULD be protected as well as the built-in private key associated with the SZTP-client's initial device identity certificate (e.g., the IDevID from [Std-802.1AR-2018]).¶
In cases where it is not possible to generate a new private key that is protected as well as the built-in private key, it is RECOMMENDED to reuse the built-in private key rather than generate a new private key that is not as well protected.¶
4.1.3. Replay Attack Protection
This RFC enables an SZTP-client to announce an ability to generate a new key to use for its CSR.¶
When the SZTP-server responds with a request for the SZTP-client to generate a new key, it is essential that the SZTP-client actually generates a new key.¶
Generating a new key each time enables the random bytes used to create the key to also serve the dual-purpose of acting like a "nonce" used in other mechanisms to detect replay attacks.¶
When a fresh public/private key pair is generated for the request, confirmation to the SZTP-client that the response has not been replayed is enabled by the SZTP-client's fresh public key appearing in the signed certificate provided by the SZTP-server.¶
When a public/private key pair associated with the
manufacturer
4.1.4. Connecting to an Untrusted Bootstrap Server
[RFC8572] allows SZTP-clients to connect to untrusted SZTP-servers by blindly authenticating the SZTP-server's TLS end-entity certificate.¶
As is discussed in Section 9.5 of [RFC8572], in such cases, the SZTP-client MUST assert that the bootstrapping data returned is signed if the SZTP-client is to trust it.¶
However, the HTTP error message used in this document cannot be signed data, as described in [RFC8572].¶
Therefore, the solution presented in this document cannot be used when the SZTP-client connects to an untrusted SZTP-server.¶
Consistent with the recommendation presented in
Section 9.6 of [RFC8572], SZTP-clients
SHOULD NOT pass the "csr-support" input parameter
to an untrusted SZTP-server. SZTP-clients SHOULD
instead pass the "signed
4.1.5. Selecting the Best Origin Authentication Mechanism
The origin of the CSR must be verified before a certificate is issued.¶
When generating a new key, it is important that the SZTP-client be able to provide additional proof that it was the entity that generated the key.¶
The CMP and CMC certificate request formats defined in this document support origin authentication. A raw PKCS#10 CSR does not support origin authentication.¶
The CMP and CMC request formats support origin authentication using both PKI and a shared secret.¶
Typically, only one possible origin authentication mechanism can possibly be used, but in the case that the SZTP-client authenticates itself using both TLS-level (e.g., IDevID) and HTTP-level credentials (e.g., Basic), as is allowed by Section 5.3 of [RFC8572], then the SZTP-client may need to choose between the two options.¶
In the case that the SZTP-client must choose between an asymmetric key option versus a shared secret for origin authentication, it is RECOMMENDED that the SZTP-client choose using the asymmetric key.¶
4.1.6. Clearing the Private Key and Associated Certificate
Unlike a manufacturer
4.2. SZTP-Server Considerations
4.2.1. Verifying Proof-of-Possession
Regardless, if using a new asymmetric key or the bootstrapping
device's manufacturer
4.2.2. Verifying Proof-of-Origin
When the bootstrapping device's manufacturer
When the bootstrapping device's manufacturer
When a fresh asymmetric key is used with the CMP or CMC formats, the
authentication is part of the protocols, which could employ either
the manufacturer
4.2.3. Supporting SZTP-Clients That Don't Trust the SZTP-Server
[RFC8572] allows SZTP-clients to connect to untrusted SZTP-servers by blindly authenticating the SZTP-server's TLS end-entity certificate.¶
As is recommended in Section 4.1.4 of this
document, in such cases, SZTP-clients SHOULD pass the
"signed
The reciprocal of this statement is that SZTP-servers,
wanting to support SZTP-clients that don't trust them,
SHOULD support the "signed
4.3. Security Considerations for the "ietf-sztp-csr" YANG Module
The recommended format for documenting the security
considerations for YANG modules is described in Section 3.7 of [RFC8407]. However, this module
only augments two input parameters
into the "get
4.4. Security Considerations for the "ietf-ztp-types" YANG Module
The recommended format for documenting the security
considerations for YANG modules is described in Section 3.7 of [RFC8407]. However, this module
does not define any protocol
5. IANA Considerations
5.1. The IETF XML Registry
IANA has registered two URIs in the "ns" registry of
the "IETF XML Registry" [RFC3688] maintained at
<https://
5.2. The YANG Module Names Registry
IANA has registered two YANG modules in the "YANG Module
Names" registry [RFC6020] maintained at
<https://
6. References
6.1. Normative References
- [ITU.X690.2021]
-
ITU, "Information technology - ASN.1 encoding rules: Specification of Basic Encoding Rules (BER), Canonical Encoding Rules (CER) and Distinguished Encoding Rules (DER)", ITU-T Recommendation X.690, ISO/IEC 8825-1, , <https://
www >..itu .int /rec /T -REC -X .690 / - [RFC2119]
-
Bradner, S., "Key words for use in RFCs to Indicate Requirement Levels", BCP 14, RFC 2119, DOI 10
.17487 , , <https:///RFC2119 www >..rfc -editor .org /info /rfc2119 - [RFC2986]
-
Nystrom, M. and B. Kaliski, "PKCS #10: Certification Request Syntax Specification Version 1.7", RFC 2986, DOI 10
.17487 , , <https:///RFC2986 www >..rfc -editor .org /info /rfc2986 - [RFC3688]
-
Mealling, M., "The IETF XML Registry", BCP 81, RFC 3688, DOI 10
.17487 , , <https:///RFC3688 www >..rfc -editor .org /info /rfc3688 - [RFC4210]
-
Adams, C., Farrell, S., Kause, T., and T. Mononen, "Internet X.509 Public Key Infrastructure Certificate Management Protocol (CMP)", RFC 4210, DOI 10
.17487 , , <https:///RFC4210 www >..rfc -editor .org /info /rfc4210 - [RFC5272]
-
Schaad, J. and M. Myers, "Certificate Management over CMS (CMC)", RFC 5272, DOI 10
.17487 , , <https:///RFC5272 www >..rfc -editor .org /info /rfc5272 - [RFC6020]
-
Bjorklund, M., Ed., "YANG - A Data Modeling Language for the Network Configuration Protocol (NETCONF)", RFC 6020, DOI 10
.17487 , , <https:///RFC6020 www >..rfc -editor .org /info /rfc6020 - [RFC7950]
-
Bjorklund, M., Ed., "The YANG 1.1 Data Modeling Language", RFC 7950, DOI 10
.17487 , , <https:///RFC7950 www >..rfc -editor .org /info /rfc7950 - [RFC8040]
-
Bierman, A., Bjorklund, M., and K. Watsen, "RESTCONF Protocol", RFC 8040, DOI 10
.17487 , , <https:///RFC8040 www >..rfc -editor .org /info /rfc8040 - [RFC8174]
-
Leiba, B., "Ambiguity of Uppercase vs Lowercase in RFC 2119 Key Words", BCP 14, RFC 8174, DOI 10
.17487 , , <https:///RFC8174 www >..rfc -editor .org /info /rfc8174 - [RFC8446]
-
Rescorla, E., "The Transport Layer Security (TLS) Protocol Version 1.3", RFC 8446, DOI 10
.17487 , , <https:///RFC8446 www >..rfc -editor .org /info /rfc8446 - [RFC8572]
-
Watsen, K., Farrer, I., and M. Abrahamsson, "Secure Zero Touch Provisioning (SZTP)", RFC 8572, DOI 10
.17487 , , <https:///RFC8572 www >..rfc -editor .org /info /rfc8572 - [RFC8791]
-
Bierman, A., Björklund, M., and K. Watsen, "YANG Data Structure Extensions", RFC 8791, DOI 10
.17487 , , <https:///RFC8791 www >..rfc -editor .org /info /rfc8791 - [RFC9110]
-
Fielding, R., Ed., Nottingham, M., Ed., and J. Reschke, Ed., "HTTP Semantics", STD 97, RFC 9110, DOI 10
.17487 , , <https:///RFC9110 www >..rfc -editor .org /info /rfc9110 - [RFC9640]
-
Watsen, K., "YANG Data Types and Groupings for Cryptography", RFC 9640, DOI 10
.17487 , , <https:///RFC9640 www >..rfc -editor .org /info /rfc9640
6.2. Informative References
- [AIS31]
-
Killmann, W. and W. Schindler, "A proposal for: Functionality classes for random number generators - Version 2.0", , <https://
www >..bsi .bund .de /Shared Docs /Downloads /DE /BSI /Zertifizierung /Interpretatione n /AIS _31 _Functionality _classes _for _random _number _generators _e .pdf - [CVE-2008-0166]
-
National Institute of Science and Technology (NIST), "National Vulnerability Database - CVE-2008-0166 Detail", , <https://
nvd >..nist .gov /vuln /detail /CVE -2008 -0166 - [ISO.20543-2019]
- International Organization for Standardization (ISO), "Information technology -- Security techniques -- Test and analysis methods for random bit generators within ISO/IEC 19790 and ISO/IEC 15408", ISO/IEC 20543:2019, .
- [MiningPsQs]
-
Heninger, N., Durumeric, Z., Wustrow, E., and J. Halderman, "Mining Your Ps and Qs: Detection of Widespread Weak Keys in Network Devices", Security'12: Proceedings of the 21st USENIX Conference on Security Symposium, , <https://
www >..usenix .org /conference /usenixsecurity1 2 /technical -sessions /presentation /heninger - [NIST
.SP .800 -90Ar1] -
Barker, E. and J. Kelsey, "Recommendation for Random Number Generation Using Deterministic Random Bit Generators", DOI 10
.6028 , NIST SP 800-90Ar1, , <https:///NIST .SP .800 -90Ar1 nvlpubs >..nist .gov /nistpubs /Special Publications /NIST .SP .800 -90Ar1 .pdf - [RFC4086]
-
Eastlake 3rd, D., Schiller, J., and S. Crocker, "Randomness Requirements for Security", BCP 106, RFC 4086, DOI 10
.17487 , , <https:///RFC4086 www >..rfc -editor .org /info /rfc4086 - [RFC7292]
-
Moriarty, K., Ed., Nystrom, M., Parkinson, S., Rusch, A., and M. Scott, "PKCS #12: Personal Information Exchange Syntax v1.1", RFC 7292, DOI 10
.17487 , , <https:///RFC7292 www >..rfc -editor .org /info /rfc7292 - [RFC8340]
-
Bjorklund, M. and L. Berger, Ed., "YANG Tree Diagrams", BCP 215, RFC 8340, DOI 10
.17487 , , <https:///RFC8340 www >..rfc -editor .org /info /rfc8340 - [RFC8407]
-
Bierman, A., "Guidelines for Authors and Reviewers of Documents Containing YANG Data Models", BCP 216, RFC 8407, DOI 10
.17487 , , <https:///RFC8407 www >..rfc -editor .org /info /rfc8407 - [RFC8792]
-
Watsen, K., Auerswald, E., Farrel, A., and Q. Wu, "Handling Long Lines in Content of Internet-Drafts and RFCs", RFC 8792, DOI 10
.17487 , , <https:///RFC8792 www >..rfc -editor .org /info /rfc8792 - [RFC8808]
-
Wu, Q., Lengyel, B., and Y. Niu, "A YANG Data Model for Factory Default Settings", RFC 8808, DOI 10
.17487 , , <https:///RFC8808 www >..rfc -editor .org /info /rfc8808 - [RFC9641]
-
Watsen, K., "A YANG Data Model for a Truststore", RFC 9641, DOI 10
.17487 , , <https:///RFC9641 www >..rfc -editor .org /info /rfc9641 - [RFC9642]
-
Watsen, K., "A YANG Data Model for a Keystore", RFC 9642, DOI 10
.17487 , , <https:///RFC9642 www >..rfc -editor .org /info /rfc9642 - [Std
-802 .1AR -2018] -
IEEE, "IEEE Standard for Local and Metropolitan Area Networks - Secure Device Identity", , <https://
standards >..ieee .org /ieee /802 .1AR /6995 /
Acknowledgements
The authors would like to thank for following for lively discussions on list and in the halls (ordered by first name): Benjamin Kaduk, Dan Romascanu, David von Oheimb, Éric Vyncke, Guy Fedorkow, Hendrik Brockhaus, Joe Clarke, Meral Shirazipour, Murray Kucherawy, Rich Salz, Rob Wilton, Roman Danyliw, Qin Wu, Yaron Sheffer, and Zaheduzzaman Sarkar.¶
Contributors
Special thanks go to David von Oheimb and Hendrik Brockhaus for helping with the descriptions for the "cmc-csr" and "cmp-csr" nodes.¶