idnits 2.17.1 draft-ietf-tls-subcerts-03.txt: Checking boilerplate required by RFC 5378 and the IETF Trust (see https://trustee.ietf.org/license-info): ---------------------------------------------------------------------------- No issues found here. Checking nits according to https://www.ietf.org/id-info/1id-guidelines.txt: ---------------------------------------------------------------------------- No issues found here. Checking nits according to https://www.ietf.org/id-info/checklist : ---------------------------------------------------------------------------- ** The document seems to lack a both a reference to RFC 2119 and the recommended RFC 2119 boilerplate, even if it appears to use RFC 2119 keywords. RFC 2119 keyword, line 348: '...this specification SHALL send an empty...' RFC 2119 keyword, line 351: '... client MUST abort with an "unexpect...' RFC 2119 keyword, line 353: '...esent, the server MAY send a delegated...' RFC 2119 keyword, line 354: '... not present, the server MUST NOT send...' RFC 2119 keyword, line 355: '...egated credential MUST NOT be provided...' (9 more instances...) Miscellaneous warnings: ---------------------------------------------------------------------------- == The copyright year in the IETF Trust and authors Copyright Line does not match the current year -- The document date (February 19, 2019) is 1891 days in the past. Is this intentional? Checking references for intended status: Proposed Standard ---------------------------------------------------------------------------- (See RFCs 3967 and 4897 for information about using normative references to lower-maturity documents in RFCs) -- Possible downref: Non-RFC (?) normative reference: ref. 'X690' -- Obsolete informational reference (is this intentional?): RFC 6961 (Obsoleted by RFC 8446) Summary: 1 error (**), 0 flaws (~~), 1 warning (==), 3 comments (--). Run idnits with the --verbose option for more detailed information about the items above. -------------------------------------------------------------------------------- 2 Network Working Group R. Barnes 3 Internet-Draft Mozilla 4 Intended status: Standards Track S. Iyengar 5 Expires: August 23, 2019 Facebook 6 N. Sullivan 7 Cloudflare 8 E. Rescorla 9 RTFM, Inc. 10 February 19, 2019 12 Delegated Credentials for TLS 13 draft-ietf-tls-subcerts-03 15 Abstract 17 The organizational separation between the operator of a TLS server 18 and the certification authority can create limitations. For example, 19 the lifetime of certificates, how they may be used, and the 20 algorithms they support are ultimately determined by the 21 certification authority. This document describes a mechanism by 22 which operators may delegate their own credentials for use in TLS, 23 without breaking compatibility with clients that do not support this 24 specification. 26 Status of This Memo 28 This Internet-Draft is submitted in full conformance with the 29 provisions of BCP 78 and BCP 79. 31 Internet-Drafts are working documents of the Internet Engineering 32 Task Force (IETF). Note that other groups may also distribute 33 working documents as Internet-Drafts. The list of current Internet- 34 Drafts is at http://datatracker.ietf.org/drafts/current/. 36 Internet-Drafts are draft documents valid for a maximum of six months 37 and may be updated, replaced, or obsoleted by other documents at any 38 time. It is inappropriate to use Internet-Drafts as reference 39 material or to cite them other than as "work in progress." 41 This Internet-Draft will expire on August 23, 2019. 43 Copyright Notice 45 Copyright (c) 2019 IETF Trust and the persons identified as the 46 document authors. All rights reserved. 48 This document is subject to BCP 78 and the IETF Trust's Legal 49 Provisions Relating to IETF Documents 50 (http://trustee.ietf.org/license-info) in effect on the date of 51 publication of this document. Please review these documents 52 carefully, as they describe your rights and restrictions with respect 53 to this document. Code Components extracted from this document must 54 include Simplified BSD License text as described in Section 4.e of 55 the Trust Legal Provisions and are provided without warranty as 56 described in the Simplified BSD License. 58 Table of Contents 60 1. Introduction . . . . . . . . . . . . . . . . . . . . . . . . 2 61 1.1. Change Log . . . . . . . . . . . . . . . . . . . . . . . 3 62 2. Solution Overview . . . . . . . . . . . . . . . . . . . . . . 4 63 2.1. Rationale . . . . . . . . . . . . . . . . . . . . . . . . 5 64 2.2. Related Work . . . . . . . . . . . . . . . . . . . . . . 5 65 3. Delegated Credentials . . . . . . . . . . . . . . . . . . . . 6 66 3.1. Client and Server behavior . . . . . . . . . . . . . . . 8 67 3.2. Certificate Requirements . . . . . . . . . . . . . . . . 9 68 4. IANA Considerations . . . . . . . . . . . . . . . . . . . . . 9 69 5. Security Considerations . . . . . . . . . . . . . . . . . . . 10 70 5.1. Security of delegated private key . . . . . . . . . . . . 10 71 5.2. Revocation of delegated credentials . . . . . . . . . . . 10 72 5.3. Privacy considerations . . . . . . . . . . . . . . . . . 10 73 6. Acknowledgements . . . . . . . . . . . . . . . . . . . . . . 10 74 7. References . . . . . . . . . . . . . . . . . . . . . . . . . 10 75 7.1. Normative References . . . . . . . . . . . . . . . . . . 11 76 7.2. Informative References . . . . . . . . . . . . . . . . . 11 77 Authors' Addresses . . . . . . . . . . . . . . . . . . . . . . . 12 79 1. Introduction 81 Typically, a TLS server uses a certificate provided by some entity 82 other than the operator of the server (a "Certification Authority" or 83 CA) [RFC8446] [RFC5280]. This organizational separation makes the 84 TLS server operator dependent on the CA for some aspects of its 85 operations, for example: 87 o Whenever the server operator wants to deploy a new certificate, it 88 has to interact with the CA. 90 o The server operator can only use TLS authentication schemes for 91 which the CA will issue credentials. 93 These dependencies cause problems in practice. Server operators 94 often want to create short-lived certificates for servers in low- 95 trust zones such as CDNs or remote data centers. This allows server 96 operators to limit the exposure of keys in cases that they do not 97 realize a compromise has occurred. The risk inherent in cross- 98 organizational transactions makes it operationally infeasible to rely 99 on an external CA for such short-lived credentials. In OCSP stapling 100 (i.e., using the Certificate Status extension types ocsp [RFC6066] or 101 ocsp_multi [RFC6961]), if an operator chooses to talk frequently to 102 the CA to obtain stapled responses, then failure to fetch an OCSP 103 stapled response results only in degraded performance. On the other 104 hand, failure to fetch a potentially large number of short lived 105 certificates would result in the service not being available, which 106 creates greater operational risk. 108 To remove these dependencies, this document proposes a limited 109 delegation mechanism that allows a TLS server operator to issue its 110 own credentials within the scope of a certificate issued by an 111 external CA. Because the above problems do not relate to the CA's 112 inherent function of validating possession of names, it is safe to 113 make such delegations as long as they only enable the recipient of 114 the delegation to speak for names that the CA has authorized. For 115 clarity, we will refer to the certificate issued by the CA as a 116 "certificate", or "delegation certificate", and the one issued by the 117 operator as a "delegated credential" or "DC". 119 1.1. Change Log 121 (*) indicates changes to the wire protocol. 123 draft-03 125 o Remove protocol version from the Credential structure. (*) 127 draft-02 129 o Change public key type. (*) 131 o Change DelegationUsage extension to be NULL and define its object 132 identifier. 134 o Drop support for TLS 1.2. 136 o Add the protocol version and credential signature algorithm to the 137 Credential structure. (*) 139 o Specify undefined behavior in a few cases: when the client 140 receives a DC without indicated support; when the client indicates 141 the extension in an invalid protocol version; and when DCs are 142 sent as extensions to certificates other than the end-entity 143 certificate. 145 2. Solution Overview 147 A delegated credential is a digitally signed data structure with two 148 semantic fields: a validity interval and a public key (along with its 149 associated signature algorithm). The signature on the credential 150 indicates a delegation from the certificate that is issued to the TLS 151 server operator. The secret key used to sign a credential 152 corresponds to the public key of the TLS server's X.509 end-entity 153 certificate. 155 A TLS handshake that uses delegated credentials differs from a normal 156 handshake in a few important ways: 158 o The client provides an extension in its ClientHello that indicates 159 support for this mechanism. 161 o The server provides both the certificate chain terminating in its 162 certificate as well as the delegated credential. 164 o The client uses information in the server's certificate to verify 165 the delegated credential and that the server is asserting an 166 expected identity. 168 o The client uses the public key in the credential as the server's 169 working key for the TLS handshake. 171 As detailed in Section 3, the delegated credential is 172 cryptographically bound to the end-entity certificate with which the 173 credential may be used. This document specifies the use of delegated 174 credentials in TLS 1.3 or later; their use in prior versions of the 175 protocol is not allowed. 177 Delegated credentials allow the server to terminate TLS connections 178 on behalf of the certificate owner. If a credential is stolen, there 179 is no mechanism for revoking it without revoking the certificate 180 itself. To limit exposure in case a delegated credential is 181 compromised, servers may not issue credentials with a validity period 182 longer than 7 days. This mechanism is described in detail in 183 Section 3.1. 185 It was noted in [XPROT] that certificates in use by servers that 186 support outdated protocols such as SSLv2 can be used to forge 187 signatures for certificates that contain the keyEncipherment KeyUsage 188 ([RFC5280] section 4.2.1.3). In order to prevent this type of cross- 189 protocol attack, we define a new DelegationUsage extension to X.509 190 that permits use of delegated credentials. (See Section 3.2.) 192 2.1. Rationale 194 Delegated credentials present a better alternative than other 195 delegation mechanisms like proxy certificates [RFC3820] for several 196 reasons: 198 o There is no change needed to certificate validation at the PKI 199 layer. 201 o X.509 semantics are very rich. This can cause unintended 202 consequences if a service owner creates a proxy certificate where 203 the properties differ from the leaf certificate. For this reason, 204 delegated credentials have very restricted semantics that should 205 not conflict with X.509 semantics. 207 o Proxy certificates rely on the certificate path building process 208 to establish a binding between the proxy certificate and the 209 server certificate. Since the certificate path building process 210 is not cryptographically protected, it is possible that a proxy 211 certificate could be bound to another certificate with the same 212 public key, with different X.509 parameters. Delegated 213 credentials, which rely on a cryptographic binding between the 214 entire certificate and the delegated credential, cannot. 216 o Each delegated credential is bound to a specific signature 217 algorithm that may be used to sign the TLS handshake ([RFC8446] 218 section 4.2.3). This prevents them from being used with other, 219 perhaps unintended signature algorithms. 221 2.2. Related Work 223 Many of the use cases for delegated credentials can also be addressed 224 using purely server-side mechanisms that do not require changes to 225 client behavior (e.g., LURK [I-D.mglt-lurk-tls-requirements]). These 226 mechanisms, however, incur per-transaction latency, since the front- 227 end server has to interact with a back-end server that holds a 228 private key. The mechanism proposed in this document allows the 229 delegation to be done off-line, with no per-transaction latency. The 230 figure below compares the message flows for these two mechanisms with 231 TLS 1.3 [I-D.ietf-tls-tls13]. 233 LURK: 235 Client Front-End Back-End 236 |----ClientHello--->| | 237 |<---ServerHello----| | 238 |<---Certificate----| | 239 | |<-------LURK------->| 240 |<---CertVerify-----| | 241 | ... | | 243 Delegated credentials: 245 Client Front-End Back-End 246 | |<----DC minting---->| 247 |----ClientHello--->| | 248 |<---ServerHello----| | 249 |<---Certificate----| | 250 |<---CertVerify-----| | 251 | ... | | 253 These two mechanisms can be complementary. A server could use 254 credentials for clients that support them, while using LURK to 255 support legacy clients. 257 It is possible to address the short-lived certificate concerns above 258 by automating certificate issuance, e.g., with ACME 259 [I-D.ietf-acme-acme]. In addition to requiring frequent 260 operationally-critical interactions with an external party, this 261 makes the server operator dependent on the CA's willingness to issue 262 certificates with sufficiently short lifetimes. It also fails to 263 address the issues with algorithm support. Nonetheless, existing 264 automated issuance APIs like ACME may be useful for provisioning 265 credentials within an operator network. 267 3. Delegated Credentials 269 While X.509 forbids end-entity certificates from being used as 270 issuers for other certificates, it is perfectly fine to use them to 271 issue other signed objects as long as the certificate contains the 272 digitalSignature KeyUsage (RFC5280 section 4.2.1.3). We define a new 273 signed object format that would encode only the semantics that are 274 needed for this application. The credential has the following 275 structure: 277 struct { 278 uint32 valid_time; 279 SignatureScheme expected_cert_verify_algorithm; 280 opaque ASN1_subjectPublicKeyInfo<1..2^24-1>; 281 } Credential; 283 valid_time: Relative time in seconds from the beginning of the 284 delegation certificate's notBefore value after which the delegated 285 credential is no longer valid. 287 expected_cert_verify_algorithm: The signature algorithm of the 288 credential key pair, where the type SignatureScheme is as defined 289 in [RFC8446]. This is expected to be the same as 290 CertificateVerify.algorithm sent by the server. 292 ASN1_subjectPublicKeyInfo: The credential's public key, a DER- 293 encoded [X690] SubjectPublicKeyInfo as defined in [RFC5280]. 295 The delegated credential has the following structure: 297 struct { 298 Credential cred; 299 SignatureScheme algorithm; 300 opaque signature<0..2^16-1>; 301 } DelegatedCredential; 303 algorithm: The signature algorithm used to verify 304 DelegatedCredential.signature. 306 signature: The delegation, a signature that binds the credential to 307 the end-entity certificate's public key as specified below. The 308 signature scheme is specified by DelegatedCredential.algorithm. 310 The signature of the DelegatedCredential is computed over the 311 concatenation of: 313 1. A string that consists of octet 32 (0x20) repeated 64 times. 315 2. The context string "TLS, server delegated credentials". 317 3. A single 0 byte, which serves as the separator. 319 4. The DER-encoded X.509 end-entity certificate used to sign the 320 DelegatedCredential. 322 5. DelegatedCredential.cred. 324 6. DelegatedCredential.algorithm. 326 The signature effectively binds the credential to the parameters of 327 the handshake in which it is used. In particular, it ensures that 328 credentials are only used with the certificate and signature 329 algorithm chosen by the delegator. Minimizing their semantics in 330 this way is intended to mitigate the risk of cross protocol attacks 331 involving delegated credentials. 333 The code changes required in order to create and verify delegated 334 credentials, and the implementation complexity this entails, are 335 localized to the TLS stack. This has the advantage of avoiding 336 changes to security-critical and often delicate PKI code. 338 3.1. Client and Server behavior 340 This document defines the following extension code point. 342 enum { 343 ... 344 delegated_credential(TBD), 345 (65535) 346 } ExtensionType; 348 A client which supports this specification SHALL send an empty 349 "delegated_credential" extension in its ClientHello. If the client 350 receives a delegated credential without indicating support, then the 351 client MUST abort with an "unexpected_message" alert. 353 If the extension is present, the server MAY send a delegated 354 credential; if the extension is not present, the server MUST NOT send 355 a delegated credential. A delegated credential MUST NOT be provided 356 unless a Certificate message is also sent. The server MUST ignore 357 the extension unless TLS 1.3 or a later version is negotiated. 359 The server MUST send the delegated credential as an extension in the 360 CertificateEntry of its end-entity certificate; the client SHOULD 361 ignore delegated credentials sent as extensions to any other 362 certificate. 364 The algorithm and expected_cert_verify_algorithm fields MUST be of a 365 type advertised by the client in the "signature_algorithms" 366 extension. A delegated credential MUST NOT be negotiated otherwise, 367 even if the client advertises support for delegated credentials. 369 On receiving a delegated credential and a certificate chain, the 370 client validates the certificate chain and matches the end-entity 371 certificate to the server's expected identity in the usual way. It 372 also takes the following steps: 374 1. Verify that the current time is within the validity interval of 375 the credential and that the credential's time to live is no more 376 than 7 days. This is done by asserting that the current time is 377 no more than the delegation certificate's notBefore value plus 378 DelegatedCredential.cred.valid_time. 380 2. Verify that expected_cert_verify_algorithm matches the scheme 381 indicated in the server's CertificateVerify message. 383 3. Verify that the end-entity certificate satisfies the conditions 384 in Section 3.2. 386 4. Use the public key in the server's end-entity certificate to 387 verify the signature of the credential using the algorithm 388 indicated by DelegatedCredential.algorithm. 390 If one or more of these checks fail, then the delegated credential is 391 deemed invalid. Clients that receive invalid delegated credentials 392 MUST terminate the connection with an "illegal_parameter" alert. If 393 successful, the client uses the public key in the credential to 394 verify the signature in the server's CertificateVerify message. 396 3.2. Certificate Requirements 398 We define a new X.509 extension, DelegationUsage, to be used in the 399 certificate when the certificate permits the usage of delegated 400 credentials. 402 id-ce-delegationUsage OBJECT IDENTIFIER ::= { 1.3.6.1.4.1.44363.44 } 403 DelegationUsage ::= NULL 405 The extension MUST be marked non-critical. (See Section 4.2 of 406 [RFC5280].) The client MUST NOT accept a delegated credential unless 407 the server's end-entity certificate satisfies the following criteria: 409 o It has the DelegationUsage extension. 411 o It has the digitalSignature KeyUsage (see the KeyUsage extension 412 defined in [RFC5280]). 414 4. IANA Considerations 416 TBD 418 5. Security Considerations 420 5.1. Security of delegated private key 422 Delegated credentials limit the exposure of the TLS private key by 423 limiting its validity. An attacker who compromises the private key 424 of a delegated credential can act as a man in the middle until the 425 delegate credential expires, however they cannot create new delegated 426 credentials. Thus, delegated credentials should not be used to send 427 a delegation to an untrusted party, but is meant to be used between 428 parties that have some trust relationship with each other. The 429 secrecy of the delegated private key is thus important and several 430 access control mechanisms SHOULD be used to protect it, including 431 file system controls, physical security, or hardware security 432 modules. 434 5.2. Revocation of delegated credentials 436 Delegated credentials do not provide any additional form of early 437 revocation. Since it is short lived, the expiry of the delegated 438 credential would revoke the credential. Revocation of the long term 439 private key that signs the delegated credential also implicitly 440 revokes the delegated credential. 442 5.3. Privacy considerations 444 Delegated credentials can be valid for 7 days and it is much easier 445 for a service to create delegated credential than a certificate 446 signed by a CA. A service could determine the client time and clock 447 skew by creating several delegated credentials with different expiry 448 timestamps and observing whether the client would accept it. Client 449 time could be unique and thus privacy sensitive clients, such as 450 browsers in incognito mode, who do not trust the service might not 451 want to advertise support for delegated credentials or limit the 452 number of probes that a server can perform. 454 6. Acknowledgements 456 Thanks to David Benjamin, Christopher Patton, Kyle Nekritz, Anirudh 457 Ramachandran, Benjamin Kaduk, Kazuho Oku, Daniel Kahn Gillmor, Watson 458 Ladd for their discussions, ideas, and bugs they have found. 460 7. References 461 7.1. Normative References 463 [RFC5280] Cooper, D., Santesson, S., Farrell, S., Boeyen, S., 464 Housley, R., and W. Polk, "Internet X.509 Public Key 465 Infrastructure Certificate and Certificate Revocation List 466 (CRL) Profile", RFC 5280, DOI 10.17487/RFC5280, May 2008, 467 . 469 [RFC8446] Rescorla, E., "The Transport Layer Security (TLS) Protocol 470 Version 1.3", RFC 8446, DOI 10.17487/RFC8446, August 2018, 471 . 473 [X690] ITU-T, "Information technology - ASN.1 encoding Rules: 474 Specification of Basic Encoding Rules (BER), Canonical 475 Encoding Rules (CER) and Distinguished Encoding Rules 476 (DER)", ISO/IEC 8825-1:2002, 2002. 478 7.2. Informative References 480 [I-D.ietf-acme-acme] 481 Barnes, R., Hoffman-Andrews, J., McCarney, D., and J. 482 Kasten, "Automatic Certificate Management Environment 483 (ACME)", draft-ietf-acme-acme-18 (work in progress), 484 December 2018. 486 [I-D.ietf-tls-tls13] 487 Rescorla, E., "The Transport Layer Security (TLS) Protocol 488 Version 1.3", draft-ietf-tls-tls13-28 (work in progress), 489 March 2018. 491 [I-D.mglt-lurk-tls-requirements] 492 Migault, D. and K. Ma, "Authentication Model and Security 493 Requirements for the TLS/DTLS Content Provider Edge Server 494 Split Use Case", draft-mglt-lurk-tls-requirements-00 (work 495 in progress), January 2016. 497 [RFC3820] Tuecke, S., Welch, V., Engert, D., Pearlman, L., and M. 498 Thompson, "Internet X.509 Public Key Infrastructure (PKI) 499 Proxy Certificate Profile", RFC 3820, 500 DOI 10.17487/RFC3820, June 2004, . 503 [RFC6066] Eastlake 3rd, D., "Transport Layer Security (TLS) 504 Extensions: Extension Definitions", RFC 6066, 505 DOI 10.17487/RFC6066, January 2011, . 508 [RFC6961] Pettersen, Y., "The Transport Layer Security (TLS) 509 Multiple Certificate Status Request Extension", RFC 6961, 510 DOI 10.17487/RFC6961, June 2013, . 513 [XPROT] Jager, T., Schwenk, J., and J. Somorovsky, "On the 514 Security of TLS 1.3 and QUIC Against Weaknesses in PKCS#1 515 v1.5 Encryption", Proceedings of the 22nd ACM SIGSAC 516 Conference on Computer and Communications Security , 2015. 518 Authors' Addresses 520 Richard Barnes 521 Mozilla 523 Email: rlb@ipv.sx 525 Subodh Iyengar 526 Facebook 528 Email: subodh@fb.com 530 Nick Sullivan 531 Cloudflare 533 Email: nick@cloudflare.com 535 Eric Rescorla 536 RTFM, Inc. 538 Email: ekr@rtfm.com