RFC 8951
Clarification of Enrollment over Secure Transport (EST): Transfer Encodings and ASN.1
RFC 8951: Clarification of Enrollment over Secure Transport (EST): Transfer Encodings and ASN.1 β¨
- Series: Internet Engineering Task Force (IETF) π
- Number: RFC 8951
- Published: November 2020 π
- Category: Standards Track π
- Authors: M. Richardson (Sandelman Software Works), T. Werner (Siemens), W. Pan (Huawei Technologies) π«Ά
- Updates: RFC 7030 π
- Obsoletes: none listed
- ISSN: 2070-1721
Abstract
okay so this doc updates RFC 7030: Enrollment over Secure Transport π It's here to fix some errata that got reported, which were causing interop chaos once RFC 7030 got extended π
It also deprecates the "Content-Transfer-Encoding" headers for EST endpoints (bye bye, extra header π), and it fixes some syntax errors in the ASN.1 that were lurking in there π§
Status of This Memo
this is an Internet Standards Track document β¨
it's a product of the Internet Engineering Task Force (IETF) πΈ It represents the consensus of the IETF community, got public review, and was approved for publication by the Internet Engineering Steering Group (IESG) π₯ If you want more on Internet Standards, check Section 2 of RFC 7841.
for the current status, any errata, and how to send feedback, go to https://www.rfc-editor.org/info/rfc8951 π¦
Copyright Notice
Copyright (c) 2020 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://trustee.ietf.org/license-info) as they stand on the publication date. Please actually read these, bestie, because they spell out your rights and restrictions for this document π Code Components pulled out of this document must include Simplified BSD License text as described in Section 4.e of the Trust Legal Provisions, and they come without warranty, as the Simplified BSD License describes π
Table of Contents
1. Introduction
2. Terminology
3. Changes to EST Endpoint Processing
3.1. White Space Processing
3.2. Changes to Section 4 of RFC 7030
3.2.1. Section 4.1.3
3.2.2. Section 4.3.1
3.2.3. Section 4.3.2
3.2.4. Section 4.4.2
3.2.5. Section 4.5.2
4. Clarification of ASN.1 for Certificate Attribute Set
5. Clarification of Error Messages for Certificate Enrollment
Operations
5.1. Updating Section 4.2.3: Simple Enroll and Re-enroll
Response
5.2. Updating Section 4.4.2: Server-Side Key Generation Response
6. Privacy Considerations
7. Security Considerations
8. IANA Considerations
9. References
9.1. Normative References
9.2. Informative References
Appendix A. ASN.1 Module
Acknowledgements
Authors' Addresses
1. Introduction πΈ
okay, so Enrollment over Secure Transport (EST) is defined in [RFC7030] π The EST spec defines a bunch of HTTP endpoints for certificate enrollment and management β¨ The details of each transaction were originally written in terms of MIME headers, as defined in [RFC2045], instead of in terms of the HTTP protocol, as defined in [RFC7230] and [RFC7231] π
[RFC2616] and later Appendix A.5 of [RFC7231] have text that specifically deprecates Content-Transfer-Encoding. However, [RFC7030] uses this header anyway, which is a whole mess π
any updates to [RFC7030] that bring it in line with HTTP processing risk changing the on-wire protocol in a way that breaks backwards compatibility π BUT, reports from implementers suggest that a lot of implementations don't send Content-Transfer-Encoding, and many of them ignore it anyway π«Ά So simply deprecating the header would still be compatible with current implementations. iconic, right?
[BRSKI] extends [RFC7030] and adds new functionality. Interop testing showed that some unusual processing called out in [RFC7030] causes confusion π
EST is currently specified as part of [IEC62351], and it's widely used today in government, utilities, and financial markets π
so this document revises [RFC7030] to match field reality, deprecating the extraneous field π
this document deals with errata numbers [errata4384], [errata5107], [errata5108], and [errata5904] π¦
specifically, [errata5107] and [errata5904] are handled in Section 3. [errata5108] is handled in Section 5. [errata4384] is closed by correcting the ASN.1 Module in Section 4 β¨
2. Terminology π
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 π
3. Changes to EST Endpoint Processing π§
okay this section is the main event π₯ Sections 4.1.3 (CA Certificates Response, /cacerts), 4.3.1 and 4.3.2 (Full CMC, /fullcmc), 4.4.2 (Server-Side Key Generation, /serverkeygen), and 4.5.2 (CSR Attributes, /csrattrs) of [RFC7030] all specify base64 encoding with a Content-Transfer-Encoding for requests and responses π
this document updates [RFC7030] so that the POST request and payload response of all endpoints use base64 encoding, as specified in Section 4 of [RFC4648] π In both cases, the Distinguished Encoding Rules (DER) [X.690] are used to produce the input for the base64 encoding routine β¨ This format is used regardless of any Content-Transfer-Encoding header, and any value in such a header MUST be ignored π« no exceptions, bestie.
3.1. White Space Processing π¦
quick note: "base64" as used in HTTP [RFC2616] does not permit CRLF, while the "base64" used in MIME [RFC2045] does π This specification clarifies that, despite what [RFC2616] says, white space including CR, LF, spaces (ASCII 32), and tabs (ASCII 9) SHOULD be tolerated by receivers π Senders are not required to insert any kind of white space, so you can relax π«Ά
3.2. Changes to Section 4 of RFC 7030 π
3.2.1. Section 4.1.3 πΈ
Replace:
| A successful response MUST be a certs-only CMC Simple PKI
| Response, as defined in [RFC5272], containing the certificates
| described in the following paragraph. The HTTP content-type of
| "application/pkcs7-mime" is used. The Simple PKI Response is sent
| with a Content-Transfer-Encoding of "base64" [RFC2045].
with:
| A successful response MUST be a certs-only CMC Simple PKI
| Response, as defined in [RFC5272], containing the certificates
| described in the following paragraph. The HTTP content-type of
| "application/pkcs7-mime" is used. The CMC Simple PKI Response is
| encoded in base64 [RFC4648].
3.2.2. Section 4.3.1 β¨
Replace:
| If the HTTP POST to /fullcmc is not a valid Full PKI Request, the
| server MUST reject the message. The HTTP content-type used is
| "application/pkcs7-mime" with an smime-type parameter "CMC-
| request", as specified in [RFC5273]. The body of the message is
| the binary value of the encoding of the PKI Request with a
| Content-Transfer-Encoding of "base64" [RFC2045].
with:
| If the HTTP POST to /fullcmc is not a valid Full PKI Request, the
| server MUST reject the message. The HTTP content-type used is
| "application/pkcs7-mime" with an smime-type parameter "CMC-
| request", as specified in [RFC5273]. The body of the message is
| encoded in base64 [RFC4648].
3.2.3. Section 4.3.2 π
Replace:
| The body of the message is the binary value of the encoding of the
| PKI Response with a Content-Transfer-Encoding of "base64"
| [RFC2045].
with:
| The body of the message is the base64 [RFC4648] encoding of the
| PKI Response.
3.2.4. Section 4.4.2 π§
Replace:
| An "application/pkcs8" part consists of the base64-encoded DER-
| encoded [X.690] PrivateKeyInfo with a Content-Transfer-Encoding of
| "base64" [RFC2045].
with:
| An "application/pkcs8" part consists of the base64-encoded, DER-
| encoded [X.690] PrivateKeyInfo.
Replace:
| In all three additional encryption cases, the EnvelopedData is
| returned in the response as an "application/pkcs7-mime" part with
| an smime-type parameter of "server-generated-key" and a Content-
| Transfer-Encoding of "base64".
with:
| In all three additional encryption cases, the EnvelopedData is
| returned in the response as an "application/pkcs7-mime" part with
| an smime-type parameter of "server-generated-key". It is base64
| encoded [RFC4648].
3.2.5. Section 4.5.2 π
this section gets updated in its entirety in Section 4 π
β part 1 of 3 wrapped, bestie! Part 2 (Section 4 onward) is coming up next π
4. Clarification of ASN.1 for Certificate Attribute Set π
okay so this section is literally about tidying up the ASN.1 for the certificate attribute set π§ Section 4.5.2 of [RFC7030] gets fully replaced with the text below, and it's giving clean glow-up energy π
4.5.2 CSR Attributes Response π If the locally configured policy for an authenticated EST client says a CSR Attributes Response should be provided, the server response MUST include an HTTP 200 response code. A 204 or 404 response code means no CSR Attributes Response is available. Either way, the EST server and CA MAY reject any later enrollment requests for any reason, e.g., incomplete CSR attributes in the request. Responses to attribute request messages MUST be encoded with the content-type "application/csrattrs", and they're "base64" [RFC4648] encoded. Here's the syntax for the application/csrattrs body:
CsrAttrs ::= SEQUENCE SIZE (0..MAX) OF AttrOrOID
AttrOrOID ::= CHOICE {
oid OBJECT IDENTIFIER,
attribute Attribute {{AttrSet}} }
AttrSet ATTRIBUTE ::= { ... }
An EST server includes zero or more OIDs or attributes [RFC2986] that it wants the client to use in the certification request. The client MUST ignore any OID or attribute it doesn't recognize. If the server encodes the CSR attributes as an empty SEQUENCE, that just means it has no extra info it's after for the client certification request. That's functionally the same as an HTTP response code of 204 or 404 π If the CA needs a particular cryptographic algorithm or a particular signature scheme (e.g., certification of a public key based on a certain elliptic curve, or signing with a certain hash algorithm), it MUST provide that info in the CSR Attribute Response. And if an EST server needs to link identity and POP information (see Section 3.5), it MUST include the challengePassword OID in the CSR Attributes Response. The structure of the CSR Attributes Response SHOULD, as much as possible, mirror the structure of the CSR it's asking for. Requests to use a particular signature scheme (e.g., a particular hash function) are represented as an OID, which gets reflected in the SignatureAlgorithm of the CSR. Requests to use a particular cryptographic algorithm (e.g., a public key based on a certain elliptic curve) are represented as an attribute, which gets reflected as the AlgorithmIdentifier of the SubjectPublicKeyInfo. That attribute has a type that indicates the algorithm, and its values indicate the parameters specific to that algorithm. Requests for descriptive info from the client are made with an attribute, represented as Attributes of the CSR. Its type indicates the [RFC2985] extensionRequest, and its values indicate the particular attributes wanted in the resulting certificate's extensions. The sequence is Distinguished Encoding Rules (DER) encoded [X.690], and then base64 encoded (Section 4 of [RFC4648]). The resulting text becomes the application/csrattr body, without headers. Here's an example. Say a CA wants a client to a) submit a certification request containing the challengePassword (so linking identity and POP info is requested; see Section 3.5), b) submit an extensionRequest with the Media Access Control (MAC) address [RFC2307] of the client, and c) use the secp384r1 elliptic curve to sign with the SHA384 hash function. Then the CA sends this:
OID: challengePassword (1.2.840.113549.1.9.7)
Attribute: type = extensionRequest (1.2.840.113549.1.9.14)
value = macAddress (1.3.6.1.1.1.1.22)
Attribute: type = id-ecPublicKey (1.2.840.10045.2.1)
value = secp384r1 (1.3.132.0.34)
OID: ecdsaWithSHA384 (1.2.840.10045.4.3.3)
Those get encoded into an ASN.1 SEQUENCE, which looks like this:
30 41 06 09 2a 86 48 86 f7 0d 01 09 07 30 12 06 07 2a 86 48 ce 3d
02 01 31 07 06 05 2b 81 04 00 22 30 16 06 09 2a 86 48 86 f7 0d 01
09 0e 31 09 06 07 2b 06 01 01 01 01 16 06 08 2a 86 48 ce 3d 04 03
03
Then the ASN.1 SEQUENCE gets base64 encoded, and you end up with:
MEEGCSqGSIb3DQEJBzASBgcqhkjOPQIBMQcGBSuBBAAiMBYGCSqGSIb3DQEJDjEJ
BgcrBgEBAQEWBggqhkjOPQQDAw==
5. Clarification of Error Messages for Certificate Enrollment Operations π
[errata5108] spells out what format the error messages are supposed to be in. Before that, a client could get confused and think an error sent back as text/plain wasn't actually an error at all π
5.1. Updating Section 4.2.3: Simple Enroll and Re-enroll Response π
Replace this:
If the content-type is not set, the response data MUST be a plaintext human-readable error message containing explanatory information describing why the request was rejected (for example, indicating that CSR attributes are incomplete).
with this:
If the content-type is not set, the response data MUST be a plaintext human-readable error message containing explanatory information describing why the request was rejected (for example, indicating that CSR attributes are incomplete). Servers MAY use the "text/plain" content-type [RFC2046] for human-readable errors.
5.2. Updating Section 4.4.2: Server-Side Key Generation Response πΈ
Replace this:
If the content-type is not set, the response data MUST be a plaintext human-readable error message.
with this:
If the content-type is not set, the response data MUST be a plaintext human-readable error message. Servers MAY use the "text/plain" content-type [RFC2046] for human-readable errors.
6. Privacy Considerations π¦
Good news, bestie: this document doesn't reveal any extra identities that an active or passive observer would see with [RFC7030] π«Ά
7. Security Considerations π₯
This document clarifies an existing security mechanism. It does not create any new protocol mechanisms.
β οΈ Serious moment, no cap: all security considerations from [RFC7030] also apply to the clarifications described in this document. Read them. Don't skip them. Periodt π
8. IANA Considerations π§
The ASN.1 module in Appendix A of this document makes use of object identifiers (OIDs) π
IANA has registered an OID for id-mod-est-2019 (1.3.6.1.5.5.7.0.98) in the "SMI Security for PKIX Module Identifier" registry for the ASN.1 module β¨
The OID for the Asymmetric Decryption Key Identifier (1.2.840.113549.1.9.16.2.54) was already defined in [RFC7030]. IANA has updated the Reference column for the Asymmetric Decryption Key Identifier attribute so it also points to this document π
9. References π
9.1. Normative References π
[errata4384] RFC Errata, Erratum ID 4384, RFC 7030, <https://www.rfc-editor.org/errata/eid4384>.
[errata5107] RFC Errata, Erratum ID 5107, RFC 7030, <https://www.rfc-editor.org/errata/eid5107>.
[errata5108] RFC Errata, Erratum ID 5108, RFC 7030, <https://www.rfc-editor.org/errata/eid5108>.
[errata5904] RFC Errata, Erratum ID 5904, RFC 7030, <https://www.rfc-editor.org/errata/eid5904>.
[IEC62351] International Electrotechnical Commission, "Power systems management and associated information exchange - Data and communications security - Part 9: Cyber security key management for power system equipment", ISO/IEC 62351-9:2017, May 2017.
[RFC2045] Freed, N. and N. Borenstein, "Multipurpose Internet Mail Extensions (MIME) Part One: Format of Internet Message Bodies", RFC 2045, DOI 10.17487/RFC2045, November 1996, <https://www.rfc-editor.org/info/rfc2045>.
[RFC2046] Freed, N. and N. Borenstein, "Multipurpose Internet Mail Extensions (MIME) Part Two: Media Types", RFC 2046, DOI 10.17487/RFC2046, November 1996, <https://www.rfc-editor.org/info/rfc2046>.
[RFC2119] Bradner, S., "Key words for use in RFCs to Indicate Requirement Levels", BCP 14, RFC 2119, DOI 10.17487/RFC2119, March 1997, <https://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/RFC2986, November 2000, <https://www.rfc-editor.org/info/rfc2986>.
[RFC4648] Josefsson, S., "The Base16, Base32, and Base64 Data Encodings", RFC 4648, DOI 10.17487/RFC4648, October 2006, <https://www.rfc-editor.org/info/rfc4648>.
[RFC5272] Schaad, J. and M. Myers, "Certificate Management over CMS (CMC)", RFC 5272, DOI 10.17487/RFC5272, June 2008, <https://www.rfc-editor.org/info/rfc5272>.
[RFC5273] Schaad, J. and M. Myers, "Certificate Management over CMS (CMC): Transport Protocols", RFC 5273, DOI 10.17487/RFC5273, June 2008, <https://www.rfc-editor.org/info/rfc5273>.
[RFC5912] Hoffman, P. and J. Schaad, "New ASN.1 Modules for the Public Key Infrastructure Using X.509 (PKIX)", RFC 5912, DOI 10.17487/RFC5912, June 2010, <https://www.rfc-editor.org/info/rfc5912>.
[RFC6268] Schaad, J. and S. Turner, "Additional New ASN.1 Modules for the Cryptographic Message Syntax (CMS) and the Public Key Infrastructure Using X.509 (PKIX)", RFC 6268, DOI 10.17487/RFC6268, July 2011, <https://www.rfc-editor.org/info/rfc6268>.
[RFC7030] Pritikin, M., Ed., Yee, P., Ed., and D. Harkins, Ed., "Enrollment over Secure Transport", RFC 7030, DOI 10.17487/RFC7030, October 2013, <https://www.rfc-editor.org/info/rfc7030>.
[RFC8174] Leiba, B., "Ambiguity of Uppercase vs Lowercase in RFC 2119 Key Words", BCP 14, RFC 8174, DOI 10.17487/RFC8174, May 2017, <https://www.rfc-editor.org/info/rfc8174>.
[X.680] ITU-T, "Information technology -- Abstract Syntax Notation One (ASN.1): Specification of basic notation", ITU-T Recommendation X.680, ISO/IEC 8824-1:2015, August 2015, <https://www.itu.int/rec/T-REC-X.680-201508-I/en>.
[X.681] ITU-T, "Information Technology - Abstract Syntax Notation One (ASN.1): Information object specification", ITU-T Recommendation X.681, ISO/IEC 8824-2:2015, August 2015, <https://www.itu.int/rec/T-REC-X.681>.
[X.682] ITU-T, "Information Technology - Abstract Syntax Notation One (ASN.1): Constraint specification", ITU-T Recommendation X.682, ISO/IEC 8824-3:2015, August 2015, <https://www.itu.int/rec/T-REC-X.682>.
[X.683] ITU-T, "Information Technology - Abstract Syntax Notation One (ASN.1): Parameterization of ASN.1 specifications", ITU-T Recommendation X.683, ISO/IEC 8824-4:2015, August 2015, <https://www.itu.int/rec/T-REC-X.683>.
[X.690] ITU-T, "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:2015, August 2015, <https://www.itu.int/rec/T-REC-X.690>.
9.2. Informative References πβ¨
Okay, now the informative references, which are the "here's extra reading if you're curious" list, bestie π§π
[BRSKI] Pritikin, M., Richardson, M. C., Eckert, T., Behringer, M. H., and K. Watsen, "Bootstrapping Remote Secure Key Infrastructures (BRSKI)", Work in Progress, Internet-Draft, draft-ietf-anima-bootstrapping-keyinfra-45, 11 November 2020, https://tools.ietf.org/html/draft-ietf-anima-bootstrapping-keyinfra-45.
[RFC2307] Howard, L., "An Approach for Using LDAP as a Network Information Service", RFC 2307, DOI 10.17487/RFC2307, March 1998, https://www.rfc-editor.org/info/rfc2307.
[RFC2616] Fielding, R., Gettys, J., Mogul, J., Frystyk, H., Masinter, L., Leach, P., and T. Berners-Lee, "Hypertext Transfer Protocol -- HTTP/1.1", RFC 2616, DOI 10.17487/RFC2616, June 1999, https://www.rfc-editor.org/info/rfc2616.
[RFC2985] Nystrom, M. and B. Kaliski, "PKCS #9: Selected Object Classes and Attribute Types Version 2.0", RFC 2985, DOI 10.17487/RFC2985, November 2000, https://www.rfc-editor.org/info/rfc2985.
[RFC7230] Fielding, R., Ed. and J. Reschke, Ed., "Hypertext Transfer Protocol (HTTP/1.1): Message Syntax and Routing", RFC 7230, DOI 10.17487/RFC7230, June 2014, https://www.rfc-editor.org/info/rfc7230.
[RFC7231] Fielding, R., Ed. and J. Reschke, Ed., "Hypertext Transfer Protocol (HTTP/1.1): Semantics and Content", RFC 7231, DOI 10.17487/RFC7231, June 2014, https://www.rfc-editor.org/info/rfc7231.
Appendix A. ASN.1 Module π
This annex is where the official ASN.1 definitions live, and they're normative, so they count as the real deal π It's written using ASN.1 as defined in [X.680], [X.681], [X.682], and [X.683].
The ASN.1 modules make imports from the ASN.1 modules in [RFC5912] and [RFC6268].
Fun fact: there's no ASN.1 Module in [RFC7030]. This one was put together by combining the lines that are already in the document body, so it's like a remix π§
PKIXEST-2019
{ iso(1) identified-organization(3) dod(6)
internet(1) security(5) mechanisms(5) pkix(7)
id-mod(0) id-mod-est-2019(98) }
DEFINITIONS IMPLICIT TAGS ::=
BEGIN
-- EXPORTS ALL --
IMPORTS
Attribute
FROM CryptographicMessageSyntax-2010 -- [RFC6268]
{ iso(1) member-body(2) us(840) rsadsi(113549)
pkcs(1) pkcs-9(9) smime(16) modules(0)
id-mod-cms-2009(58) }
ATTRIBUTE
FROM PKIX-CommonTypes-2009 -- [RFC5912]
{ iso(1) identified-organization(3) dod(6) internet(1)
security(5) mechanisms(5) pkix(7) id-mod(0)
id-mod-pkixCommon-02(57) } ;
-- CSR Attributes
CsrAttrs ::= SEQUENCE SIZE (0..MAX) OF AttrOrOID
AttrOrOID ::= CHOICE {
oid OBJECT IDENTIFIER,
attribute Attribute {{AttrSet}} }
AttrSet ATTRIBUTE ::= { ... }
-- Asymmetric Decrypt Key Identifier Attribute
aa-asymmDecryptKeyID ATTRIBUTE ::=
{ TYPE AsymmetricDecryptKeyIdentifier
IDENTIFIED BY id-aa-asymmDecryptKeyID }
id-aa-asymmDecryptKeyID OBJECT IDENTIFIER ::= { iso(1)
member-body(2) us(840) rsadsi(113549) pkcs(1) pkcs-9(9)
smime(16) aa(2) 54 }
AsymmetricDecryptKeyIdentifier ::= OCTET STRING
END
Acknowledgements π«Ά
Huge thanks to Huawei Technologies, who supported the efforts of Wei Pan and Michael Richardson πΈ
The ASN.1 Module was assembled by Russ Housley and formatted by Sean Turner. Russ Housley also provided the editorial review, so shoutout to all of them π
Authors' Addresses π
Michael Richardson, Sandelman Software Works, Email: mcr+ietf@sandelman.ca
Thomas Werner, Siemens, Email: thomas-werner@siemens.com
Wei Pan, Huawei Technologies, Email: william.panwei@huawei.com
π¦ where this page comes from
- ietf: rfc8951 2020-11
- π girlified by claude-haiku-5-5 on : a language model's rewrite of the original, under its terms