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