idnits 2.17.1 draft-ietf-httpbis-client-cert-field-00.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 : ---------------------------------------------------------------------------- No issues found here. Miscellaneous warnings: ---------------------------------------------------------------------------- == The copyright year in the IETF Trust and authors Copyright Line does not match the current year -- The document date (8 June 2021) is 1052 days in the past. Is this intentional? Checking references for intended status: Informational ---------------------------------------------------------------------------- -- Obsolete informational reference (is this intentional?): RFC 5246 (Obsoleted by RFC 8446) -- Obsolete informational reference (is this intentional?): RFC 7230 (Obsoleted by RFC 9110, RFC 9112) Summary: 0 errors (**), 0 flaws (~~), 1 warning (==), 3 comments (--). Run idnits with the --verbose option for more detailed information about the items above. -------------------------------------------------------------------------------- 2 HTTP B. Campbell 3 Internet-Draft Ping Identity 4 Intended status: Informational M. Bishop, Ed. 5 Expires: 10 December 2021 Akamai 6 8 June 2021 8 Client-Cert HTTP Header Field: Conveying Client Certificate Information 9 from TLS Terminating Reverse Proxies to Origin Server Applications 10 draft-ietf-httpbis-client-cert-field-00 12 Abstract 14 This document defines the HTTP header field "Client-Cert" that allows 15 a TLS terminating reverse proxy to convey the client certificate of a 16 mutually-authenticated TLS connection to the origin server in a 17 common and predictable manner. 19 Note to Readers 21 _RFC EDITOR: please remove this section before publication_ 23 Discussion of this draft takes place on the HTTP working group 24 mailing list (ietf-http-wg@w3.org), which is archived at 25 https://lists.w3.org/Archives/Public/ietf-http-wg/ 26 (https://lists.w3.org/Archives/Public/ietf-http-wg/). 28 Working Group information can be found at http://httpwg.github.io/ 29 (http://httpwg.github.io/); source code and issues list for this 30 draft can be found at https://github.com/httpwg/http- 31 extensions/labels/client-cert-header (https://github.com/httpwg/http- 32 extensions/labels/client-cert-header). 34 Status of This Memo 36 This Internet-Draft is submitted in full conformance with the 37 provisions of BCP 78 and BCP 79. 39 Internet-Drafts are working documents of the Internet Engineering 40 Task Force (IETF). Note that other groups may also distribute 41 working documents as Internet-Drafts. The list of current Internet- 42 Drafts is at https://datatracker.ietf.org/drafts/current/. 44 Internet-Drafts are draft documents valid for a maximum of six months 45 and may be updated, replaced, or obsoleted by other documents at any 46 time. It is inappropriate to use Internet-Drafts as reference 47 material or to cite them other than as "work in progress." 48 This Internet-Draft will expire on 10 December 2021. 50 Copyright Notice 52 Copyright (c) 2021 IETF Trust and the persons identified as the 53 document authors. All rights reserved. 55 This document is subject to BCP 78 and the IETF Trust's Legal 56 Provisions Relating to IETF Documents (https://trustee.ietf.org/ 57 license-info) in effect on the date of publication of this document. 58 Please review these documents carefully, as they describe your rights 59 and restrictions with respect to this document. Code Components 60 extracted from this document must include Simplified BSD License text 61 as described in Section 4.e of the Trust Legal Provisions and are 62 provided without warranty as described in the Simplified BSD License. 64 Table of Contents 66 1. Introduction . . . . . . . . . . . . . . . . . . . . . . . . 2 67 1.1. Requirements Notation and Conventions . . . . . . . . . . 4 68 1.2. Terminology . . . . . . . . . . . . . . . . . . . . . . . 4 69 2. HTTP Header Field and Processing Rules . . . . . . . . . . . 4 70 2.1. Encoding . . . . . . . . . . . . . . . . . . . . . . . . 4 71 2.2. Client-Cert HTTP Header Field . . . . . . . . . . . . . . 5 72 2.3. Processing Rules . . . . . . . . . . . . . . . . . . . . 5 73 3. Security Considerations . . . . . . . . . . . . . . . . . . . 6 74 4. IANA Considerations . . . . . . . . . . . . . . . . . . . . . 7 75 5. References . . . . . . . . . . . . . . . . . . . . . . . . . 7 76 5.1. Normative References . . . . . . . . . . . . . . . . . . 7 77 5.2. Informative References . . . . . . . . . . . . . . . . . 7 78 Appendix A. Example . . . . . . . . . . . . . . . . . . . . . . 9 79 Appendix B. Considerations Considered . . . . . . . . . . . . . 10 80 B.1. Header Injection . . . . . . . . . . . . . . . . . . . . 10 81 B.2. The Forwarded HTTP Extension . . . . . . . . . . . . . . 10 82 B.3. The Whole Certificate and Only the Whole Certificate . . 11 83 Appendix C. Acknowledgements . . . . . . . . . . . . . . . . . . 12 84 Appendix D. Document History . . . . . . . . . . . . . . . . . . 13 85 Authors' Addresses . . . . . . . . . . . . . . . . . . . . . . . 14 87 1. Introduction 89 A fairly common deployment pattern for HTTPS applications is to have 90 the origin HTTP application servers sit behind a reverse proxy that 91 terminates TLS connections from clients. The proxy is accessible to 92 the internet and dispatches client requests to the appropriate origin 93 server within a private or protected network. The origin servers are 94 not directly accessible by clients and are only reachable through the 95 reverse proxy. The backend details of this type of deployment are 96 typically opaque to clients who make requests to the proxy server and 97 see responses as though they originated from the proxy server itself. 98 Although HTTPS is also usually employed between the proxy and the 99 origin server, the TLS connection that the client establishes for 100 HTTPS is only between itself and the reverse proxy server. 102 The deployment pattern is found in a number of varieties such as 103 n-tier architectures, content delivery networks, application load 104 balancing services, and ingress controllers. 106 Although not exceedingly prevalent, TLS client certificate 107 authentication is sometimes employed and in such cases the origin 108 server often requires information about the client certificate for 109 its application logic. Such logic might include access control 110 decisions, audit logging, and binding issued tokens or cookies to a 111 certificate, and the respective validation of such bindings. The 112 specific details from the certificate needed also vary with the 113 application requirements. In order for these types of application 114 deployments to work in practice, the reverse proxy needs to convey 115 information about the client certificate to the origin application 116 server. A common way this information is conveyed in practice today 117 is by using non-standard headers to carry the certificate (in some 118 encoding) or individual parts thereof in the HTTP request that is 119 dispatched to the origin server. This solution works but 120 interoperability between independently developed components can be 121 cumbersome or even impossible depending on the implementation choices 122 respectively made (like what header names are used or are 123 configurable, which parts of the certificate are exposed, or how the 124 certificate is encoded). A well-known predictable approach to this 125 commonly occurring functionality could improve and simplify 126 interoperability between independent implementations. 128 This document aspires to standardize an HTTP header field named 129 "Client-Cert" that a TLS terminating reverse proxy (TTRP) adds to 130 requests that it sends to the backend origin servers. The header 131 value contains the client certificate from the mutually-authenticated 132 TLS connection between the originating client and the TTRP. This 133 enables the backend origin server to utilize the client certificate 134 information in its application logic. While there may be additional 135 proxies or hops between the TTRP and the origin server (potentially 136 even with mutually-authenticated TLS connections between them), the 137 scope of the "Client-Cert" header is intentionally limited to 138 exposing to the origin server the certificate that was presented by 139 the originating client in its connection to the TTRP. 141 1.1. Requirements Notation and Conventions 143 The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT", 144 "SHOULD", "SHOULD NOT", "RECOMMENDED", "NOT RECOMMENDED", "MAY", and 145 "OPTIONAL" in this document are to be interpreted as described in BCP 146 14 [RFC2119] [RFC8174] when, and only when, they appear in all 147 capitals, as shown here. 149 1.2. Terminology 151 Phrases like TLS client certificate authentication or mutually- 152 authenticated TLS are used throughout this document to refer to the 153 process whereby, in addition to the normal TLS server authentication 154 with a certificate, a client presents its X.509 certificate [RFC5280] 155 and proves possession of the corresponding private key to a server 156 when negotiating a TLS connection or the resumption of such a 157 connection. In contemporary versions of TLS [RFC8446] [RFC5246] this 158 requires that the client send the Certificate and CertificateVerify 159 messages during the handshake and for the server to verify the 160 CertificateVerify and Finished messages. 162 TODO: HTTP2 forbids TLS renegotiation and post-handshake 163 authentication but it's possible with HTTP1.1 and maybe needs to 164 be discussed explicitly here or somewhere in this document? 165 Naively I'd say that the "Client-Cert" header will be sent with 166 the data of the most recent client cert anytime after 167 renegotiation or post-handshake auth. And only for requests that 168 are fully covered by the cert but that in practice making the 169 determination of where exactly in the application data the cert 170 messages arrived is hard to impossible so it'll be a best effort 171 kind of thing. 173 2. HTTP Header Field and Processing Rules 175 2.1. Encoding 177 The field-values of the HTTP header defined herein utilize the 178 following encoded form. 180 A certificate is represented in text as an "EncodedCertificate", 181 which is the base64-encoded (Section 4 of [RFC4648]) DER 182 [ITU.X690.1994] PKIX certificate. The encoded value MUST NOT include 183 any line breaks, whitespace, or other additional characters. ABNF 184 [RFC5234] syntax for "EncodedCertificate" is shown in the figure 185 below. 187 EncodedCertificate = 1*( DIGIT / ALPHA / "+" / "/" ) 0*2"=" 189 DIGIT = ; A-Z / a-z 190 ALPHA = ; 0-9 192 2.2. Client-Cert HTTP Header Field 194 In the context of a TLS terminating reverse proxy (TTRP) deployment, 195 the TTRP makes the TLS client certificate available to the backend 196 application with the following header field. 198 Client-Cert: The end-entity client certificate as an 199 "EncodedCertificate" value. 201 The "Client-Cert" header field defined herein is only for use in HTTP 202 requests and MUST NOT be used in HTTP responses. It is a single HTTP 203 header field-value as defined in Section 3.2 of [RFC7230], which MUST 204 NOT have a list of values or occur multiple times in a request. 206 2.3. Processing Rules 208 This section outlines the applicable processing rules for a TLS 209 terminating reverse proxy (TTRP) that has negotiated a mutually- 210 authenticated TLS connection to convey the client certificate from 211 that connection to the backend origin servers. Use of the technique 212 is to be a configuration or deployment option and the processing 213 rules described herein are for servers operating with that option 214 enabled. 216 A TTRP negotiates the use of a mutually-authenticated TLS connection 217 with the client, such as is described in [RFC8446] or [RFC5246], and 218 validates the client certificate per its policy and trusted 219 certificate authorities. Each HTTP request on the underlying TLS 220 connection are dispatched to the origin server with the following 221 modifications: 223 1. The client certificate is be placed in the "Client-Cert" header 224 field of the dispatched request as defined in Section 2.2. 226 2. Any occurrence of the "Client-Cert" header in the original 227 incoming request MUST be removed or overwritten before forwarding 228 the request. An incoming request that has a "Client-Cert" header 229 MAY be rejected with an HTTP 400 response. 231 Requests made over a TLS connection where the use of client 232 certificate authentication was not negotiated MUST be sanitized by 233 removing any and all occurrences "Client-Cert" header field prior to 234 dispatching the request to the backend server. 236 Backend origin servers may then use the "Client-Cert" header of the 237 request to determine if the connection from the client to the TTRP 238 was mutually-authenticated and, if so, the certificate thereby 239 presented by the client. 241 Forward proxies and other intermediaries MUST NOT add the "Client- 242 Cert" header to requests, or modify an existing "Client-Cert" header. 243 Similarly, clients MUST NOT employ the "Client-Cert" header in 244 requests. 246 A server that receives a request with a "Client-Cert" header value 247 that it considers to be too large can respond with an HTTP 431 status 248 code per Section 5 of [RFC6585]. 250 3. Security Considerations 252 The header described herein enable a TTRP and backend or origin 253 server to function together as though, from the client's perspective, 254 they are a single logical server side deployment of HTTPS over a 255 mutually-authenticated TLS connection. Use of the "Client-Cert" 256 header outside that intended use case, however, may undermine the 257 protections afforded by TLS client certificate authentication. 258 Therefore steps MUST be taken to prevent unintended use, both in 259 sending the header and in relying on its value. 261 Producing and consuming the "Client-Cert" header SHOULD be a 262 configurable option, respectively, in a TTRP and backend server (or 263 individual application in that server). The default configuration 264 for both should be to not use the "Client-Cert" header thus requiring 265 an "opt-in" to the functionality. 267 In order to prevent header injection, backend servers MUST only 268 accept the "Client-Cert" header from a trusted TTRP (or other proxy 269 in a trusted path from the TTRP). A TTRP MUST sanitize the incoming 270 request before forwarding it on by removing or overwriting any 271 existing instances of the header. Otherwise arbitrary clients can 272 control the header value as seen and used by the backend server. It 273 is important to note that neglecting to prevent header injection does 274 not "fail safe" in that the nominal functionality will still work as 275 expected even when malicious actions are possible. As such, extra 276 care is recommended in ensuring that proper header sanitation is in 277 place. 279 The communication between a TTRP and backend server needs to be 280 secured against eavesdropping and modification by unintended parties. 282 The configuration options and request sanitization are necessarily 283 functionally of the respective servers. The other requirements can 284 be met in a number of ways, which will vary based on specific 285 deployments. The communication between a TTRP and backend or origin 286 server, for example, might be authenticated in some way with the 287 insertion and consumption of the "Client-Cert" header occurring only 288 on that connection. Alternatively the network topology might dictate 289 a private network such that the backend application is only able to 290 accept requests from the TTRP and the proxy can only make requests to 291 that server. Other deployments that meet the requirements set forth 292 herein are also possible. 294 4. IANA Considerations 296 TODO: register the "Client-Cert" HTTP header field in the registry 297 defined by http-core. 299 5. References 301 5.1. Normative References 303 [RFC2119] Bradner, S., "Key words for use in RFCs to Indicate 304 Requirement Levels", BCP 14, RFC 2119, 305 DOI 10.17487/RFC2119, March 1997, 306 . 308 [RFC8174] Leiba, B., "Ambiguity of Uppercase vs Lowercase in RFC 309 2119 Key Words", BCP 14, RFC 8174, DOI 10.17487/RFC8174, 310 May 2017, . 312 [RFC5280] Cooper, D., Santesson, S., Farrell, S., Boeyen, S., 313 Housley, R., and W. Polk, "Internet X.509 Public Key 314 Infrastructure Certificate and Certificate Revocation List 315 (CRL) Profile", RFC 5280, DOI 10.17487/RFC5280, May 2008, 316 . 318 [RFC4648] Josefsson, S., "The Base16, Base32, and Base64 Data 319 Encodings", RFC 4648, DOI 10.17487/RFC4648, October 2006, 320 . 322 [ITU.X690.1994] 323 International Telecommunications Union, "Information 324 Technology - ASN.1 encoding rules: Specification of Basic 325 Encoding Rules (BER), Canonical Encoding Rules (CER) and 326 Distinguished Encoding Rules (DER)", ITU-T Recommendation 327 X.690, 1994. 329 5.2. Informative References 331 [RFC8446] Rescorla, E., "The Transport Layer Security (TLS) Protocol 332 Version 1.3", RFC 8446, DOI 10.17487/RFC8446, August 2018, 333 . 335 [RFC5246] Dierks, T. and E. Rescorla, "The Transport Layer Security 336 (TLS) Protocol Version 1.2", RFC 5246, 337 DOI 10.17487/RFC5246, August 2008, 338 . 340 [RFC5234] Crocker, D., Ed. and P. Overell, "Augmented BNF for Syntax 341 Specifications: ABNF", STD 68, RFC 5234, 342 DOI 10.17487/RFC5234, January 2008, 343 . 345 [RFC7230] Fielding, R., Ed. and J. Reschke, Ed., "Hypertext Transfer 346 Protocol (HTTP/1.1): Message Syntax and Routing", 347 RFC 7230, DOI 10.17487/RFC7230, June 2014, 348 . 350 [RFC6585] Nottingham, M. and R. Fielding, "Additional HTTP Status 351 Codes", RFC 6585, DOI 10.17487/RFC6585, April 2012, 352 . 354 [RFC7239] Petersson, A. and M. Nilsson, "Forwarded HTTP Extension", 355 RFC 7239, DOI 10.17487/RFC7239, June 2014, 356 . 358 [RFC8705] Campbell, B., Bradley, J., Sakimura, N., and T. 359 Lodderstedt, "OAuth 2.0 Mutual-TLS Client Authentication 360 and Certificate-Bound Access Tokens", RFC 8705, 361 DOI 10.17487/RFC8705, February 2020, 362 . 364 [RFC8941] Nottingham, M. and P-H. Kamp, "Structured Field Values for 365 HTTP", RFC 8941, DOI 10.17487/RFC8941, February 2021, 366 . 368 [RFC7250] Wouters, P., Ed., Tschofenig, H., Ed., Gilmore, J., 369 Weiler, S., and T. Kivinen, "Using Raw Public Keys in 370 Transport Layer Security (TLS) and Datagram Transport 371 Layer Security (DTLS)", RFC 7250, DOI 10.17487/RFC7250, 372 June 2014, . 374 Appendix A. Example 376 In a hypothetical example where a TLS client presents the client and 377 intermediate certificate from Figure 1 when establishing a mutually- 378 authenticated TLS connection with the TTRP, the proxy would send the 379 "Client-Cert" header shown in {#example-header} to the backend. Note 380 that line breaks and whitespace have been added to the value of the 381 header field in Figure 2 for display and formatting purposes only. 383 -----BEGIN CERTIFICATE----- 384 MIIBqDCCAU6gAwIBAgIBBzAKBggqhkjOPQQDAjA6MRswGQYDVQQKDBJMZXQncyBB 385 dXRoZW50aWNhdGUxGzAZBgNVBAMMEkxBIEludGVybWVkaWF0ZSBDQTAeFw0yMDAx 386 MTQyMjU1MzNaFw0yMTAxMjMyMjU1MzNaMA0xCzAJBgNVBAMMAkJDMFkwEwYHKoZI 387 zj0CAQYIKoZIzj0DAQcDQgAE8YnXXfaUgmnMtOXU/IncWalRhebrXmckC8vdgJ1p 388 5Be5F/3YC8OthxM4+k1M6aEAEFcGzkJiNy6J84y7uzo9M6NyMHAwCQYDVR0TBAIw 389 ADAfBgNVHSMEGDAWgBRm3WjLa38lbEYCuiCPct0ZaSED2DAOBgNVHQ8BAf8EBAMC 390 BsAwEwYDVR0lBAwwCgYIKwYBBQUHAwIwHQYDVR0RAQH/BBMwEYEPYmRjQGV4YW1w 391 bGUuY29tMAoGCCqGSM49BAMCA0gAMEUCIBHda/r1vaL6G3VliL4/Di6YK0Q6bMje 392 SkC3dFCOOB8TAiEAx/kHSB4urmiZ0NX5r5XarmPk0wmuydBVoU4hBVZ1yhk= 393 -----END CERTIFICATE----- 394 -----BEGIN CERTIFICATE----- 395 MIIB5jCCAYugAwIBAgIBFjAKBggqhkjOPQQDAjBWMQswCQYDVQQGEwJVUzEbMBkG 396 A1UECgwSTGV0J3MgQXV0aGVudGljYXRlMSowKAYDVQQDDCFMZXQncyBBdXRoZW50 397 aWNhdGUgUm9vdCBBdXRob3JpdHkwHhcNMjAwMTE0MjEzMjMwWhcNMzAwMTExMjEz 398 MjMwWjA6MRswGQYDVQQKDBJMZXQncyBBdXRoZW50aWNhdGUxGzAZBgNVBAMMEkxB 399 IEludGVybWVkaWF0ZSBDQTBZMBMGByqGSM49AgEGCCqGSM49AwEHA0IABJf+aA54 400 RC5pyLAR5yfXVYmNpgd+CGUTDp2KOGhc0gK91zxhHesEYkdXkpS2UN8Kati+yHtW 401 CV3kkhCngGyv7RqjZjBkMB0GA1UdDgQWBBRm3WjLa38lbEYCuiCPct0ZaSED2DAf 402 BgNVHSMEGDAWgBTEA2Q6eecKu9g9yb5glbkhhVINGDASBgNVHRMBAf8ECDAGAQH/ 403 AgEAMA4GA1UdDwEB/wQEAwIBhjAKBggqhkjOPQQDAgNJADBGAiEA5pLvaFwRRkxo 404 mIAtDIwg9D7gC1xzxBl4r28EzmSO1pcCIQCJUShpSXO9HDIQMUgH69fNDEMHXD3R 405 RX5gP7kuu2KGMg== 406 -----END CERTIFICATE----- 407 -----BEGIN CERTIFICATE----- 408 MIICBjCCAaygAwIBAgIJAKS0yiqKtlhoMAoGCCqGSM49BAMCMFYxCzAJBgNVBAYT 409 AlVTMRswGQYDVQQKDBJMZXQncyBBdXRoZW50aWNhdGUxKjAoBgNVBAMMIUxldCdz 410 IEF1dGhlbnRpY2F0ZSBSb290IEF1dGhvcml0eTAeFw0yMDAxMTQyMTI1NDVaFw00 411 MDAxMDkyMTI1NDVaMFYxCzAJBgNVBAYTAlVTMRswGQYDVQQKDBJMZXQncyBBdXRo 412 ZW50aWNhdGUxKjAoBgNVBAMMIUxldCdzIEF1dGhlbnRpY2F0ZSBSb290IEF1dGhv 413 cml0eTBZMBMGByqGSM49AgEGCCqGSM49AwEHA0IABFoaHU+Z5bPKmGzlYXtCf+E6 414 HYj62fORaHDOrt+yyh3H/rTcs7ynFfGn+gyFsrSP3Ez88rajv+U2NfD0o0uZ4Pmj 415 YzBhMB0GA1UdDgQWBBTEA2Q6eecKu9g9yb5glbkhhVINGDAfBgNVHSMEGDAWgBTE 416 A2Q6eecKu9g9yb5glbkhhVINGDAPBgNVHRMBAf8EBTADAQH/MA4GA1UdDwEB/wQE 417 AwIBhjAKBggqhkjOPQQDAgNIADBFAiEAmAeg1ycKHriqHnaD4M/UDBpQRpkmdcRF 418 YGMg1Qyrkx4CIB4ivz3wQcQkGhcsUZ1SOImd/lq1Q0FLf09rGfLQPWDc 419 -----END CERTIFICATE----- 421 Figure 1: Certificate Chain (with client certificate first) 423 Client-Cert: MIIBqDCCAU6gAwIBAgIBBzAKBggqhkjOPQQDAjA6MRswGQYDVQQKDBJM 424 ZXQncyBBdXRoZW50aWNhdGUxGzAZBgNVBAMMEkxBIEludGVybWVkaWF0ZSBDQTAeFw0y 425 MDAxMTQyMjU1MzNaFw0yMTAxMjMyMjU1MzNaMA0xCzAJBgNVBAMMAkJDMFkwEwYHKoZI 426 zj0CAQYIKoZIzj0DAQcDQgAE8YnXXfaUgmnMtOXU/IncWalRhebrXmckC8vdgJ1p5Be5 427 F/3YC8OthxM4+k1M6aEAEFcGzkJiNy6J84y7uzo9M6NyMHAwCQYDVR0TBAIwADAfBgNV 428 HSMEGDAWgBRm3WjLa38lbEYCuiCPct0ZaSED2DAOBgNVHQ8BAf8EBAMCBsAwEwYDVR0l 429 BAwwCgYIKwYBBQUHAwIwHQYDVR0RAQH/BBMwEYEPYmRjQGV4YW1wbGUuY29tMAoGCCqG 430 SM49BAMCA0gAMEUCIBHda/r1vaL6G3VliL4/Di6YK0Q6bMjeSkC3dFCOOB8TAiEAx/kH 431 SB4urmiZ0NX5r5XarmPk0wmuydBVoU4hBVZ1yhk= 433 Figure 2: Header in HTTP Request to Origin Server 435 Appendix B. Considerations Considered 437 B.1. Header Injection 439 This draft requires that the TTRP sanitize the headers of the 440 incoming request by removing or overwriting any existing instances of 441 the "Client-Cert" header before dispatching that request to the 442 backend application. Otherwise, a client could inject its own 443 "Client-Cert" header that would appear to the backend to have come 444 from the TTRP. Although numerous other methods of detecting/ 445 preventing header injection are possible; such as the use of a unique 446 secret value as part of the header name or value or the application 447 of a signature, HMAC, or AEAD, there is no common general 448 standardized mechanism. The potential problem of client header 449 injection is not at all unique to the functionality of this draft and 450 it would therefor be inappropriate for this draft to define a one-off 451 solution. In the absence of a generic standardized solution existing 452 currently, stripping/sanitizing the headers is the de facto means of 453 protecting against header injection in practice today. Sanitizing 454 the headers is sufficient when properly implemented and is normative 455 requirement of Section 3. 457 B.2. The Forwarded HTTP Extension 459 The "Forwarded" HTTP header field defined in [RFC7239] allows proxy 460 components to disclose information lost in the proxying process. The 461 TLS client certificate information of concern to this draft could 462 have been communicated with an extension parameter to the "Forwarded" 463 header field, however, doing so would have had some disadvantages 464 that this draft endeavored to avoid. The "Forwarded" header syntax 465 allows for information about a full chain of proxied HTTP requests, 466 whereas the "Client-Cert" header of this document is concerned only 467 with conveying information about the certificate presented by the 468 originating client on the TLS connection to the TTRP (which appears 469 as the server from that client's perspective) to backend 470 applications. The multi-hop syntax of the "Forwarded" header is 471 expressive but also more complicated, which would make processing it 472 more cumbersome, and more importantly, make properly sanitizing its 473 content as required by Section 3 to prevent header injection 474 considerably more difficult and error prone. Thus, this draft opted 475 for the flatter and more straightforward structure of a single 476 "Client-Cert" header. 478 B.3. The Whole Certificate and Only the Whole Certificate 480 Different applications will have varying requirements about what 481 information from the client certificate is needed, such as the 482 subject and/or issuer distinguished name, subject alternative 483 name(s), serial number, subject public key info, fingerprint, etc.. 484 Furthermore some applications, such as "OAuth 2.0 Mutual-TLS Client 485 Authentication and Certificate-Bound Access Tokens" [RFC8705], make 486 use of the entire certificate. In order to accommodate the latter 487 and ensure wide applicability by not trying to cherry-pick particular 488 certificate information, this draft opted to pass the full encoded 489 certificate as the value of the "Client-Cert" header. 491 The handshake and validation of the client certificate (chain) of the 492 mutually-authenticated TLS connection is performed by the TTRP. With 493 the responsibility of certificate validation falling on the TTRP, 494 only the end-entity certificate is passed to the backend - the root 495 Certificate Authority is not included nor are any intermediates. 497 TODO: It has been suggested that more information about the 498 certificate chain might be needed/wanted by the backend 499 application (to independently evaluate the cert chain, for 500 example, although that seems like it would be terribly 501 inefficient) and that any intermediates as well as the root should 502 also be somehow conveyed, which is an area for further discussion 503 should this draft progress. One potential approach suggested by a 504 few folks is to allow some configurability in what is sent along 505 with maybe a prefix token to indicate what's being sent - 506 something like "Client-Cert: FULL \ \ 507 \" or "Client-Cert: EE \" as the strawman. Or a 508 perhaps a parameter or other construct of [RFC8941] to indicate 509 what's being sent. It's also been suggested that the end-entity 510 certificate by itself might sometimes be too big (esp. e.g., with 511 some post-quantum signature schemes). Hard to account for it both 512 being too much data and not enough data at the same time. But 513 potentially opening up configuration options to send only specific 514 attribute(s) from the client certificate is a possibility for 515 that. In the author's humble opinion the end-entity certificate 516 by itself strikes a good balance for the vast majority of needs 517 and avoids optionality. But, again, this is an area for further 518 discussion should this draft progress. 520 TODO: It has also been suggested that maybe considerations for 521 [RFC7250] Raw Public Keys is maybe worth considering. This too is 522 this is an area for further discussion and consideration should 523 this draft progress. 525 Appendix C. Acknowledgements 527 The author would like to thank the following individuals who've 528 contributed in various ways ranging from just being generally 529 supportive of bringing forth the draft to providing specific feedback 530 or content: 532 * Evan Anderson 534 * Annabelle Backman 536 * Mike Bishop 538 * Rory Hewitt 540 * Fredrik Jeansson 542 * Benjamin Kaduk 544 * Torsten Lodderstedt 546 * Kathleen Moriarty 548 * Mark Nottingham 550 * Mike Ounsworth 552 * Matt Peterson 554 * Eric Rescorla 556 * Justin Richer 558 * Michael Richardson 560 * Joe Salowey 562 * Rich Salz 564 * Mohit Sethi 566 * Rifaat Shekh-Yusef 567 * Travis Spencer 569 * Nick Sullivan 571 * Peter Wu 573 * Hans Zandbelt 575 Appendix D. Document History 577 To be removed by the RFC Editor before publication as an RFC 579 draft-ietf-httpbis-client-cert-field-00 581 * Initial WG revision 583 * Mike Bishop added as co-editor 585 draft-bdc-something-something-certificate-05 587 * Change intended status of the draft to Informational 589 * Editorial updates and (hopefully) clarifications 591 draft-bdc-something-something-certificate-04 593 * Update reference from draft-ietf-oauth-mtls to RFC8705 595 draft-bdc-something-something-certificate-03 597 * Expanded further discussion notes to capture some of the feedback 598 in and around the presentation of the draft in SECDISPATCH at IETF 599 107 and add those who've provided such feedback to the 600 acknowledgements 602 draft-bdc-something-something-certificate-02 604 * Editorial tweaks + further discussion notes 606 draft-bdc-something-something-certificate-01 608 * Use the RFC v3 Format or die trying 610 draft-bdc-something-something-certificate-00 612 * Initial draft after a time constrained and rushed secdispatch 613 presentation (https://datatracker.ietf.org/meeting/106/materials/ 614 slides-106-secdispatch-securing-protocols-between-proxies-and- 615 backend-http-servers-00) at IETF 106 in Singapore with the 616 recommendation to write up a draft (at the end of the minutes 617 (https://datatracker.ietf.org/meeting/106/materials/minutes- 618 106-secdispatch)) and some folks expressing interest despite the 619 rather poor presentation 621 Authors' Addresses 623 Brian Campbell 624 Ping Identity 626 Email: bcampbell@pingidentity.com 628 Mike Bishop (editor) 629 Akamai 631 Email: mbishop@evequefou.be