HTTP A. Backman, Ed. Internet-Draft Amazon Intended status: Standards Track J. Richer Expires:10 December 202114 February 2022 Bespoke Engineering M. Sporny Digital Bazaar8 June13 August 2021SigningHTTPMessages draft-ietf-httpbis-message-signatures-05Message Signatures draft-ietf-httpbis-message-signatures-06 Abstract This document describes a mechanism for creating, encoding, and verifying digital signatures or message authentication codes overcontent withincomponents of an HTTP message. This mechanism supports use cases where the full HTTP message may not be known to the signer, and where the message may be transformed (e.g., by intermediaries) before reaching the verifier. This document also describes a means for requesting that a signature be applied to a subsequent HTTP message in an ongoing HTTP exchange. Note to Readers _RFC EDITOR: please remove this section before publication_ Discussion of this draft takes place on the HTTP working group mailing list (ietf-http-wg@w3.org), which is archived at https://lists.w3.org/Archives/Public/ietf-http-wg/ (https://lists.w3.org/Archives/Public/ietf-http-wg/). Working Group information can be found at https://httpwg.org/ (https://httpwg.org/); source code and issues list for this draft can be found at https://github.com/httpwg/http-extensions/labels/ signatures (https://github.com/httpwg/http-extensions/labels/ signatures). Status of This Memo This Internet-Draft is submitted in full conformance with the provisions of BCP 78 and BCP 79. Internet-Drafts are working documents of the Internet Engineering Task Force (IETF). Note that other groups may also distribute working documents as Internet-Drafts. The list of current Internet- Drafts is at https://datatracker.ietf.org/drafts/current/. Internet-Drafts are draft documents valid for a maximum of six months and may be updated, replaced, or obsoleted by other documents at any time. It is inappropriate to use Internet-Drafts as reference material or to cite them other than as "work in progress." This Internet-Draft will expire on10 December 2021.14 February 2022. Copyright Notice Copyright (c) 2021 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) in effect on the date of publication of this document. Please review these documents carefully, as they describe your rights and restrictions with respect to this document. Code Components extracted from this document must include Simplified BSD License text as described in Section 4.e of the Trust Legal Provisions and are provided without warranty as described in the Simplified BSD License. Table of Contents 1. Introduction . . . . . . . . . . . . . . . . . . . . . . . .34 1.1. Requirements Discussion . . . . . . . . . . . . . . . . .45 1.2. HTTP Message Transformations . . . . . . . . . . . . . . 5 1.3. Safe Transformations . . . . . . . . . . . . . . . . . .56 1.4. Conventions and Terminology . . . . . . . . . . . . . . .67 1.5. Application of HTTP Message Signatures . . . . . . . . .89 2. HTTP MessageSignature Covered ContentComponents . . . . . . . . . . .8. . . . . . . . 10 2.1. HTTPHeadersFields . . . . . . . . . . . . . . . . . . . . . .9. 11 2.1.1. Canonicalized Structured HTTPHeadersFields . . . . . . . .1011 2.1.2. Canonicalization Examples . . . . . . . . . . . . . .1011 2.2. Dictionary Structured Field Members . . . . . . . . . . .1112 2.2.1. Canonicalization Examples . . . . . . . . . . . . . .1112 2.3. SpecialtyContent Fields .Components . . . . . . . . . . . . . . .11 2.3.1. Request Target. . . 13 2.3.1. Signature Parameters . . . . . . . . . . . . . . . .1214 2.3.2.Signature ParametersMethod . . . . . . . . . . . . . . . .13 2.4. Creating the Signature Input String . .. . . . . . . 15 2.3.3. Target URI . .14 3. HTTP Message Signatures. . . . . . . . . . . . . . . . . . . 163.1. Creating a Signature . . . .2.3.4. Authority . . . . . . . . . . . . . .17 3.2. Verifying a Signature. . . . . . . . 16 2.3.5. Scheme . . . . . . . . . .18 3.2.1. Enforcing Application Requirements. . . . . . . . .20 3.3. Signature Algorithm Methods. . . . 17 2.3.6. Request Target . . . . . . . . . . .21 3.3.1. RSASSA-PSS using SHA-512. . . . . . . . 17 2.3.7. Path . . . . . .21 3.3.2. RSASSA-PKCS1-v1_5 using SHA-256. . . . . . . . . . .22 3.3.3. HMAC using SHA-256. . . . . . . 19 2.3.8. Query . . . . . . . . . .22 3.3.4. ECDSA using curve P-256 DSS and SHA-256. . . . . . .23 3.3.5. JSON Web Signature (JWS) algorithms. . . . . . . 19 2.3.9. Query Parameters . .23 4. Including a Message Signature in a Message. . . . . . . . .23 4.1. The 'Signature-Input' HTTP Header. . . . . . . 20 2.3.10. Status Code . . . . .24 4.2. The 'Signature' HTTP Header. . . . . . . . . . . . . . .24 4.3. Multiple Signatures. 21 2.3.11. Request-Response Signature Binding . . . . . . . . . 21 2.4. Creating the Signature Input String . . . . . . . . .25 5. IANA Considerations. . 23 3. HTTP Message Signatures . . . . . . . . . . . . . . . . . . .26 5.1. HTTP25 3.1. Creating a SignatureAlgorithms Registry. . . . . . . . . . .26 5.1.1. Registration Template. . . . . . . 25 3.2. Verifying a Signature . . . . . . . . .26 5.1.2. Initial Contents. . . . . . . . . 27 3.2.1. Enforcing Application Requirements . . . . . . . . .27 5.2. HTTP29 3.3. SignatureMetadata Parameters Registry .Algorithm Methods . . . . . .28 5.2.1. Registration Template. . . . . . . . . 29 3.3.1. RSASSA-PSS using SHA-512 . . . . . . .28 5.2.2. Initial Contents. . . . . . . 30 3.3.2. RSASSA-PKCS1-v1_5 using SHA-256 . . . . . . . . . . .29 5.3. HTTP Signature Specialty Content Identifiers Registry31 3.3.3. HMAC using SHA-256 . .29 5.3.1. Registration Template. . . . . . . . . . . . . . . 31 3.3.4. ECDSA using curve P-256 DSS and SHA-256 .29 5.3.2. Initial Contents. . . . . . 31 3.3.5. JSON Web Signature (JWS) algorithms . . . . . . . . . 32 4. Including a Message Signature in a Message . . .29 6. Security Considerations. . . . . . 32 4.1. The 'Signature-Input' HTTP Field . . . . . . . . . . . . 33 4.2. The 'Signature' HTTP Field .30 7. References. . . . . . . . . . . . . . 33 4.3. Multiple Signatures . . . . . . . . . . .30 7.1. Normative References. . . . . . . . 34 5. Requesting Signatures . . . . . . . . . .30 7.2. Informative References. . . . . . . . . . 36 5.1. The Accept-Signature Field . . . . . . .31 Appendix A. Detecting HTTP Message Signatures. . . . . . . . 37 5.2. Processing an Accept-Signature .32 Appendix B. Examples. . . . . . . . . . . . 37 6. IANA Considerations . . . . . . . . . .32 B.1. Example Keys. . . . . . . . . . . 38 6.1. HTTP Signature Algorithms Registry . . . . . . . . . . .32 B.1.1. Example Key RSA test38 6.1.1. Registration Template . . . . . . . . . . . . . . . .33 B.1.2. Example RSA PSS Key39 6.1.2. Initial Contents . . . . . . . . . . . . . . . . .33 B.1.3. Example ECC P-256 Test Key. 39 6.2. HTTP Signature Metadata Parameters Registry . . . . . . . 41 6.2.1. Registration Template . . . . .34 B.1.4. Example Shared Secret. . . . . . . . . . . 41 6.2.2. Initial Contents . . . . .35 B.2. Test Cases. . . . . . . . . . . . . 41 6.3. HTTP Signature Specialty Component Identifiers Registry . . . . . . . . . .35 B.2.1. Minimal Signature Header using rsa-pss-sha512. . . .36 B.2.2. Header Coverage using rsa-pss-sha512. . . . . . . .36 B.2.3. Full Coverage using rsa-pss-sha512. . 41 6.3.1. Registration Template . . . . . . .37 B.2.4. Signing a Response using ecdsa-p256-sha256. . . . .37 B.2.5. Signing a Request using hmac-sha256. . . . 42 6.3.2. Initial Contents . . . . .38 Acknowledgements. . . . . . . . . . . . . 42 7. Security Considerations . . . . . . . . . . .38 Document History. . . . . . . . 43 8. References . . . . . . . . . . . . . . . .39 Authors' Addresses. . . . . . . . . 44 8.1. Normative References . . . . . . . . . . . . . .41 1. Introduction. . . . 44 8.2. Informative References . . . . . . . . . . . . . . . . . 45 Appendix A. Detecting HTTP Messageintegrity and authenticity are important security properties that are critical to the secure operation ofSignatures . . . . . . . . . 46 Appendix B. Examples . . . . . . . . . . . . . . . . . . . . . . 46 B.1. Example Keys . . . . . . . . . . . . . . . . . . . . . . 46 B.1.1. Example Key RSA test . . . . . . . . . . . . . . . . 46 B.1.2. Example RSA PSS Key . . . . . . . . . . . . . . . . . 47 B.1.3. Example ECC P-256 Test Key . . . . . . . . . . . . . 48 B.1.4. Example Shared Secret . . . . . . . . . . . . . . . . 49 B.2. Test Cases . . . . . . . . . . . . . . . . . . . . . . . 49 B.2.1. Minimal Signature Using rsa-pss-sha512 . . . . . . . 50 B.2.2. Selective Covered Components using rsa-pss-sha512 . . 50 B.2.3. Full Coverage using rsa-pss-sha512 . . . . . . . . . 51 B.2.4. Signing a Response using ecdsa-p256-sha256 . . . . . 52 B.2.5. Signing a Request using hmac-sha256 . . . . . . . . . 53 B.3. TLS-Terminating Proxies . . . . . . . . . . . . . . . . . 53 Acknowledgements . . . . . . . . . . . . . . . . . . . . . . . . 55 Document History . . . . . . . . . . . . . . . . . . . . . . . . 56 Authors' Addresses . . . . . . . . . . . . . . . . . . . . . . . 59 1. Introduction Message integrity and authenticity are important security properties that are critical to the secure operation of many HTTP applications. Application developers typically rely on the transport layer to provide these properties, by operating their application over [TLS]. However, TLS only guarantees these properties over a single TLS connection, and the path between client and application may be composed of multiple independent TLS connections (for example, if the application is hosted behind a TLS-terminating gateway or if the client is behind a TLS Inspection appliance). In such cases, TLS cannot guarantee end-to-end message integrity or authenticity between the client and application. Additionally, some operating environments present obstacles that make it impractical to use TLS, or to use features necessary to provide message authenticity. Furthermore, some applications require the binding of an application- level key to the HTTP message, separate from any TLS certificates in use. Consequently, while TLS can meet message integrity and authenticity needs for many HTTP-based applications, it is not a universal solution. This document defines a mechanism for providing end-to-end integrity and authenticity for components of an HTTP message. The mechanism allows applications to create digital signatures or message authentication codes (MACs) over only the components of the message that are meaningful and appropriate for the application. Strict canonicalization rules ensure that the verifier can verify the signature even if the message has been transformed in any of the many ways permitted by HTTP. The signing mechanism described in this document consists of three parts: * A common nomenclature and canonicalization rule set for the different protocol elements and other components of HTTP messages. * Algorithms for generating and verifying signatures over HTTP message components using this nomenclature and rule set. * A mechanism for attaching a signature and related metadata to an HTTP message. This document also provides a mechanism for one party to signal to another party that a signature is desired in one or more subsequent messages. This optional negotiation mechanism can be used along with opportunistic or application-driven message signatures by either party. 1.1. Requirements Discussion HTTP permits and sometimes requires intermediaries to transform messages in a variety of ways. This may result in a recipient receiving a message that is not bitwise equivalent to the message that was originally sent. In such a case, the recipient will be unable to verify a signature over the raw bytes of the sender's HTTP message, as verifying digital signatures or MACs requires both signer and verifier to have the exact same signature input. Since the exact raw bytes of the message cannot be relied upon as a reliable source of signature input, the signer and verifier must derive the signature input from their respective versions of the message, via a mechanism that is resilient to safe changes that do not alter the meaning of the message. For a variety of reasons, it is impractical to strictly define what constitutes a safe change versus an unsafe one. Applications use HTTP in a wide variety of ways, and may disagree on whether a particular piece of information in a message (e.g., the body, or the "Date" header field) is relevant. Thus a general purpose solution must provide signers with some degree of control over which message components are signed. HTTP applications may be running in environments that do not provide complete access to or control over HTTP messages (such as a web browser's JavaScript environment), or may be using libraries that abstract away the details of the protocol (such as the Java HTTPClient library (https://openjdk.java.net/groups/net/httpclient/ intro.html)). These applications need to be able to generate and verify signatures despite incomplete knowledge of the HTTP message. 1.2. HTTP Message Transformations As mentioned earlier, HTTP explicitly permits and in some cases requires implementations to transform messages in a variety of ways. Implementations are required to tolerate many of these transformations. What follows is a non-normative and non-exhaustive list of transformations that may occur under HTTP, provided as context: * Re-ordering of header fields with different header field names ([MESSAGING], Section 3.2.2). * Combination of header fields with the same field name ([MESSAGING], Section 3.2.2). * Removal of header fields listed in the "Connection" header field ([MESSAGING], Section 6.1). * Addition of header fields that indicate control options ([MESSAGING], Section 6.1). * Addition or removal of a transfer coding ([MESSAGING], Section 5.7.2). * Addition of header fields such as "Via" ([MESSAGING], Section 5.7.1) and "Forwarded" ([RFC7239], Section 4). 1.3. Safe Transformations Based on the definition of HTTP and the requirements described above, we can identify certain types of transformations that should not prevent signature verification, even when performed on message components covered by the signature. The following list describes those transformations: * Combination of header fields with the same field name. * Reordering of header fields with different names. * Conversion between different versions of the HTTP protocol (e.g., HTTP/1.x to HTTP/2, or vice-versa). * Changes in casing (e.g., "Origin" to "origin") of any case- insensitive components such as header field names, request URI scheme, or host. * Addition or removal of leading or trailing whitespace to a header field value. * Addition or removal of "obs-folds". * Changes to the "request-target" and "Host" header field that when applied together do not result in a change to the message's effective request URI, as defined in Section 5.5 of [MESSAGING]. Additionally, all changes to components not covered by the signature are considered safe. 1.4. Conventions and 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. The terms "HTTP message", "HTTP request", "HTTP response", "absolute- form", "absolute-path", "effective request URI", "gateway", "header field", "intermediary", "request-target", "sender", and "recipient" are used as defined in [MESSAGING]. The term "method" is to be interpreted as defined in Section 4 of [SEMANTICS]. For brevity, the term "signature" on its own is used in this document to refer to both digital signatures and keyed MACs. Similarly, the verb "sign" refers to the generation of either a digital signature or keyed MAC over a given input string. The qualified term "digital signature" refers specifically to the output of an asymmetric cryptographic signing operation. In addition to those listed above, this document uses the following terms: HTTP Message Signature: A digital signature or keyed MAC that covers one or more portions of an HTTP message. Note that a given HTTP Message can contain multiple HTTP Message Signatures. Signer: The entity that is generating or has generated an HTTP Message Signature. Note that multiple entities can act as signers and apply separate HTTP Message Signatures to a given HTTP Message. Verifier: An entity that is verifying or has verified an HTTP Message Signature against an HTTP Message. Note that an HTTP Message Signature may be verified multiple times, potentially by different entities. HTTP Message Component: A portion of an HTTP message that is capable of being covered by an HTTP Message Signature. HTTP Message Component Identifier: A value that uniquely identifies a specific HTTP Message Component in respect to a particular HTTP Message Signature and the HTTP Message it applies to. HTTP Message Component Value: The value associated with a given component identifier within the context of a particular HTTP Message. Component values are derived from the HTTP Message and are usually subject to a canonicalization process. Covered Components: An ordered set of HTTP message component identifiers for fields (Section 2.1) and specialty components (Section 2.3) that indicates the set of message components covered by the signature, not including the "@signature-params" specialty identifier itself. The order of this set is preserved and communicated between the signer and verifier to facilitate reconstruction of the signature input. Signature Input: The sequence of bytes processed by the HTTP Message Signature algorithm to produce the HTTP Message Signature. The signature input is generated by the signer and verifier using the covered components set and the HTTP Message. HTTP Message Signature Algorithm: A cryptographic algorithm that describes the signing and verification process for the signature. When expressed explicitly, the value maps to a string defined in the HTTP Signature Algorithms Registry defined in this document. Key Material: The key material required to create or verify the signature. The key material is often identified with an explicit key identifier, allowing the signer to indicate to the verifier which key was used. Creation Time: A timestamp representing the point in time that the signature was generated, as asserted by the signer. Expiration Time: A timestamp representing the point in time at which the signature expires, as asserted by the signer. A signature's expiration time could be undefined, indicating that the signature does not expire from the perspective of the signer. The term "Unix time" is defined by [POSIX.1], Section 4.16 (http://pubs.opengroup.org/onlinepubs/9699919799/basedefs/ V1_chap04.html#tag_04_16). This document contains non-normative examples of partial and complete HTTP messages. Some examples use a single trailing backslash '' to indicate line wrapping for long values, as per [RFC8792]. The "\" character and leading spaces on wrapped lines are not part of the value. 1.5. Application of HTTP Message Signatures HTTP Message Signatures are designed to be a general-purpose security mechanism applicable in a wide variety of circumstances and applications. In order to properly and safely apply HTTP Message Signatures, an application or profile of this specification MUST specify all of the following items: * The set of component identifiers (Section 2) that are expected and required. For example, an authorization protocol could mandate that the "Authorization" header be covered to protect the authorization credentials and mandate the signature parameters contain a "created" parameter, while an API expecting HTTP message bodies could require the "Digest" header to be present and covered. * A means of retrieving the key material used to verify the signature. An application will usually use the "keyid" parameter of the signature parameters (Section 2.3.1) and define rules for resolving a key from there, though the appropriate key could be known from other means. * A means of determining the signature algorithm used to verify the signature is appropriate for the key material. For example, the process could use the "alg" parameter of the signature parameters (Section 2.3.1) to state the algorithm explicitly, derive the algorithm from the key material, or use some pre-configured algorithm agreed upon by the signer and verifier. * A means of determining that a given key and algorithm presented in the request are appropriate for the request being made. For example, a server expecting only ECDSA signatures should know to reject any RSA signatures, or a server expecting asymmetric cryptography should know to reject any symmetric cryptography. An application using signatures also has to ensure that the verifier will have access to all required information to re-create the signature input string. For example, a server behind a reverse proxy would need to know the original request URI to make use of identifiers like "@target-uri". Additionally, an application using signatures in responses would need to ensure that clients receiving signed responses have access to all the signed portions, including any portions of the request that were signed by the server. The details of this kind of profiling are the purview of the application and outside the scope of this specification. 2. HTTP Message Components In order to allow signers and verifiers to establish which components are covered by a signature, this document defines component identifiers for components covered by an HTTP Message Signature, a set of rules for deriving and canonicalizing the values associated with these component identifiers from the HTTP Message, and the means for combining these canonicalized values into a signature input string. The values for these items MUST be accessible to both the signer and the verifier of the message, which means these are usually derived from aspects of the HTTP message or signature itself. Some HTTP message components can undergo transformations that change the bitwise value without altering meaning of the component's value (for example, the merging together of header fields with the same name). Message component values must therefore be canonicalized before it is signed, to ensure that a signature can be verified despite such intermediary transformations. This document defines rules for each component identifier that transform the identifier's associated component value into such a canonical form. Component identifiers are serialized using the production grammar defined by RFC8941, Section 4 [RFC8941]. The component identifier itself is an "sf-string" value and MAY define parameters which are included using the "parameters" rule. component-identifier = sf-string parameters Note that this means the value of the component identifier itself is encased in double quotes, with parameters following as a semicolon- separated list, such as ""cache-control"", ""date"", or ""@signature- params"". The following sections define component identifier types, their parameters, their associated values, and the canonicalization rules for their values. The method for combining component identifiers into the signature input is defined in Section 2.4. 2.1. HTTP Fields The component identifier for an HTTP field is the lowercased form of its field name. While HTTP field names are case-insensitive, implementations MUST use lowercased field names (e.g., "content- type", "date", "etag") when using them as component identifiers. Unless overridden by additional parameters and rules, the HTTP field value MUST be canonicalized with the following steps: 1. Create an ordered list of the field values of each instance of the field in the message, in the order that they occur (or will occur) in the message. 2. Strip leading and trailing whitespace from each item in the list. 3. Concatenate the list items together, with a comma "," and space " " between each item. The resulting string is the canonicalized component value. 2.1.1. Canonicalized Structured HTTPapplications. Application developers typically rely onFields If value of thetransport layer to provide these properties, by operating their application over [TLS]. However, TLS only guarantees these properties overthe HTTP field in question is a structured field ([RFC8941]), the component identifier MAY include the "sf" parameter. If this parameter is included, the HTTP field value MUST be canonicalized using the rules specified in Section 4 of RFC8941 [RFC8941]. For example, this process will replace any optional internal whitespace with a singleTLS connection, andspace character. The resulting string is used as thepath between clientcomponent value in Section 2.1. 2.1.2. Canonicalization Examples This section contains non-normative examples of canonicalized values for header fields, given the following example HTTP message: Host: www.example.com Date: Tue, 07 Jun 2014 20:51:35 GMT X-OWS-Header: Leading andapplication may be composedtrailing whitespace. X-Obs-Fold-Header: Obsolete line folding. X-Empty-Header: Cache-Control: max-age=60 Cache-Control: must-revalidate X-Dictionary: a=1, b=2;x=1;y=2, c=(a b c) The following table shows example canonicalized values for header fields, given that message: +=====================+==================================+ | Header Field | Canonicalized Value | +=====================+==================================+ | "cache-control" | max-age=60, must-revalidate | +---------------------+----------------------------------+ | "date" | Tue, 07 Jun 2014 20:51:35 GMT | +---------------------+----------------------------------+ | "host" | www.example.com | +---------------------+----------------------------------+ | "x-empty-header" | | +---------------------+----------------------------------+ | "x-obs-fold-header" | Obsolete line folding. | +---------------------+----------------------------------+ | "x-ows-header" | Leading and trailing whitespace. | +---------------------+----------------------------------+ | "x-dictionary" | a=1, b=2;x=1;y=2, c=(a b c) | +---------------------+----------------------------------+ | "x-dictionary";sf | a=1, b=2;x=1;y=2, c=(a b c) | +---------------------+----------------------------------+ Table 1: Non-normative examples ofmultiple independent TLS connections (for example, ifheader field canonicalization. 2.2. Dictionary Structured Field Members An individual member in theapplication is hosted behindvalue of aTLS-terminating gateway or ifDictionary Structured Field is identified by using theclientparameter "key" on the component identifier for the field. The value of this parameter isbehindaTLS Inspection appliance). In such cases, TLS cannot guarantee end-to-end message integrity or authenticity betweentheclient and application. Additionally, some operating environmentskey being identified, without any parameters presentobstacleson thatmake it impractical to use TLS, or to use features necessary to provide message authenticity. Furthermore, some applications require the binding of an application- levelkeytoin theHTTP message, separate from any TLS certificatesoriginal dictionary. An individual member inuse. Consequently, while TLS can meet message integrity and authenticity needs for many HTTP-based applications, itthe value of a Dictionary Structured Field isnotcanonicalized by applying the serialization algorithm described in Section 4.1.2 of RFC8941 [RFC8941] on auniversal solution.Dictionary containing only that item. 2.2.1. Canonicalization Examples Thisdocument defines a mechanismsection contains non-normative examples of canonicalized values forproviding end-to-end integrity and authenticityDictionary Structured Field Members given the following example header field, whose value is known to be a Dictionary: X-Dictionary: a=1, b=2;x=1;y=2, c=(a b c) The following table shows example canonicalized values forcontent withindifferent component identifiers, given that field: +======================+=================+ | Component Identifier | Component Value | +======================+=================+ | "x-dictionary";key=a | 1 | +----------------------+-----------------+ | "x-dictionary";key=b | 2;x=1;y=2 | +----------------------+-----------------+ | "x-dictionary";key=c | (a, b, c) | +----------------------+-----------------+ Table 2: Non-normative examples of Dictionary member canonicalization. 2.3. Specialty Components Message components not found in an HTTPmessage. The mechanism allows applications to create digital signatures or message authentication codes (MACs) over only that content withinfield can be included in themessage that is meaningfulsignature input by defining a component identifier andappropriate fortheapplication. Strictcanonicalizationrules ensure thatmethod for its component value. To differentiate specialty component identifiers from HTTP fields, specialty component identifiers MUST start with theverifier can verify"at" "@" character. This specification defines the following specialty component identifiers: @signature-params The signatureeven if the message has been transformed in anymetadata parameters for this signature. (Section 2.3.1) @method The method used for a request. (Section 2.3.2) @target-uri The full target URI for a request. (Section 2.3.3) @authority The authority of themany ways permitted by HTTP.target URI for a request. (Section 2.3.4) @scheme Themechanism described in this document consistsscheme ofthree parts: * A common nomenclature and canonicalization rule set forthedifferent protocol elements and other content within HTTP messages. * Algorithmstarget URI forgenerating and verifying signatures over HTTP message content using this nomenclature and rule set. * A mechanisma request. (Section 2.3.5) @request-target The request target. (Section 2.3.6) @path The absolute path portion of the target URI forattachingasignature and related metadata to an HTTP message. 1.1. Requirements Discussion HTTP permits and sometimes requires intermediaries to transform messages inrequest. (Section 2.3.7) @query The query portion of the target URI for avarietyrequest. (Section 2.3.8) @query-params The parsed query parameters ofways. This may result inthe target URI for arecipient receivingrequest. (Section 2.3.9) @status The status code for a response. (Section 2.3.10). @request-response A signature from a request message thatis not bitwise equivalent to the message that was originally sent. In such a case, the recipient willresulted in this response message. (Section 2.3.11) Additional specialty component identifiers MAY beunable to verify a signature over the raw bytes ofdefined and registered in thesender'sHTTPmessage, as verifying digital signatures or MACs requires both signer and verifier toSignatures Specialty Component Identifier Registry. (Section 6.3) 2.3.1. Signature Parameters HTTP Message Signatures have metadata properties that provide information regarding theexact same signed content. Since the raw bytes of the message cannot be relied uponsignature's generation and verification, such assigned content,thesignerset of covered components, a timestamp, identifiers for verification key material, andverifier must deriveother utilities. The signature parameters component identifier is "@signature-params". The signature parameters component value is thesigned content from their respective versionsserialization of themessage, via a mechanism that is resilient to safe changes that do not altersignature parameters for this signature, including themeaningcovered components set with all associated parameters. These parameters include any of themessage. For a varietyfollowing: * "created": Creation time as an "sf-integer" UNIX timestamp value. Sub-second precision is not supported. Inclusion ofreasons, itthis parameter isimpractical to strictly define what constitutes a safe change versusRECOMMENDED. * "expires": Expiration time as anunsafe one. Applications use HTTP in a wide variety of ways, and may disagree on whether a particular piece of information in a message (e.g., the body, or the "Date" header field)"sf-integer" UNIX timestamp value. Sub-second precision isrelevant. Thus a general purpose solution must provide signers with some degree of control over whichnot supported. * "nonce": A random unique value generated for this signature. * "alg": The HTTP messagecontent is signed.signature algorithm from the HTTPapplications mayMessage Signature Algorithm Registry, as an "sf-string" value. * "keyid": The identifier for the key material as an "sf-string" value. Additional parameters can berunningdefined inenvironments that do not provide complete access to or control overthe HTTPmessages (suchSignature Parameters Registry (Section 6.2.2). The signature parameters component value is serialized as aweb browser's JavaScript environment), or may beparameterized inner list usinglibraries that abstract awaythedetailsrules in Section 4 ofthe protocol (suchRFC8941 [RFC8941] as follows: 1. Let theJava HTTPClient library (https://openjdk.java.net/groups/net/httpclient/ intro.html)). These applications need tooutput beable to generate and verify signatures despite incomplete knowledge ofan empty string. 2. Determine an order for theHTTP message. 1.2. HTTP Message Transformations As mentioned earlier, HTTP explicitly permits and in some cases requires implementations to transform messages in a variety of ways. Implementations are required to tolerate manycomponent identifiers ofthese transformations. What followsthe covered components. Once this order isa non-normative and non-exhaustive list of transformations that may occur under HTTP, provided as context: * Re-ordering of header fields with different header field names ([MESSAGING], Section 3.2.2). * Combination of header fields withchosen, it cannot be changed. This order MUST be the samefield name ([MESSAGING], Section 3.2.2). * Removal of header fields listedorder as used in creating the"Connection" header field ([MESSAGING], Section 6.1). * Addition of header fields that indicate control options ([MESSAGING], Section 6.1). * Addition or removal of a transfer coding ([MESSAGING], Section 5.7.2). * Additionsignature input (Section 2.4). 3. Serialize the component identifiers ofheader fields suchthe covered components, including all parameters, as"Via" ([MESSAGING], Section 5.7.1) and "Forwarded" ([RFC7239],an ordered "inner-list" according to Section4). 1.3. Safe Transformations Based on the definition4.1.1.1 ofHTTPRFC8941 [RFC8941] and append this to therequirements described above, we can identify certain typesoutput. 4. Determine an order for any signature parameters. Once this order is chosen, it cannot be changed. 5. Append the parameters to the "inner-list" in the chosen order according to Section 4.1.1.2 oftransformationsRFC8941 [RFC8941], skipping parameters thatshouldare notprevent signature verification, even when performed on content covered by theavailable or not used for this message signature. 6. Thefollowing list describes those transformations: * Combination of header fields withoutput contains thesame field name. * Reordering of header fields with different names. * Conversion between different versionssignature parameters component value. Note that the "inner-list" serialization is used for the covered component value instead of theHTTP protocol (e.g., HTTP/1.x to HTTP/2, or vice-versa). * Changes"sf-list" serialization incasing (e.g., "Origin"order to"origin") of any case- insensitive contentfacilitate this value's inclusion in message fields such asheader field names, request URI scheme, or host. * Addition or removal of leading or trailing whitespace tothe "Signature-Input" field's dictionary, as discussed in Section 4.1. This example shows aheader field value. * Addition or removal of "obs-folds". * Changes tocanonicalized value for the"request-target" and "Host" header fieldparameters of a given signature: NOTE: '\' line wrapping per RFC 8792 ("@target-uri" "@authority" "date" "cache-control" "x-empty-header" \ "x-example");keyid="test-key-rsa-pss";alg="rsa-pss-sha512";\ created=1618884475;expires=1618884775 Note thatwhen applied together do not resultan HTTP message could contain multiple signatures, but only the signature parameters used for the current signature are included ina changethe entry. 2.3.2. Method The "@method" component identifier refers to themessage's effectiveHTTP method of a requestURI, as defined in Section 5.5message. The component value of[MESSAGING]. Additionally, all changes to content not coveredis canonicalized by taking thesignature are considered safe. 1.4. Conventions and 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 interpretedvalue of the method asdescribed in BCP 14 [RFC2119] [RFC8174] when,a string. Note that the method name is case-sensitive as per [SEMANTICS] Section 9.1, and conventionally standardized method names are uppercase US-ASCII. If used, the "@method" component identifier MUST occur onlywhen, they appearonce inall capitals, as shown here. The terms "HTTP message", "HTTP request", "HTTP response", "absolute- form", "absolute-path", "effectivethe covered components. For example, the following requestURI", "gateway", "header field", "intermediary", "request-target", "sender", and "recipient" aremessage: POST /path?param=value HTTP/1.1 Host: www.example.com Would result in the following "@method" value: "@method": POST If usedas definedin[MESSAGING].a response message, the "@method" component identifier refers to the associated component value of the request that triggered the response message being signed. 2.3.3. Target URI Theterm "method" is"@target-uri" component identifier refers tobe interpretedthe target URI of a request message. The component value is the full absolute target URI of the request, potentially assembled from all available parts including the authority and request target asdefineddescribed in [SEMANTICS] Section4 of [SEMANTICS].7.1. If used, the "@target-uri" component identifier MUST occur only once in the covered components. Forbrevity,example, theterm "signature" on its own isfollowing message sent over HTTPS: POST /path?param=value HTTP/1.1 Host: www.example.com Would result in the following "@target-uri" value: "@target-uri": https://www.example.com/path?param=value If used inthis document to refer to both digital signatures and keyed MACs. Similarly,a response message, theverb "sign""@target-uri" component identifier refers to thegenerationassociated component value ofeither a digital signature or keyed MAC over a given input string.the request that triggered the response message being signed. 2.3.4. Authority Thequalified term "digital signature""@authority" component identifier refersspecificallyto theoutputauthority component of the target URI ofan asymmetric cryptographic signing operation. In addition to those listed above, this document usesthefollowing terms: Signer: The entity that is generating or has generated an HTTP Message Signature. Verifier: An entity that is verifying or has verified an HTTP Message Signature against anHTTPMessage. Note that anrequest message, as defined in [SEMANTICS] Section 7.2. In HTTPMessage Signature may be verified multiple times, potentially by different entities. Covered Content: An ordered list of content identifiers for headers (Section 2.1) and specialty content (Section 2.3) that indicates1.1, this is usually conveyed using themetadata"Host" header, while in HTTP 2 andmessage content thatHTTP 3 it iscovered byconveyed using thesignature, not including":authority" pseudo-header. The value is the"@signature-params" specialty field itself. HTTP Signature Algorithm: A cryptographic algorithm that describesfully- qualified authority component of thesigning and verification process forrequest, comprised of thesignature. When expressed explicitly,host and, optionally, port of the request target, as a string. The component valuemapsMUST be normalized according toa string defined intheHTTP Signature Algorithms Registry definedrules inthis document. Key Material: The key material required to create or verify[SEMANTICS] Section 4.2.3. Namely, thesignature. The key materialhost name isoften identified with an explicit key identifier, allowing the signer to indicatenormalized to lowercase and theverifier which key was used. Creation Time: A timestamp representingdefault port is omitted. If used, thepoint"@authority" component identifier MUST occur only once intime thatthesignature was generated, as asserted bycovered components. For example, thesigner. Expiration Time: A timestamp representingfollowing request message: POST /path?param=value HTTP/1.1 Host: www.example.com Would result in thepointfollowing "@authority" component value: "@authority": www.example.com If used intime at whicha response message, thesignature expires, as asserted by"@authority" component identifier refers to thesigner. A signature's expiration time could be undefined, indicatingassociated component value of the request that triggered thesignature does not expire fromresponse message being signed. 2.3.5. Scheme The "@scheme" component identifier refers to theperspectivescheme of thesigner. The term "Unix time" is defined by [POSIX.1], Section 4.16 (http://pubs.opengroup.org/onlinepubs/9699919799/basedefs/ V1_chap04.html#tag_04_16). This document contains non-normative examplestarget URL ofpartial and completethe HTTPmessages. Some examples use a single trailing backslash '' to indicate line wrapping for long values, as per [RFC8792].request message. The"\" character and leading spaces on wrapped lines are not part ofcomponent value is thevalue. 1.5. Application of HTTP Message Signatures HTTP Message Signatures are designed to bescheme as ageneral-purpose security mechanism applicablestring as defined ina wide variety of circumstances and applications. In order[SEMANTICS] Section 4.2. While the scheme itself is case-insensitive, it MUST be normalized toproperly and safely apply HTTP Message Signatures, an application or profile of this specificationlowercase for inclusion in the signature input string. If used, the "@scheme" component identifier MUSTspecify all ofoccur only once in thefollowing items: * The set of content identifiers (Section 2) that are expected and required.covered components. For example,an authorization protocol could mandate that the "Authorization" header be covered to protecttheauthorization credentials and mandate the signature parameters contain a "created" parameter, while an API expecting HTTPfollowing request messagebodies could requirerequested over plain HTTP: POST /path?param=value HTTP/1.1 Host: www.example.com Would result in the following "@scheme" value: "@scheme": http If used in a response message, the"Digest" header"@scheme" component identifier refers tobe present and covered. * A meansthe associated component value ofretrievingthekey material usedrequest that triggered the response message being signed. 2.3.6. Request Target The "@request-target" component identifier refers toverifythesignature. An application will usually usefull request target of the"keyid" parameterHTTP request message, as defined in [SEMANTICS] Section 7.1. The component value of thesignature parameters (Section 2.3.2) and define rules for resolving a key from there, thoughrequest target can take different forms, depending on theappropriate key could be known from other means. * A meanstype ofdeterminingrequest, as described below. If used, thesignature algorithm used"@request-target" component identifier MUST occur only once in the covered components. For HTTP 1.1, the component value is equivalent toverifythesignature contentrequest target portion of the request line. However, this value isappropriate formore difficult to reliably construct in other versions of HTTP. Therefore, it is NOT RECOMMENDED that this identifier be used when versions of HTTP other than 1.1 might be in use. The origin form value is combination of thekey material.absolute path and query components of the request URL. For example, theprocess could usefollowing request message: POST /path?param=value HTTP/1.1 Host: www.example.com Would result in the"alg" parameterfollowing "@request-target" component value: "@request-target": /path?param=value The following request to an HTTP proxy with the absolute-form value, containing the fully qualified target URI: GET https://www.example.com/path?param=value HTTP/1.1 Would result in the following "@request-target" component value: "@request-target": https://www.example.com/path?param=value The following CONNECT request with an authority-form value, containing the host and port of thesignature parameters (Section 2.3.2) to statetarget: CONNECT www.example.com:80 HTTP/1.1 Host: www.example.com Would result in thealgorithm explicitly, derivefollowing "@request-target" component value: "@request-target": www.example.com:80 The following OPTIONS request message with the asterisk-form value, containing a single asterisk "*" character: OPTIONS * HTTP/1.1 Host: www.example.com Would result in thealgorithm fromfollowing "@request-target" component value: "@request-target": * If used in a response message, thekey material, or use some pre-configured algorithm agreed upon by"@request-target" component identifier refers to thesigner and verifier. * A meansassociated component value ofdetermining that a given key and algorithm presented inthe requestare appropriate forthat triggered therequestresponse message beingmade. For example, a server expecting only ECDSA signatures should know to reject any RSA signatures, or a server expecting asymmetric cryptography should know to reject any symmetric cryptography.signed. 2.3.7. Path Thedetails of this kind of profiling are"@path" component identifier refers to thepurviewtarget path of theapplication and outsideHTTP request message. The component value is thescopeabsolute path ofthis specification. 2. HTTP Message Signature Covered Content In order to allow signersthe request target defined by [RFC3986], with no query component andverifiersno trailing "?" character. The value is normalized according toestablish which contentthe rules in [SEMANTICS] Section 4.2.3. Namely, an empty path string iscovered bynormalized as asignature, this document defines content identifiers for data items coveredsingle slash "/" character, and path components are represented byan HTTP Message Signature as well as the means for combining these canonicalizedtheir valuesinto a signature input string. Some content within HTTP messages can undergo transformations that changeafter decoding any percent-encoded octets. If used, thebitwise value without altering meaning of"@path" component identifier MUST occur only once in thecontent (forcovered components. For example, themerging together of header fields with the same name). Message content must therefore be canonicalized before it is signed, to ensure that a signature can be verified despite such intermediary transformations. This document defines rules for each contentfollowing request message: POST /path?param=value HTTP/1.1 Host: www.example.com Would result in the following "@path" value: "@path": /path If used in a response message, the "@path" identifierthat transformrefers to theidentifier'sassociatedcontent into such a canonical form. Content identifiers are defined using production grammar defined by RFC8941, Section 4 [RFC8941].component value of the request that triggered the response message being signed. 2.3.8. Query Thecontent"@query" component identifieris an "sf- string" value.refers to the query component of the HTTP request message. Thecontent identifier type MAY define parameters which are included usingcomponent value is the"parameters" rule. content-identifier = sf-string parameters Note that this meansentire normalized query string defined by [RFC3986], including the leading "?" character. The valueofis normalized according to the rules in [SEMANTICS] Section 4.2.3. Namely, percent-encoded octets are decoded. If used, the "@query" component identifieritself is encasedMUST occur only once indouble quotes, with parametersthe covered components. For example, the followingas a semicolon-separated list, such as ""cache-control"", ""date"", or ""@signature-params"".request message: POST /path?param=value&foo=bar&baz=batman HTTP/1.1 Host: www.example.com Would result in the following "@query" value: "@query": ?param=value&foo=bar&baz=batman The followingsections define contentrequest message: POST /path?queryString HTTP/1.1 Host: www.example.com Would result in the following "@query" value: "@query": ?queryString If used in a response message, the "@query" component identifiertypes, their parameters, theirrefers to the associatedcontent, and their canonicalization rules. The method for combining content identifiers intocomponent value of thesignature inputrequest that triggered the response message being signed. 2.3.9. Query Parameters If a request target URI uses HTML form parameters in the query stringisas defined in [HTMLURL] Section2.4. 2.1. HTTP Headers5, the "@query-params" component identifier allows addressing of individual query parameters. Thecontentquery parameters MUST be parsed according to [HTMLURL] Section 5.1, resulting in a list of ("nameString", "valueString") tuples. The REQUIRED "name" parameter of each input identifierfor an HTTP headercontains the "nameString" of a single query parameter. Several different named query parameters MAY be included in the covered components. Single named parameters MAY occur in any order in the covered components. The component value of a single named parameter is thelowercased formthe "valueString" ofits header field name. While HTTP header field names are case- insensitive, implementations MUST use lowercased field names (e.g., "content-type", "date", "etag") when using them as content identifiers. Unless overriddenthe named query parameter defined byadditional parameters and rules,[HTMLURL] Section 5.1, which is theHTTP header fieldvalueMUST be canonicalizedafter percent-encoded octets are decoded. Note that this value does not include any leading "?" characters, equals sign "=", or separating "&" characters. Named query parameters withthe following steps: 1. Createanordered list ofempty "valueString" are included with an empty string as thefieldcomponent value. If a parameter name occurs multiple times in a request, all parameter values ofeach instance of the header fieldthat name MUST be included inthe message,separate signature input lines in the orderthat theyin which the parameters occur(or will occur)in themessage. 2. Strip leadingtarget URI. For example for the following request: POST /path?param=value&foo=bar&baz=batman&qux= HTTP/1.1 Host: www.example.com Indicating the "baz", "qux" andtrailing whitespace from each item"param" named query parameters in would result in thelist. 3. Concatenatefollowing "@query-param" value: "@query-params";name="baz": batman "@query-params";name="qux": "@query-params";name="param": value If used in a response message, thelist items together, with"@query-params" component identifier refers to the associated component value of the request that triggered the response message being signed. 2.3.10. Status Code The "@status" component identifier refers to the three-digit numeric HTTP status code of acomma "," and space " " between each item.response message as defined in [SEMANTICS] Section 15. Theresulting stringcomponent value is thecanonicalized value. 2.1.1. Canonicalized Structuredserialized three-digit integer of the HTTPHeadersresponse code, with no descriptive text. Ifvalue ofused, the "@status" component identifier MUST occur only once in the covered components. For example, theHTTP headerfollowing response message: HTTP/1.1 200 OK Date: Fri, 26 Mar 2010 00:05:00 GMT Would result in the following "@status" value: "@status": 200 The "@status" component identifier MUST NOT be used in a request message. 2.3.11. Request-Response Signature Binding When a signed request message results inquestion isastructured field ([RFC8941]),signed response message, thecontent"@request-response" component identifierMAY includecan be used to cryptographically link the"sf" parameter. If this parameter is included,request and theHTTP header value MUST be canonicalized usingresponse to each other by including therules specifiedidentified request signature value inSection 4the response's signature input without copying the value ofRFC8941 [RFC8941]. Note that this process will replace any optional whitespace withthe request's signature to the response directly. This component identifier has a singlespace.REQUIRED parameter: "key" Identifies which signature from the response to sign. Theresulting stringcomponent value isused asthefield"sf-binary" representation of the signature valueinput in Section 2.1. 2.1.2. Canonicalization Examples This section contains non-normative examplesofcanonicalized values for header fields, giventhefollowing example HTTP message: Server: www.example.comreferenced request identified by the "key" parameter. For example, when serving this signed request: NOTE: '\' line wrapping per RFC 8792 POST /foo?param=value&pet=dog HTTP/1.1 Host: example.com Date: Tue,07 Jun 2014 20:51:3520 Apr 2021 02:07:55 GMTX-OWS-Header: Leading and trailing whitespace. X-Obs-Fold-Header: Obsolete line folding. X-Empty-Header: Cache-Control: max-age=60 Cache-Control: must-revalidate TheContent-Type: application/json Content-Length: 18 Signature-Input: sig1=("@authority" "content-type")\ ;created=1618884475;keyid="test-key-rsa-pss" Signature: sig1=:KuhJjsOKCiISnKHh2rln5ZNIrkRvue0DSu5rif3g7ckTbbX7C4\ Jp3bcGmi8zZsFRURSQTcjbHdJtN8ZXlRptLOPGHkUa/3Qov79gBeqvHNUO4bhI27p\ 4WzD1bJDG9+6ml3gkrs7rOvMtROObPuc78A95fa4+skS/t2T7OjkfsHAm/enxf1fA\ wkk15xj0n6kmriwZfgUlOqyff0XLwuH4XFvZ+ZTyxYNoo2+EfFg4NVfqtSJch2WDY\ 7n/qmhZOzMfyHlggWYFnDpyP27VrzQCQg8rM1Crp6MrwGLa94v6qP8pq0sQVq2DLt\ 4NJSoRRqXTvqlWIRnexmcKXjQFVz6YSA==: {"hello": "world"} This would result in the followingtable shows example canonicalized values for header fields, given thatunsigned response message:+=====================+==================================+ | Header Field | Canonicalized Value | +=====================+==================================+ | "cache-control" | max-age=60, must-revalidate | +---------------------+----------------------------------+ | "date" |HTTP/1.1 200 OK Date: Tue,07 Jun 2014 20:51:3520 Apr 2021 02:07:56 GMT| +---------------------+----------------------------------+ | "server" | www.example.com | +---------------------+----------------------------------+ | "x-empty-header" | | +---------------------+----------------------------------+ | "x-obs-fold-header" | Obsolete line folding. | +---------------------+----------------------------------+ | "x-ows-header" | LeadingContent-Type: application/json Content-Length: 62 {"busy": true, "message": "Your call is very important to us"} The server signs the response with its own key andtrailing whitespace. | +---------------------+----------------------------------+ Table 1: Non-normative examples of header field canonicalization. 2.2. Dictionary Structured Field Members An individual member inincludes thevaluesignature ofa Dictionary Structured Field is identified by using"sig1" from theparameter "key" onrequest in thecontent identifier forcovered components of theheader.response. Thevalue ofsignature input string for thisparameterexample is: NOTE: '\' line wrapping per RFC 8792 "content-type": application/json "content-length": 62 "@status": 200 "@request-response";key="sig1": :KuhJjsOKCiISnKHh2rln5ZNIrkRvue0DSu\ 5rif3g7ckTbbX7C4Jp3bcGmi8zZsFRURSQTcjbHdJtN8ZXlRptLOPGHkUa/3Qov79\ gBeqvHNUO4bhI27p4WzD1bJDG9+6ml3gkrs7rOvMtROObPuc78A95fa4+skS/t2T7\ OjkfsHAm/enxf1fAwkk15xj0n6kmriwZfgUlOqyff0XLwuH4XFvZ+ZTyxYNoo2+Ef\ Fg4NVfqtSJch2WDY7n/qmhZOzMfyHlggWYFnDpyP27VrzQCQg8rM1Crp6MrwGLa94\ v6qP8pq0sQVq2DLt4NJSoRRqXTvqlWIRnexmcKXjQFVz6YSA==: "@signature-params": ("content-type" "content-length" "@status" \ "@request-response";key="sig1");created=1618884475\ ;keyid="test-key-ecc-p256" The signed response message is: NOTE: '\' line wrapping per RFC 8792 HTTP/1.1 200 OK Date: Tue, 20 Apr 2021 02:07:56 GMT Content-Type: application/json Content-Length: 62 Signature-Input: sig1=("content-type" "content-length" "@status" \ "@request-response";key="sig1");created=1618884475\ ;keyid="test-key-ecc-p256" Signature: sig1=:crVqK54rxvdx0j7qnt2RL1oQSf+o21S/6Uk2hyFpoIfOT0q+Hv\ msYAXUXzo0Wn8NFWh/OjWQOXHAQdVnTk87Pw==: {"busy": true, "message": "Your call isavery important to us"} Since thekey being identified, without any parameters present on that keyrequest's signature value itself is not repeated in theoriginal dictionary. An individual member inresponse, the requester MUST keep the original signature value around long enough to validate the signature ofa Dictionary Structured Field is canonicalized by applyingtheserialization algorithm describedresponse. The "@request-response" component identifier MUST NOT be used inSection 4.1.2 of RFC8941 [RFC8941] onaDictionary containing only that member. 2.2.1. Canonicalization Examples This section contains non-normative examples of canonicalized values for Dictionary Structured Field Members givenrequest message. 2.4. Creating thefollowing example header field, whose valueSignature Input String The signature input isassumed to beaDictionary: X-Dictionary: a=1, b=2;x=1;y=2, c=(a b c) The following table shows exampleUS-ASCII string containing the canonicalizedvalues for different content identifiers, given that field: +======================+=====================+ | Content Identifier | Canonicalized Value | +======================+=====================+ | "x-dictionary";key=a | 1 | +----------------------+---------------------+ | "x-dictionary";key=b | 2;x=1;y=2 | +----------------------+---------------------+ | "x-dictionary";key=c | (a, b, c) | +----------------------+---------------------+ Table 2: Non-normative examples of Dictionary member canonicalization. 2.3. Specialty Content Fields Content not foundHTTP message components covered by the signature. To create the signature input string, the signer or verifier concatenates together entries for each identifier inan HTTP header canthe signature's covered components (including their parameters) using the following algorithm: 1. Let the output beincludedan empty string. 2. For each message component item in thesignature base string by defining a content identifier andcovered components set (in order): 1. Append thecanonicalization methodcomponent identifier forits content. To differentiate specialty content identifiers from HTTP headers, specialty content identifiers MUST start withthe"at" "@" character. This specification definescovered component serialized according to thefollowing specialty content identifiers: @request-target The target request endpoint."component-identifier" rule. 2. Append a single colon "":"" 3. Append a single space "" "" 4. Append the covered component's canonicalized component value, as defined by the HTTP message component type. (Section2.3.1) @signature-params The2.1 and Section 2.3) 5. Append a single newline ""\\n"" 3. Append the signaturemetadataparametersfor this signature.component (Section2.3.2) Additional specialty content identifiers MAY be2.3.1) as follows: 1. Append the component identifier for the signature parameters serialized according to the "component-identifier" rule, i.e. ""@signature-params"" 2. Append a single colon "":"" 3. Append a single space "" "" 4. Append the signature parameters' canonicalized component value as definedand registeredin Section 2.3.1 4. Return theHTTP Signatures Specialty Content Identifier Registry. (Section 5.3) 2.3.1. Request Target The request target endpoint, consisting ofoutput string. If covered components reference a component identifier that cannot be resolved to a component value in therequest method andmessage, thepath and query ofimplementation MUST produce an error. Such situations are included but not limited to: * The signer or verifier does not understand theeffective request URI,component identifier. * The component identifier identifies a field that isidentified bynot present in the"@request-target" identifier. Itsmessage or whose value iscanonicalized as follows: 1. Take the lowercased HTTP method ofmalformed. * The component identifier is a Dictionary member identifier that references a field that is not present in themessage. 2. Appendmessage, is not aspace " ". 3. AppendDictionary Structured Field, or whose value is malformed. * The component identifier is a Dictionary member identifier that references a member that is not present in thepathfield value, or whose value is malformed. E.g., the identifier is ""x-dictionary";key="c"" andquery oftherequest targetvalue of themessage, formatted according to the rules defined for the :path pseudo-"x-dictionary" headerin [HTTP2], Section 8.1.2.3. The resulting stringfield is "a=1, b=2" In thecanonicalized value. 2.3.1.1. Canonicalization Examples Thefollowingtable containsnon-normativeexampleexample, the HTTPmessages and their canonicalized "@request-target" values. +=========================+=================+ |HTTP Message | @request-target | +=========================+=================+ | POST /?param=value HTTP/1.1| post | | Host: www.example.com | /?param=value | +-------------------------+-----------------+ | POST /a/b HTTP/1.1 | post /a/b | | Host: www.example.com | | +-------------------------+-----------------+ | GET http://www.example.com/a/ HTTP/1.1| get /a/ | +-------------------------+-----------------+ |message being signed is the following request: GEThttp://www.example.com HTTP/1.1| get / | +-------------------------+-----------------+ | CONNECT server.example.com:80 HTTP/1.1| connect / | | Host: server.example.com| | +-------------------------+-----------------+ | OPTIONS */foo HTTP/1.1| options * | |Host:server.example.com| | +-------------------------+-----------------+ Table 3: Non-normative examples of "@request-target" canonicalization. 2.3.2. Signature Parameters HTTP Message Signatures have metadata properties that provide information regarding the signature's generation and/or verification. The signature parameters specialty content is identified by the "@signature-params" identifier. Its canonicalized value is the serialization of the signature parameters for this signature, including the covered content listexample.org Date: Tue, 20 Apr 2021 02:07:55 GMT X-Example: Example header withall associated parameters. * "alg":some whitespace. X-Empty-Header: Cache-Control: max-age=60 Cache-Control: must-revalidate TheHTTP message signature algorithm fromcovered components consist of the "@method", "@path", and "@authority" specialty component identifiers followed by the "Cache- Control", "X-Empty-Header", "X-Example" HTTPMessage Signature Algorithm Registry, as an "sf-string" value. * "keyid":headers, in order. Theidentifier for the key material as an "sf-string" value. * "created": Creation time as an "sf-integer" UNIXsignature parameters consist of a creation timestampvalue. Sub-second precisionisnot supported. * "expires": Expiration time as an "sf-integer" UNIX timestamp value. Sub-second precision"1618884475" and the key identifier isnot supported. * "nonce": A random unique value generated"test-key-rsa-pss". The signature input string for thissignature. Additionalmessage with these parameterscan be defined in theis: NOTE: '\' line wrapping per RFC 8792 "@method": GET "@path": /foo "@authority": example.org "cache-control": max-age=60, must-revalidate "x-empty-header": "x-example": Example header with some whitespace. "@signature-params": ("@method" "@path" "@authority" \ "cache-control" "x-empty-header" "x-example");created=1618884475\ ;keyid="test-key-rsa-pss" Figure 1: Non-normative example Signature Input 3. HTTP Message Signatures An HTTP Message SignatureParameters Registry (Section 5.2.2). Theis a signatureparameters are serialized usingover a string generated from a subset of therules in Section 4components ofRFC8941 [RFC8941] as follows: 1. Letan HTTP message in addition to metadata about theoutput besignature itself. When successfully verified against anempty string. 2. DetermineHTTP message, anorder for the content identifiers ofHTTP Message Signature provides cryptographic proof that thecovered content. Once this ordermessage ischosen, it cannot be changed. 3. Serializesemantically equivalent to thecontent identifiers ofmessage for which thecovered content, including all parameters, as an ordered "inner-list" accordingsignature was generated, with respect toSection 4.1.1.1the subset ofRFC8941 [RFC8941] and append thismessage components that was signed. 3.1. Creating a Signature In order to create a signature, a signer MUST follow theoutput. 4. Determinefollowing algorithm: 1. The signer chooses anorder for anyHTTP signatureparameters. Once this orderalgorithm and key material for signing. The signer MUST choose key material that ischosen, it cannot be changed. 5. Appendappropriate for theparameterssignature's algorithm, and that conforms to any requirements defined by the"inner-list" inalgorithm, such as key size or format. The mechanism by which thechosen order according to Section 4.1.1.2signer chooses the algorithm and key material is out ofRFC8941 [RFC8941], skipping parameters that are not available or not usedscope for thissignature. 6.document. 2. Theoutput containssigner sets thesignature parameters value. Note thatsignature's creation time to the"inner-list" serialization is used forcurrent time. 3. If applicable, thecovered content value instead ofsigner sets the"sf-list" serialization in ordersignature's expiration time property tofacilitate this value's additional inclusion inthe"Signature-Input" header's dictionary, as discussed in Section 4.1. This example shows a canonicalized value fortime at which theparameters of a given signature: ("@request-target" "host" "date" "cache-control" "x-empty-header" \ "x-example");keyid="test-key-rsa-pss";alg="rsa-pss-sha512";\ created=1618884475;expires=1618884775 Note thatsignature is to expire. 4. The signer creates anHTTPordered set of component identifiers representing the messagecould contain multiple signatures, but onlycomponents to be covered by the signature, and attaches signature metadata parametersused for the current signature are included into thisfield. 2.4. Creating the Signature Input Stringset. Thesignature input is a US-ASCII string containing the content thatserialized value of this iscovered by the signature. To createlater used as thesignature input string,value of thesigner or verifier concatenates together entries for each identifier"Signature-Input" field as described in Section 4.1. * Once an order of covered components is chosen, thesignature's covered content and parameters usingorder MUST NOT change for thefollowing algorithm: 1. Letlife of theoutputsignature. * Each covered component identifier MUST be either anempty string. 2. For each covered content itemHTTP field in thecovered content list (in order): 1. Append themessage Section 2.1 or a specialty component identifierforlisted in Section 2.3 or its associated registry. * Signers of a request SHOULD include some or all of the message control data in the coveredcontent serialized accordingcomponents, such as the "@method", "@authority", "@target-uri", or some combination thereof. * Signers SHOULD include the "created" signature metadata parameter to indicate when the"content-identifier" rule. 2. Append a single colon "":"" 3. Append a single space "" "" 4. Appendsignature was created. * The "@signature-params" specialty component identifier is not explicitly listed in the list of coveredcontent's canonicalized value,component identifiers, because it is required to always be present asdefined bythecovered content type. (Section 2.1last line in the signature input. This ensures that a signature always covers its own metadata. * Further guidance on what to include in this set andSection 2.3)in what order is out of scope for this document. 5.Append a single newline ""\\n"" 3. AppendThe signer creates the signatureparametersinput string based on these signature parameters. (Section2.3.2) as follows: 1. Append the identifier for2.4) 6. The signer signs the signatureparameters serialized according toinput with the"content-identifier" rule, ""@signature- params"" 2. Append a single colon "":"" 3. Append a single space "" "" 4. Appendchosen signing algorithm using the key material chosen by the signer. Several signing algorithms are defined in in Section 3.3. 7. The byte array output of the signatureparameters' canonicalizedfunction is the HTTP message signature output value to be included in the "Signature" field as defined in Section2.3.2 4. Return4.2. For example, given theoutput string. If covered content references an identifier that cannot be resolved to a valueHTTP message and signature parameters in themessage,example in Section 2.4, theimplementation MUST produce an error. Such situations are included but not limited to: * The signer or verifier does not understandexample signature input string when signed with thecontent identifier. * The identifier identifies a header field that is not present"test-key-rsa-pss" key in Appendix B.1.2 gives the following messageor whosesignature output value, encoded in Base64: NOTE: '\' line wrapping per RFC 8792 P0wLUszWQjoi54udOtydf9IWTfNhy+r53jGFj9XZuP4uKwxyJo1RSHi+oEF1FuX6O29\ d+lbxwwBao1BAgadijW+7O/PyezlTnqAOVPWx9GlyntiCiHzC87qmSQjvu1CFyFuWSj\ dGa3qLYYlNm7pVaJFalQiKWnUaqfT4LyttaXyoyZW84jS8gyarxAiWI97mPXU+OVM64\ +HVBHmnEsS+lTeIsEQo36T3NFf2CujWARPQg53r58RmpZ+J9eKR2CD6IJQvacn5A4Ix\ 5BUAVGqlyp8JYm+S/CWJi31PNUjRRCusCVRj05NrxABNFv3r5S9IXf2fYJK+eyW4AiG\ VMvMcOg== Figure 2: Non-normative example signature valueis malformed. * The identifier is3.2. Verifying aDictionary member identifier that referencesSignature A verifier processes aheader field that is not presentsignature and its associated signature input parameters in concert with each other. In order to verify a signature, a verifier MUST follow themessage,following algorithm: 1. Parse the "Signature" and "Signature-Input" fields and extract the signatures to be verified. 1. If there isnot a Dictionary Structured Field, or whosemore than one signature valueis malformed. * The identifier is a Dictionary member identifier that references a member thatpresent, determine which signature should be processed for this message. If an applicable signature is notpresent infound, produce an error. 2. If the chosen "Signature" value does not have a corresponding "Signature-Input" value, produce an error. 2. Parse the values of the chosen "Signature-Input" field to get the parameters for the signature to be verified. 3. Parse theheader field value, or whosevalueis malformed. E.g.,of theidentifier is ""x-dictionary";key="c"" andcorresponding "Signature" field to get the byte array value of the"x-dictionary" header field is "a=1, b=2" Insignature to be verified. 4. Examine thefollowing non-normative example,signature parameters to confirm that theHTTPsignature meets the requirements described in this document, as well as any additional requirements defined by the application such as which messagebeing signedcomponents are required to be covered by the signature. (Section 3.2.1) 5. Determine the verification key material for this signature. If the key material is known through external means such as static configuration or external protocol negotiation, thefollowing request: GET /foo HTTP/1.1 Host: example.org Date: Tue, 20 Apr 2021 02:07:55 GMT X-Example: Example headerverifier will use that. If the key is identified in the signature parameters, the verifier will dereference this to appropriate key material to use withsome whitespace. X-Empty-Header: Cache-Control: max-age=60 Cache-Control: must-revalidatethe signature. Thecovered content consistsverifier has to determine the trustworthiness of the"@request-target" specialty content followed bykey material for the"Host", "Date", "Cache-Control", "X-Empty- Header", "X-Example" HTTP headers,context inorder. Thewhich the signaturecreation timestampis"1618884475" and thepresented. If a keyidentifieris"test-key-rsa- pss". The signature input stringidentified that the verifier does not know, does not trust for thismessage with these parameters is: "@request-target": get /foo "host": example.org "date": Tue, 20 Apr 2021 02:07:55 GMT "cache-control": max-age=60, must-revalidate "x-empty-header": "x-example": Example header with some whitespace. "@signature-params": ("@request-target" "host" "date" "cache-control" \ "x-empty-header" "x-example");created=1618884475;\ keyid="test-key-rsa-pss" Figure 1: Non-normative example Signature Input 3. HTTP Message Signatures An HTTP Message Signaturerequest, or does not match something preconfigured, the verification MUST fail. 6. Determine the algorithm to apply for verification: 1. If the algorithm isaknown through external means such as static configuration or external protocol negotiation, the verifier will use this algorithm. 2. If the algorithm is explicitly stated in the signatureoverparameters using astring generatedvalue froma subset ofthecontent in anHTTPmessage and metadata aboutMessage Signatures registry, thesignature itself. When successfully verified againstverifier will use the referenced algorithm. 3. If the algorithm can be determined from the keying material, such as through anHTTP message, it provides cryptographic proof that with respect toalgorithm field on thesubset of content that was signed,key value itself, themessage is semantically equivalent toverifier will use this algorithm. 4. If themessage for whichalgorithm is specified in more that one location, such as through static configuration and the algorithm signaturewas generated. 3.1. Creating a Signature In order to create a signature, a signer MUST followparameter, or thefollowing algorithm: 1. The signer chooses an HTTP signaturealgorithm signature parameter and from the key materialfor signing. The signeritself, the resolved algorithms MUSTchoose key material that is appropriate forbe thesignature's algorithm,same. If the algorithms are not the same, the verifier MUST vail the verification. 7. Use the received HTTP message andthat conformsthe signature's metadata toany requirements defined byrecreate thealgorithm, such as key size or format. The mechanism by whichsignature input, using thesigner choosesprocess described in Section 2.4. The value of thealgorithm and key material"@signature-params" input isoutthe value ofscopethe "SignatureInput" field for thisdocument. 2. The signer sets the signature's creation timesignature serialized according to thecurrent time. 3. If applicable, the signer setsrules described in Section 2.3.1, not including the signature'sexpiration time property tolabel from thetime at which"Signature-Input" field. 8. If thesignaturekey material isto expire. 4. The signer creates an ordered list of content identifiers representingappropriate for themessage content and signature metadataalgorithm, apply the verification algorithm tobe covered bythe signature, recalculated signature input, signature parameters, key material, andassigns this list as the signature's Covered Content. * Once an orderalgorithm. Several algorithms are defined in Section 3.3. 9. The results ofcovered content is chosen,theorder MUST NOT change forverification algorithm function are thelifefinal results of thesignature. * Each covered content identifier MUST either reference an HTTP header insignature verification. If any of therequest message Section 2.1 or reference a specialty content field listed in Section 2.3above steps fail orits associated registry. * Signers SHOULD include "@request-target" inproduce an error, thecovered content list. * Signers SHOULD include a date stampsignature validation fails. 3.2.1. Enforcing Application Requirements The verification requirements specified insome form, suchthis document are intended as a baseline set of restrictions that are generally applicable to all use cases. Applications usingthe "date" header. Alternatively, the "created" signature metadata parameter can fulfilHTTP Message Signatures MAY impose requirements above and beyond those specified by thisrole.document, as appropriate for their use case. Some non-normative examples of additional requirements an application might define are: *Further guidance on what to include in this list and in what order is outRequiring a specific set ofscope for this document. However, note that the list order is significant and once established forheader fields to be signed (e.g., "Authorization", "Digest"). * Enforcing agivenmaximum signatureit MUST be preserved for that signature.age. *Note thatProhibition of signature metadata parameters, such as runtime algorithm signaling with the"@signature-params" specialty identifier is not explicitly listed in"alg" parameter. * Prohibiting thelistuse ofcovered content identifiers, because it is requiredcertain algorithms, or mandating the use of a specific algorithm. * Requiring keys toalwaysbepresent as the last line in the signature input. This ensures thatof asignature always covers its own metadata. 5. The signer createscertain size (e.g., 2048 bits vs. 1024 bits). * Enforcing uniqueness of a "nonce" value. Application-specific requirements are expected and encouraged. When an application defines additional requirements, it MUST enforce them during the signatureinput string. (Section 2.4) 6. The signer signs theverification process, and signatureinput withverification MUST fail if thechosen signing algorithm usingsignature does not conform to thekey material chosen byapplication's requirements. Applications MUST enforce thesigner. Several signing algorithms arerequirements defined inin Section 3.3. 7. The byte array outputthis document. Regardless ofthe signature function is theuse case, applications MUST NOT accept signatures that do not conform to these requirements. 3.3. Signature Algorithm Methods HTTPmessageMessage signatures MAY use any cryptographic digital signatureoutput value to be included inor MAC method that is appropriate for the"Signature" header as defined in Section 4.2. For example, givenkey material, environment, and needs of theHTTP messagesigner and verifier. All signatures are generated from andsignature parameters inverified against theexample in Section 2.4,byte values of theexamplesignature input stringwhen signed with the "test-key-rsa-pss" key in Appendix B.1.2 gives the following message signature output value, encodeddefined inBase64: lPxkxqDEPhgrx1yPaKLO7eJ+oPjSwsQ5NjWNRfYP7Jw0FwnK1k8/GH7g5s2q0VTTKVm\ xyfpUDp/HsDphh5Z7Fa/lvtujHyFe/0EP9z7bnVb7YBZrxV52LGvP8p4APhOYuG4yaH\ z478GsJav9BQYK0B2IOHdLFJe8qwWPJs07J47gPewpNwCt0To/zZ2KPpylGX5UHVgJP\ Uom64KjX43u2OwIvSoPEYk4nuBvLR9yxYAHURaTfLoEDUCtY1FsU1hOfG3jAlcT6ill\ fnyS72PEdSSzw1KsxroMj9IYpFhva77YxmJRk4pCIW0F0Kj0ukl7J4y2aZJHMCYI3g8\ yfqh/wQ== Figure 2: Non-normative example signature value 3.2. Verifying a Signature A verifier processes aSection 2.4. Each signatureandalgorithm method takes as itsassociatedinput the signature inputparameters in concert with each other. In order to verify a signature,string as averifier MUST follow the following algorithm: 1. Parseset of byte values ("I"), the"Signature" and "Signature-Input" headerssigning key material ("Ks"), andextractoutputs thesignatures to be verified. 1. If there is more than one signature value present, determine whichsignatureshould be processed for this request. If an appropriate signature is not found, produce an error. 2. If the chosen "Signature" value does not haveoutput as acorresponding "Signature-Input" value, produce an error. 2. Parse the valuesset of byte values ("S"): HTTP_SIGN (I, Ks) -> S Each verification algorithm method takes as its input thechosen "Signature-Input" header field to get the parameters for therecalculated signatureto be verified. 3. Parse the valueinput string as a set ofthe corresponding "Signature" header field to get thebytearray value ofvalues ("I"), thesignature to be verified. 4. Examineverification key material ("Kv"), and the presented signatureparameterstoconfirm that the signature meets the requirements described in this document, as wellbe verified asany additional requirements defined bya set of byte values ("S") and outputs theapplication suchverification result ("V") aswhich contents are requireda boolean: HTTP_VERIFY (I, Kv, S) -> V This section contains several common algorithm methods. The method to use can becovered bycommunicated through thesignature. (Section 3.2.1) 5. Determinealgorithm signature parameter defined in Section 2.3.1, by reference to theverificationkeymaterial formaterial, or through mutual agreement between the signer and verifier. 3.3.1. RSASSA-PSS using SHA-512 To sign using thissignature. Ifalgorithm, thekey material is known through external means such as static configuration or external protocol negotiation,signer applies theverifier will use that. If"RSASSA-PSS-SIGN (K, M)" function [RFC8017] with the signer's private signing keyis identified in("K") and the signatureparameters, the verifier will dereference this to appropriate key material to useinput string ("M") (Section 2.4). The mask generation function is "MGF1" as specified in [RFC8017] withthe signature.a hash function of SHA-512 [RFC6234]. Theverifier hassalt length ("sLen") is 64 bytes. The hash function ("Hash") SHA-512 [RFC6234] is applied todeterminethetrustworthiness of the key material forsignature input string to create thecontext indigest content to which the digital signature ispresented. If a keyapplied. The resulting signed content byte array ("S") isidentified thattheverifier does not know, does not trust forHTTP message signature output used in Section 3.1. To verify using thisrequest, or does not match something preconfigured,algorithm, theverification MUST fail. 6. Determineverifier applies thealgorithm to apply for verification: 1. If"RSASSA-PSS- VERIFY ((n, e), M, S)" function [RFC8017] using thealgorithm is known through external means such as static configuration or external protocol negotiation,public key portion of theverifier will use this algorithm. 2. Ifverification key material ("(n, e)") and thealgorithmsignature input string ("M") re-created as described in Section 3.2. The mask generation function isexplicitly stated"MGF1" as specified in [RFC8017] with a hash function of SHA-512 [RFC6234]. The salt length ("sLen") is 64 bytes. The hash function ("Hash") SHA-512 [RFC6234] is applied to the signatureparameters using a value frominput string to create theHTTP Message Signatures registry,digest content to which the verification function is applied. The verifierwill use the referenced algorithm. 3. Ifextracts thealgorithm canHTTP message signature to bedetermined from the keying material, suchverified ("S") asthrough an algorithm field ondescribed in Section 3.2. The results of thekey value itself,verification function are compared to theverifier will use this algorithm. 4. Ifhttp message signature to determine if thealgorithmsignature presented isspecified in more that one location, such as through static configuration andvalid. 3.3.2. RSASSA-PKCS1-v1_5 using SHA-256 To sign using this algorithm, thealgorithm signature parameter, orsigner applies thealgorithm signature parameter and from"RSASSA- PKCS1-V1_5-SIGN (K, M)" function [RFC8017] with the signer's private signing keymaterial itself,("K") and theresolved algorithms MUST besignature input string ("M") (Section 2.4). The hash SHA-256 [RFC6234] is applied to thesame. Ifsignature input string to create thealgorithms are notdigest content to which thesame,digital signature is applied. The resulting signed content byte array ("S") is the HTTP message signature output used in Section 3.1. To verify using this algorithm, the verifierMUST vailapplies theverification. 7. Use"RSASSA- PKCS1-V1_5-VERIFY ((n, e), M, S)" function [RFC8017] using thereceived HTTP messagepublic key portion of the verification key material ("(n, e)") and thesignature's metadata to recreate thesignatureinput, using the processinput string ("M") re-created as described in Section2.4.3.2. Thevalue of the "@signature-params" inputhash function SHA-256 [RFC6234] is applied to thevalue of the SignatureInput header field for thissignatureserialized accordinginput string to create therules described in Section 2.3.2, not including the signature's label from the "Signature-Input" header. 8. If the key material is appropriate for the algorithm, applydigest content to which the verificationalgorithm tofunction is applied. The verifier extracts thesignature, recalculated signature input,HTTP message signatureparameters, key material, and algorithm. Several algorithms are definedto be verified ("S") as described in Section3.3. 9.3.2. The results of the verificationalgorithmfunction are compared to thefinal results of the signature verification. If any of the above steps fail, thehttp message signaturevalidation fails. 3.2.1. Enforcing Application Requirements The verification requirements specified in this document are intended as a baseline set of restrictions that are generally applicable to all use cases. Applications using HTTP Message Signatures MAY impose requirements above and beyond those specified by this document, as appropriate for their use case. Some non-normative examples of additional requirements an application might define are: * Requiring a specific set of header fieldstobe signed (e.g., Authorization, Digest). * Enforcing a maximum signature age. * Prohibiting the use of certain algorithms, or mandatingdetermine if theuse of an algorithm. * Requiring keys to be of a certain size (e.g., 2048 bits vs. 1024 bits). * Enforcing uniqueness of a nonce value. Application-specific requirements are expected and encouraged. When an application defines additional requirements, it MUST enforce them duringsignature presented is valid. 3.3.3. HMAC using SHA-256 To sign and verify using this algorithm, thesignature verification process,signer applies the "HMAC" function [RFC2104] with the shared signing key ("K") and the signatureverification MUST fail ifinput string ("text") (Section 2.4). The hash function SHA-256 [RFC6234] is applied to the signaturedoes not conforminput string to create the digest content to which theapplication's requirements. Applications MUST enforceHMAC is applied, giving therequirements definedsignature result. For signing, the resulting value is the HTTP message signature output used inthis document. Regardless of use case, applications MUST NOT accept signatures that do not conform to these requirements. 3.3. Signature Algorithm MethodsSection 3.1. For verification, the verifier extracts the HTTPMessage signatures MAY use any cryptographic digitalmessage signatureor MAC method thatto be verified ("S") as described in Section 3.2. The output of the HMAC function isappropriate forcompared to thekey material, environment,value of the HTTP message signature, andneedsthe results of thesignercomparison determine the validity of the signature presented. 3.3.4. ECDSA using curve P-256 DSS andverifier. All signatures are generated fromSHA-256 To sign using this algorithm, the signer applies the "ECDSA" algorithm [FIPS186-4] using curve P-256 with the signer's private signing key andverified againstthebyte values ofsignature input string (Section 2.4). The hash SHA-256 [RFC6234] is applied to the signature input stringdefinedto create the digest content to which the digital signature is applied. The resulting signed content byte array is the HTTP message signature output used in Section2.4. Each signature3.1. To verify using this algorithm, the verifier applies the "ECDSA" algorithmmethod takes as its input[FIPS186-4] using thesignature input string as a setpublic key portion ofbyte values ("I"),thesigningverification key material("Ks"),andoutputsthesigned content as a set of byte values ("S"): HTTP_SIGN (I, Ks) -> S Each verification algorithm method takes as itssignature input string re-created as described in Section 3.2. The hash function SHA-256 [RFC6234] is applied to therecalculatedsignature input stringas a set of byte values ("I"),to create the digest content to which the verificationkey material ("Kv"), andfunction is applied. The verifier extracts thepresentedHTTP message signature to be verified ("S") asa setdescribed in Section 3.2. The results ofbyte values ("S") and outputsthe verificationresult ("V") as a boolean: HTTP_VERIFY (I, Kv, S) -> V This section contains several common algorithm methods. The methodfunction are compared touse can be communicated throughthealgorithmhttp message signatureparameter defined in Section 2.3.2, by referenceto determine if thekey material, or through mutual agreement betweensignature presented is valid. 3.3.5. JSON Web Signature (JWS) algorithms If thesigner and verifier. 3.3.1. RSASSA-PSS using SHA-512 To sign using this algorithm,signing algorithm is a JOSE signing algorithm from thesigner appliesJSON Web Signature and Encryption Algorithms Registry established by [RFC7518], the"RSASSA-PSS-SIGN (K, M)" function [RFC8017] withJWS algorithm definition determines thesigner's privatesignature and hashing algorithms to apply for both signingkey ("K")andthe signature input string ("M") (Section 2.4). The mask generation functionverification. There is"MGF1" as specified in [RFC8017] with a hash functionno use ofSHA-512 [RFC6234]. The salt length ("sLen")the explicit "alg" signature parameter when using JOSE signing algorithms. For both signing and verification, the HTTP messages signature input string (Section 2.4) is64 bytes.used as the entire "JWS Signing Input". Thehash function ("Hash") SHA-512 [RFC6234]JOSE Header defined in [RFC7517] isapplied tonot used, and the signature input stringto createis not first encoded in Base64 before applying thedigest content to whichalgorithm. The output of thedigitalJWS signature isapplied. The resulting signed contenttaken as a byte array("S") isprior to the Base64url encoding used in JOSE. The JWS algorithm MUST NOT be "none" and MUST NOT be any algorithm with a JOSE Implementation Requirement of "Prohibited". 4. Including a Message Signature in a Message Message signatures can be included within an HTTP message via the "Signature-Input" and "Signature" HTTP fields, both defined within this specification. When attached to a message, an HTTP message signatureoutputis identified by a label. This label MUST be unique within a given HTTP message and MUST be used inSection 3.1. To verify using this algorithm,both theverifier applies"Signature-Input" and "Signature". The label is chosen by the"RSASSA-PSS- VERIFY ((n, e), M, S)" function [RFC8017] usingsigner, except where a specific label is dictated by protocol negotiations. An HTTP message signature MUST use both fields containing thepublic key portion ofsame labels: theverification key material ("(n, e)")"Signature" HTTP field contains the signature value, while the "Signature-Input" HTTP field identifies the covered components and parameters that describe how the signatureinput string ("M") re-created as described in Section 3.2. The mask generation function is "MGF1" as specified in [RFC8017] with a hash function of SHA-512 [RFC6234].was generated. Each field contains labeled values and MAY contain multiple labeled values, where the labels determine the correlation between the "Signature" and "Signature-Input" fields. 4.1. Thesalt length ("sLen") is 64 bytes.'Signature-Input' HTTP Field Thehash function ("Hash") SHA-512 [RFC6234]"Signature-Input" HTTP field isapplied to the signature input string to createa Dictionary Structured Field [RFC8941] containing thedigest content to whichmetadata for one or more message signatures generated from components within theverification function is applied.HTTP message. Each member describes a single message signature. Theverifier extractsmember's name is an identifier that uniquely identifies theHTTPmessage signatureto be verified ("S") as described in Section 3.2. The resultswithin the context of theverification function are compared toHTTP message. The member's value is thehttp message signature to determine ifserialization of the covered components including all signaturepresented is valid. 3.3.2. RSASSA-PKCS1-v1_5 using SHA-256 To signmetadata parameters, usingthis algorithm,thesigner appliesserialization process defined in Section 2.3.1. NOTE: '\' line wrapping per RFC 8792 Signature-Input: sig1=("@method" "@target-uri" "host" "date" \ "cache-control" "x-empty-header" "x-example");created=1618884475\ ;keyid="test-key-rsa-pss" To facilitate signature validation, the"RSASSA- PKCS1-V1_5-SIGN (K, M)" function [RFC8017] with"Signature-Input" field value MUST contain thesigner's private signing key ("K") andsame serialized value used in generating the signature inputstring ("M") (Section 2.4).string's "@signature-params" value. Thehash SHA-256 [RFC6234] is applied tosigner MAY include thesignature input string"Signature-Input" field as a trailer tocreate the digestfacilitate signing a message after its content has been processed by the signer. However, since intermediaries are allowed towhichdrop trailers as per [SEMANTICS], it is RECOMMENDED that thedigital"Signature- Input" HTTP field be included only as a header to avoid signatures being inadvertently stripped from a message. Multiple "Signature-Input" fields MAY be included in a single HTTP message. The signatureis applied.labels MUST be unique across all field values. 4.2. Theresulting signed content byte array ("S")'Signature' HTTP Field The "Signature" HTTP field is a Dictionary Structured field [RFC8941] containing one or more message signatures generated from components within the HTTPmessagemessage. Each member's name is a signatureoutput usedidentifier that is present as a member name inSection 3.1. To verify using this algorithm, the verifier appliesthe"RSASSA- PKCS1-V1_5-VERIFY ((n, e), M, S)" function [RFC8017] using"Signature-Input" Structured field within thepublic key portion ofHTTP message. Each member's value is a Byte Sequence containing theverification key material ("(n, e)") andsignature value for the message signatureinput string ("M") re-created as describedidentified by the member name. Any member inSection 3.2.the "Signature" HTTP field that does not have a corresponding member in the HTTP message's "Signature-Input" HTTP field MUST be ignored. NOTE: '\' line wrapping per RFC 8792 Signature: sig1=:P0wLUszWQjoi54udOtydf9IWTfNhy+r53jGFj9XZuP4uKwxyJo\ 1RSHi+oEF1FuX6O29d+lbxwwBao1BAgadijW+7O/PyezlTnqAOVPWx9GlyntiCiHz\ C87qmSQjvu1CFyFuWSjdGa3qLYYlNm7pVaJFalQiKWnUaqfT4LyttaXyoyZW84jS8\ gyarxAiWI97mPXU+OVM64+HVBHmnEsS+lTeIsEQo36T3NFf2CujWARPQg53r58Rmp\ Z+J9eKR2CD6IJQvacn5A4Ix5BUAVGqlyp8JYm+S/CWJi31PNUjRRCusCVRj05NrxA\ BNFv3r5S9IXf2fYJK+eyW4AiGVMvMcOg==: Thehash function SHA-256 [RFC6234] is applied tosigner MAY include thesignature input string"Signature" field as a trailer tocreate the digestfacilitate signing a message after its contentto whichhas been processed by theverification functionsigner. However, since intermediaries are allowed to drop trailers as per [SEMANTICS], it isapplied. The verifier extractsRECOMMENDED that the "Signature- Input" HTTPmessage signature tofield beverified ("S")included only asdescribeda header to avoid signatures being inadvertently stripped from a message. Multiple "Signature" fields MAY be included inSection 3.2.a single HTTP message. Theresults of the verification function are compared to the http messagesignature labels MUST be unique across all field values. 4.3. Multiple Signatures Multiple distinct signatures MAY be included in a single message. Since "Signature-Input" and "Signature" are both defined as Dictionary Structured fields, they can be used todetermine ifinclude multiple signatures within thesignature presented is valid. 3.3.3. HMAC using SHA-256 To sign and verifysame HTTP message by usingthis algorithm, thedistinct signature labels. For example, a signerapplies the "HMAC" function [RFC2104] with the sharedmay include multiple signatures signingkey ("K") andthesignature input string ("text") (Section 2.4). The hash function SHA-256 [RFC6234] is appliedsame message components with different keys or algorithms to support verifiers with different capabilities, or a reverse proxy may include information about thesignature input string to createclient in fields when forwarding thedigest contentrequest towhich the HMAC is applied, giving the signature result. For signing, the resulting value is the HTTP messagea service host, including a signatureoutput used in Section 3.1. For verification, the verifier extractsover theHTTP messageclient's original signatureto be verified ("S") as described in Section 3.2.values. Theoutput of the HMAC functionfollowing iscompareda non-normative example of header fields a reverse proxy sets in addition to thevalue ofexamples in theHTTP message signature, andprevious sections. NOTE: '\' line wrapping per RFC 8792 Forwarded: for=192.0.2.123 Signature-Input: sig1=("@method" "@path" "@authority" \ "cache-control" "x-empty-header" "x-example")\ ;created=1618884475;keyid="test-key-rsa-pss" Signature: sig1=:P0wLUszWQjoi54udOtydf9IWTfNhy+r53jGFj9XZuP4uKwxyJo\ 1RSHi+oEF1FuX6O29d+lbxwwBao1BAgadijW+7O/PyezlTnqAOVPWx9GlyntiCi\ HzC87qmSQjvu1CFyFuWSjdGa3qLYYlNm7pVaJFalQiKWnUaqfT4LyttaXyoyZW8\ 4jS8gyarxAiWI97mPXU+OVM64+HVBHmnEsS+lTeIsEQo36T3NFf2CujWARPQg53\ r58RmpZ+J9eKR2CD6IJQvacn5A4Ix5BUAVGqlyp8JYm+S/CWJi31PNUjRRCusCV\ Rj05NrxABNFv3r5S9IXf2fYJK+eyW4AiGVMvMcOg==: The client's request includes a signature value under theresults oflabel "sig1", which thecomparison determineproxy signs in addition to thevalidity of"Forwarded" header defined in [RFC7239]. Note that since the client's signaturepresented. 3.3.4. ECDSA using curve P-256 DSS and SHA-256 To sign using this algorithm, the signer appliesalready covers the"ECDSA" algorithm [FIPS186-4] using curve P-256 withclient's "Signature-Input" value for "sig1", this value is transitively covered by thesigner's private signing keyproxy's signature andtheneed not be added explicitly. This results in a signature input string(Section 2.4). The hash SHA-256 [RFC6234] is appliedof: NOTE: '\' line wrapping per RFC 8792 "signature";key="sig1": :P0wLUszWQjoi54udOtydf9IWTfNhy+r53jGFj9XZuP\ 4uKwxyJo1RSHi+oEF1FuX6O29d+lbxwwBao1BAgadijW+7O/PyezlTnqAOVPWx9Gl\ yntiCiHzC87qmSQjvu1CFyFuWSjdGa3qLYYlNm7pVaJFalQiKWnUaqfT4LyttaXyo\ yZW84jS8gyarxAiWI97mPXU+OVM64+HVBHmnEsS+lTeIsEQo36T3NFf2CujWARPQg\ 53r58RmpZ+J9eKR2CD6IJQvacn5A4Ix5BUAVGqlyp8JYm+S/CWJi31PNUjRRCusCV\ Rj05NrxABNFv3r5S9IXf2fYJK+eyW4AiGVMvMcOg==: "forwarded": for=192.0.2.123 "@signature-params": ("signature";key="sig1" "forwarded")\ ;created=1618884480;keyid="test-key-rsa";alg="rsa-v1_5-sha256" And a signature output value of: NOTE: '\' line wrapping per RFC 8792 cjGvZwbsq9JwexP9TIvdLiivxqLINwp/ybAc19KOSQuLvtmMt3EnZxNiE+797dXK2cj\ PPUFqoZxO8WWx1SnKhAU9SiXBr99NTXRmA1qGBjqus/1Yxwr8keB8xzFt4inv3J3zP0\ k6TlLkRJstkVnNjuhRIUA/ZQCo8jDYAl4zWJJjppy6Gd1XSg03iUa0sju1yj6rcKbMA\ BBuzhUz4G0u1hZkIGbQprCnk/FOsqZHpwaWvY8P3hmcDHkNaavcokmq+3EBDCQTzgwL\ qfDmV0vLCXtDda6CNO2Zyum/pMGboCnQn/VkQ+j8kSydKoFg6EbVuGbrQijth6I0dDX\ 2/HYcJg== These values are added to the HTTP request message by the proxy. The original signatureinput string to createis included under thedigest content to whichidentifier "sig1", and thedigitalreverse proxy's signature isapplied.included under the label "proxy_sig". Theresulting signed content byte array isproxy uses theHTTP messagekey "test-key-rsa" to create its signatureoutput used in Section 3.1. To verifyusingthis algorithm,theverifier applies"rsa-v1_5-sha256" signature algorithm, while the"ECDSA" algorithm [FIPS186-4]client's original signature was made using thepublickeyportionid ofthe verification key material"test-key-rsa-pss" andthean RSA PSS signatureinput string re-created as described in Section 3.2.algorithm. NOTE: '\' line wrapping per RFC 8792 Forwarded: for=192.0.2.123 Signature-Input: sig1=("@method" "@path" "@authority" \ "cache-control" "x-empty-header" "x-example")\ ;created=1618884475;keyid="test-key-rsa-pss", \ proxy_sig=("signature";key="sig1" "forwarded")\ ;created=1618884480;keyid="test-key-rsa";alg="rsa-v1_5-sha256" Signature: sig1=:P0wLUszWQjoi54udOtydf9IWTfNhy+r53jGFj9XZuP4uKwxyJo\ 1RSHi+oEF1FuX6O29d+lbxwwBao1BAgadijW+7O/PyezlTnqAOVPWx9GlyntiCi\ HzC87qmSQjvu1CFyFuWSjdGa3qLYYlNm7pVaJFalQiKWnUaqfT4LyttaXyoyZW8\ 4jS8gyarxAiWI97mPXU+OVM64+HVBHmnEsS+lTeIsEQo36T3NFf2CujWARPQg53\ r58RmpZ+J9eKR2CD6IJQvacn5A4Ix5BUAVGqlyp8JYm+S/CWJi31PNUjRRCusCV\ Rj05NrxABNFv3r5S9IXf2fYJK+eyW4AiGVMvMcOg==:, \ proxy_sig=:cjGvZwbsq9JwexP9TIvdLiivxqLINwp/ybAc19KOSQuLvtmMt3EnZx\ NiE+797dXK2cjPPUFqoZxO8WWx1SnKhAU9SiXBr99NTXRmA1qGBjqus/1Yxwr8k\ eB8xzFt4inv3J3zP0k6TlLkRJstkVnNjuhRIUA/ZQCo8jDYAl4zWJJjppy6Gd1X\ Sg03iUa0sju1yj6rcKbMABBuzhUz4G0u1hZkIGbQprCnk/FOsqZHpwaWvY8P3hm\ cDHkNaavcokmq+3EBDCQTzgwLqfDmV0vLCXtDda6CNO2Zyum/pMGboCnQn/VkQ+\ j8kSydKoFg6EbVuGbrQijth6I0dDX2/HYcJg==: Thehash function SHA-256 [RFC6234] is applied to theproxy's signatureinput string to create the digest content to which the verification function is applied. The verifier extractsand theHTTP messageclient's original signaturetocan be verified("S") as described in Section 3.2. The results ofindependently for theverification function are compared tosame message, based on thehttp message signature to determine ifneeds of the application. Since the proxy's signaturepresented is valid. 3.3.5. JSON Web Signature (JWS) algorithms Ifcovers thesigning algorithm is a JOSE signing algorithm fromclient signature, theJSON Web Signature and Encryption Algorithms Registry establishedbackend service fronted by[RFC7518],theJWS algorithm definition determinesproxy can trust that thesignature and hashing algorithmsproxy has validated the incoming signature. 5. Requesting Signatures While a signer is free to attach a signature toapply for both signing and verification. Therea request or response without prompting, it isno use of the explicit "alg"often desirable for a potential verifier to signal that it expects a signatureparameter whenfrom a potential signer usingJOSE signing algorithms. For both signing and verification,theHTTP messages"Accept-Signature" field. The message to which the requested signatureinput string (Section 2.4)isusedapplied is known as theentire "JWS Signing Input". The JOSE Header defined in [RFC7517] is not used, and"target message". When thesignature input string"Accept-Signature" field isnot first encodedsent inBase64 before applyingan HTTP Request message, thealgorithm. The output offield indicates that theJWS signature is taken as a byte array priorclient desires the server to sign theBase64url encoding used in JOSE. The JWS algorithm MUST NOT be "none"response using the identified parameters andMUST NOTthe target message is the response to this request. All responses from resources that support such signature negotiation SHOULD either beany algorithmuncacheable or contain a "Vary" header field that lists "Accept- Signature", in order to prevent a cache from returning a response with aJOSE Implementation Requirement of "Prohibited". 4. Includingsignature intended for aMessage Signaturedifferent request. When the "Accept-Signature" field is used ina Message Message signatures can be included withinan HTTPmessage viaResponse message, the"Signature-Input"field indicates that the server desires the client to sign its next request to the server with the identified parameters, and"Signature" HTTP header fields, both defined within this specification. An HTTPthe target messagesignature MUST use both headers:is the"Signature" HTTP headerclient's next request. The client can choose to also continue signing future requests to the same server in the same way. The target message of an "Accept-Signature" fieldcontainsMUST include all labeled signatures indicated in thesignature value, while"Accept-Header" signature, each covering the"Signature- Input" HTTP header field identifiessame identified components of thecovered content and parameters"Accept-Signature" field. The sender of an "Accept-Signature" field MUST include identifiers thatdescribe howare appropriate for thesignature was generated. Each header MAY contain multiple labeled values, wheretype of thelabels determinetarget message. For example, if thecorrelation betweentarget message is a response, the"Signature" and "Signature- Input" fields. 4.1.identifiers can not include the "@status" identifier. 5.1. The'Signature-Input' HTTP HeaderAccept-Signature Field The"Signature-Input""Accept-Signature" HTTP header field is a Dictionary StructuredHeaderfield [RFC8941] containing the metadata for one or more requested message signatures to be generated fromcontent withinmessage components of the target HTTP message. Each member describes a single message signature. The member's name is an identifier that uniquely identifies the requested message signature within the context of the target HTTP message. The member's value is the serialization of the desired coveredcontentcomponents of the target message, includingallany allowed signature metadata parameters, using the serialization process defined in Section2.3.2. Signature-Input: sig1=("@request-target"2.3.1. NOTE: '\' line wrapping per RFC 8792 Accept-Signature: sig1=("@method" "@target-uri" "host" "date" \ "cache-control" "x-empty-header""x-example");created=1618884475\"x-example")\ ;keyid="test-key-rsa-pss"To facilitate signature validation, the "Signature-Input" header value MUST contain the same serialized value used in generating the signature input string's "@signature-params" value. 4.2. The 'Signature' HTTP Header The "Signature" HTTP header field is a Dictionary Structured Header [RFC8941] containing one or more message signatures generated from content within the HTTP message. Each member's name is a signature identifier that is present as a member name in the "Signature-Input" Structured Header within the HTTP message. Each member's value is a Byte Sequence containing the signature value for the message signature identified by the member name. Any member in the "Signature" HTTP header field that does not have a corresponding member in the HTTP message's "Signature-Input" HTTP header field MUST be ignored. Signature: sig1=:lPxkxqDEPhgrx1yPaKLO7eJ+oPjSwsQ5NjWNRfYP7Jw0FwnK1k\ 8/GH7g5s2q0VTTKVmxyfpUDp/HsDphh5Z7Fa/lvtujHyFe/0EP9z7bnVb7YBZrxV5\ 2LGvP8p4APhOYuG4yaHz478GsJav9BQYK0B2IOHdLFJe8qwWPJs07J47gPewpNwCt\ 0To/zZ2KPpylGX5UHVgJPUom64KjX43u2OwIvSoPEYk4nuBvLR9yxYAHURaTfLoED\ UCtY1FsU1hOfG3jAlcT6illfnyS72PEdSSzw1KsxroMj9IYpFhva77YxmJRk4pCIW\ 0F0Kj0ukl7J4y2aZJHMCYI3g8yfqh/wQ==: 4.3. Multiple Signatures Since "Signature-Input" and "Signature" are both defined as Dictionary Structured Headers, they can be used to include multiple signatures within the same HTTP message. For example, a signer mayThe requested signature MAY includemultiple signatures signing the same content with different keys or algorithms to support verifiers with different capabilities, orparameters, such as areverse proxy maydesired algorithm or key identifier. These parameters MUST NOT includeinformation about the client in header fields when forwardingparameters that therequestsigner is expected toa service host,generate, includinga signature over those fields andtheclient's original signature."created" and "nonce" parameters. 5.2. Processing an Accept-Signature Thefollowing is a non-normative examplereceiver of an "Accept-Signature" field fulfills that headerfields a reverse proxy sets in addition toas follows: 1. Parse theexamples infield value as a Dictionary 2. For each member of theprevious sections.dictionary: 1. Theoriginal signature is included under the identifier "sig1", andname of thereverse proxy's signaturemember isincluded under "proxy_sig". The proxy usesthekey "rsa-test-key" to create its signature usinglabel of the"rsa- v1_5-sha256"output signaturevalue. This resultsas specified ina signature input string of: "signature";key="sig1": \ :lPxkxqDEPhgrx1yPaKLO7eJ+oPjSwsQ5NjWNRfYP7Jw0FwnK1k8/GH7g5s2q0VTT\ KVmxyfpUDp/HsDphh5Z7Fa/lvtujHyFe/0EP9z7bnVb7YBZrxV52LGvP8p4APhOYu\ G4yaHz478GsJav9BQYK0B2IOHdLFJe8qwWPJs07J47gPewpNwCt0To/zZ2KPpylGX\ 5UHVgJPUom64KjX43u2OwIvSoPEYk4nuBvLR9yxYAHURaTfLoEDUCtY1FsU1hOfG3\ jAlcT6illfnyS72PEdSSzw1KsxroMj9IYpFhva77YxmJRk4pCIW0F0Kj0ukl7J4y2\ aZJHMCYI3g8yfqh/wQ==: "x-forwarded-for": 192.0.2.123 "@signature-params": ("signature";key="sig1" "x-forwarded-for")\ ;created=1618884480;keyid="test-key-rsa";alg="rsa-v1_5-sha256" And a signature outputSection 4.1 2. Parse the valueof: XD1O/vEh772WVpY7jYvReXop2+b7xTIIPKH8/OCYzPn78Wd9jodCwAJPF5TYCn9L6n6\ 8j4EjGsqFOMkVLVdSQEZqMLjEbvMEdIe8m1a0CLd5kydeaAwoHoglqod6ijkwhhEtxt\ aD8tDZmihQw2mZEH8u4aMSnRntqy7ExCNld0JLharsHV0iCbRO9jIP+d2ApD7gB+eZp\ n3pIvvVJZlxTwPkahFpxKlQtNMPaSqa1lvejURx+ST8CEuz4sS+G/oLJiX3MZenuUoO\ R8HeOHDnjN/VLzrEN4x44iF7WIL+iY2PtK87LUWRAsJAX9GqHL/upsGh1nxIdoVaoLV\ V5w+fRw== These values are addedof the member to obtain theHTTP request message byset of covered component identifiers 3. Process theproxy. The different signature values are wrapped onto separate linesrequested parameters, such as the signing algorithm and key material. If any requested parameters cannot be fulfilled, or if the requested parameters conflict with those deemed appropriate toincrease human-readability oftheresult. X-Forwarded-For: 192.0.2.123 Signature-Input: sig1=("@request-target" "host" "date" \ "cache-control" "x-empty-header" "x-example")\ ;created=1618884475;keyid="test-key-rsa-pss", \ proxy_sig=("signature";key="sig1" "x-forwarded-for")\ ;created=1618884480;keyid="test-key-rsa";alg="rsa-v1_5-sha256" Signature: sig1=:lPxkxqDEPhgrx1yPaKLO7eJ+oPjSwsQ5NjWNRfYP7Jw0FwnK1k\ 8/GH7g5s2q0VTTKVmxyfpUDp/HsDphh5Z7Fa/lvtujHyFe/0EP9z7bnVb7YBZrx\ V52LGvP8p4APhOYuG4yaHz478GsJav9BQYK0B2IOHdLFJe8qwWPJs07J47gPewp\ NwCt0To/zZ2KPpylGX5UHVgJPUom64KjX43u2OwIvSoPEYk4nuBvLR9yxYAHURa\ TfLoEDUCtY1FsU1hOfG3jAlcT6illfnyS72PEdSSzw1KsxroMj9IYpFhva77Yxm\ JRk4pCIW0F0Kj0ukl7J4y2aZJHMCYI3g8yfqh/wQ==:, \ proxy_sig=:XD1O/vEh772WVpY7jYvReXop2+b7xTIIPKH8/OCYzPn78Wd9jodCwA\ JPF5TYCn9L6n68j4EjGsqFOMkVLVdSQEZqMLjEbvMEdIe8m1a0CLd5kydeaAwoH\ oglqod6ijkwhhEtxtaD8tDZmihQw2mZEH8u4aMSnRntqy7ExCNld0JLharsHV0i\ CbRO9jIP+d2ApD7gB+eZpn3pIvvVJZlxTwPkahFpxKlQtNMPaSqa1lvejURx+ST\ 8CEuz4sS+G/oLJiX3MZenuUoOR8HeOHDnjN/VLzrEN4x44iF7WIL+iY2PtK87LU\ WRAsJAX9GqHL/upsGh1nxIdoVaoLVV5w+fRw==: The proxy'starget message, the process fails and returns an error. 4. Select any additional parameters necessary for completing the signature 5. Create the "Signature-Input" and "Signature" header values and associate them with the label 3. Optionally create any additional "Signature-Input" and "Signature" values, with unique labels not found in the "Accept- Signature" field 4. Combine all labeled "Signature-Input" and "Signature" values and attach both headers to theclient's originaltarget message Note that by this process, a signaturecan be verified independently forapplied to a target message MUST have the samemessage, depending onlabel, MUST have theneedssame set of covered component, and MAY have additional parameters. Also note that theapplication. 5.target message MAY include additional signatures not specified by the "Accept-Signature" field. 6. IANA Considerations5.1.6.1. HTTP Signature Algorithms Registry This document defines HTTP Signature Algorithms, for which IANA is asked to create and maintain a new registry titled "HTTP Signature Algorithms". Initial values for this registry are given in Section5.1.2.6.1.2. Future assignments and modifications to existing assignment are to be made through the Expert Review registration policy [RFC8126] and shall follow the template presented in Section5.1.1.6.1.1. Algorithms referenced by algorithm identifiers have to be fully defined with all parameters fixed. Algorithm identifiers in this registry are to be interpreted as whole string values and not as a combination of parts. That is to say, it is expected that implementors understand "rsa-pss-sha512" as referring to one specific algorithm with its hash, mask, and salt values set as defined here. Implementors do not parse out the "rsa", "pss", and "sha512" portions of the identifier to determine parameters of the signing algorithm from the string.5.1.1.6.1.1. Registration Template Algorithm Name: An identifier for the HTTP Signature Algorithm. The name MUST be an ASCII string consisting only of lower-case characters (""a"" - ""z""), digits (""0"" - ""9""), and hyphens (""-""), and SHOULD NOT exceed 20 characters in length. The identifier MUST be unique within the context of the registry. Status: A brief text description of the status of the algorithm. The description MUST begin with one of "Active" or "Deprecated", and MAY provide further context or explanation as to the reason for the status. Description: A brief description of the algorithm used to sign the signature input string. Specification document(s): Reference to the document(s) that specify the token endpoint authorization method, preferably including a URI that can be used to retrieve a copy of the document(s). An indication of the relevant sections may also be included but is not required.5.1.2.6.1.2. Initial Contents5.1.2.1.6.1.2.1. rsa-pss-sha512 Algorithm Name: "rsa-pss-sha512" Status: Active Definition: RSASSA-PSS using SHA-256 Specification document(s): [[This document]], Section 3.3.15.1.2.2.6.1.2.2. rsa-v1_5-sha256 Algorithm Name: "rsa-v1_5-sha256" Status: Active Description: RSASSA-PKCS1-v1_5 using SHA-256 Specification document(s): [[This document]], Section 3.3.25.1.2.3.6.1.2.3. hmac-sha256 Algorithm Name: "hmac-sha256" Status: Active Description: HMAC using SHA-256 Specification document(s): [[This document]], Section 3.3.35.1.2.4.6.1.2.4. ecdsa-p256-sha256 Algorithm Name: "ecdsa-p256-sha256" Status: Active Description: ECDSA using curve P-256 DSS and SHA-256 Specification document(s): [[This document]], Section 3.3.45.2.6.2. HTTP Signature Metadata Parameters Registry This document defines the"Signature-Input" Structured Header, whose membersignature parameters structure, the values of which may have parameters containing metadata about a message signature. IANA is asked to create and maintain a new registry titled "HTTP Signature Metadata Parameters" to record and maintain the set of parameters defined for use with member values in the"Signature-Input" Structured Header.signature parameters structure. Initial values for this registry are given in Section5.2.2.6.2.2. Future assignments and modifications to existing assignments are to be made through the Expert Review registration policy [RFC8126] and shall follow the template presented in Section5.2.1. 5.2.1.6.2.1. 6.2.1. Registration Template5.2.2.6.2.2. Initial Contents The table below contains the initial contents of the HTTP Signature Metadata Parameters Registry. Each row in the table represents a distinct entry in the registry. +=========+========+================================+ | Name | Status | Reference(s) | +=========+========+================================+ | alg | Active | Section2.3.22.3.1 of this document | +---------+--------+--------------------------------+ | created | Active | Section2.3.22.3.1 of this document | +---------+--------+--------------------------------+ | expires | Active | Section2.3.22.3.1 of this document | +---------+--------+--------------------------------+ | keyid | Active | Section2.3.22.3.1 of this document | +---------+--------+--------------------------------+ | nonce | Active | Section2.3.22.3.1 of this document | +---------+--------+--------------------------------+ Table4:3: Initial contents of the HTTP Signature Metadata Parameters Registry.5.3.6.3. HTTP Signature SpecialtyContentComponent Identifiers Registry This document defines a method for canonicalizing HTTP messagecontent,components, includingcontentcomponents that can be generated from the context of the HTTP message outside of the HTTPheaders. This content isfields. These components are identified by a uniquekey.string, known as the component identifier. IANA is asked to create and maintain a new registry typed "HTTP Signature SpecialtyContentComponent Identifiers" to record and maintain the set ofnon-header contentnon-field component identifiers and the methods to produce theircanonicalization method.associated component values. Initial values for this registry are given in Section5.3.2.6.3.2. Future assignments and modifications to existing assignments are to be made through the Expert Review registration policy [RFC8126] and shall follow the template presented in Section5.3.1. 5.3.1.6.3.1. 6.3.1. Registration Template5.3.2.6.3.2. Initial Contents The table below contains the initial contents of the HTTP Signature SpecialtyContentComponent Identifiers Registry.+===================+========+================================++===================+========+===================+==================+ | Name | Status | Target | Reference | +===================+========+===================+==================+ | @signature-params | Active | Request, | Section 2.3.1 of | | | | Response | this document | +-------------------+--------+-------------------+------------------+ | @method | Active | Request, | Section 2.3.2 of | | | | Related-Response | this document | +-------------------+--------+-------------------+------------------+ | @authority | Active | Request, | Section 2.3.4 of | | | | Related-Response | this document | +-------------------+--------+-------------------+------------------+ | @scheme | Active | Request, | Section 2.3.5 of | | | | Related-Response | this document | +-------------------+--------+-------------------+------------------+ | @target-uri | Active | Request, | Section 2.3.3 of | | | | Related-Response | this document | +-------------------+--------+-------------------+------------------+ | @request-target | Active | Request, | Section 2.3.6 of | | | | Related-Response | this document | +-------------------+--------+-------------------+------------------+ | @path | Active | Request, | Section 2.3.7 of | | | | Related-Response | this document | +-------------------+--------+-------------------+------------------+ | @query | Active | Request, | Section 2.3.8 of | | | | Related-Response | this document | +-------------------+--------+-------------------+------------------+ | @query-params | Active | Request, |NameSection 2.3.9 of |Status|Reference(s)|+===================+========+================================+|@request-targetRelated-Response | this document | +-------------------+--------+-------------------+------------------+ | @status | Active | Response | Section2.3.12.3.10 | | | | | of this document |+-------------------+--------+--------------------------------++-------------------+--------+-------------------+------------------+ |@signature-params@request-response | Active | Section2.3.22.3.11 | | | | | of this document |+-------------------+--------+--------------------------------+| +-------------------+--------+-------------------+------------------+ Table5:4: Initial contents of the HTTP Signature SpecialtyContentComponent Identifiers Registry.6.7. Security Considerations (( TODO: need to dive deeper on this section; not sure how much of what's referenced below is actually applicable, or if it covers everything we need to worry about. )) (( TODO: Should provide some recommendations on how to determine whatcontent needscomponents need to be signed for a given use case. )) There are a number of security considerations to take into account when implementing or utilizing this specification. A thorough security analysis of this protocol, including its strengths and weaknesses, can be found in [WP-HTTP-Sig-Audit].7.8. References7.1.8.1. Normative References [FIPS186-4] "Digital Signature Standard (DSS)", 2013, <https://csrc.nist.gov/publications/detail/fips/186/4/ final>.[HTTP2] Belshe, M., Peon, R., and M. Thomson, Ed., "Hypertext Transfer Protocol Version 2 (HTTP/2)", RFC 7540, DOI 10.17487/RFC7540, May 2015, <https://www.rfc-editor.org/rfc/rfc7540>.[HTMLURL] "URL (Living Standard)", 2021, <https://url.spec.whatwg.org/>. [MESSAGING] Fielding,R., Ed.R. T., Nottingham, M., 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/rfc/rfc7230>."HTTP/1.1", Work in Progress, Internet-Draft, draft-ietf- httpbis-messaging-17, 25 July 2021, <https://datatracker.ietf.org/doc/html/draft-ietf-httpbis- messaging-17>. [POSIX.1] "The Open Group Base Specifications Issue 7, 2018 edition", 2018, <https://pubs.opengroup.org/onlinepubs/9699919799/>. [RFC2104] Krawczyk, H., Bellare, M., and R. Canetti, "HMAC: Keyed- Hashing for Message Authentication", RFC 2104, DOI 10.17487/RFC2104, February 1997, <https://www.rfc-editor.org/rfc/rfc2104>. [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/rfc/rfc2119>. [RFC3986] Berners-Lee, T., Fielding, R., and L. Masinter, "Uniform Resource Identifier (URI): Generic Syntax", STD 66, RFC 3986, DOI 10.17487/RFC3986, January 2005, <https://www.rfc-editor.org/rfc/rfc3986>. [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/rfc/rfc8174>. [RFC8792] Watsen, K., Auerswald, E., Farrel, A., and Q. Wu, "Handling Long Lines in Content of Internet-Drafts and RFCs", RFC 8792, DOI 10.17487/RFC8792, June 2020, <https://www.rfc-editor.org/rfc/rfc8792>. [RFC8941] Nottingham, M. and P-H. Kamp, "Structured Field Values for HTTP", RFC 8941, DOI 10.17487/RFC8941, February 2021, <https://www.rfc-editor.org/rfc/rfc8941>. [SEMANTICS] Fielding,R., Ed.R. T., Nottingham, M., 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/rfc/rfc7231>. 7.2."HTTP Semantics", Work in Progress, Internet-Draft, draft-ietf- httpbis-semantics-17, 25 July 2021, <https://datatracker.ietf.org/doc/html/draft-ietf-httpbis- semantics-17>. 8.2. Informative References [I-D.ietf-httpbis-client-cert-field] Campbell, B. and M. Bishop, "Client-Cert HTTP Header Field: Conveying Client Certificate Information from TLS Terminating Reverse Proxies to Origin Server Applications", Work in Progress, Internet-Draft, draft- ietf-httpbis-client-cert-field-00, 8 June 2021, <https://datatracker.ietf.org/doc/html/draft-ietf-httpbis- client-cert-field-00>. [RFC6234] Eastlake 3rd, D. and T. Hansen, "US Secure Hash Algorithms (SHA and SHA-based HMAC and HKDF)", RFC 6234, DOI 10.17487/RFC6234, May 2011, <https://www.rfc-editor.org/rfc/rfc6234>. [RFC7239] Petersson, A. and M. Nilsson, "Forwarded HTTP Extension", RFC 7239, DOI 10.17487/RFC7239, June 2014, <https://www.rfc-editor.org/rfc/rfc7239>. [RFC7517] Jones, M., "JSON Web Key (JWK)", RFC 7517, DOI 10.17487/RFC7517, May 2015, <https://www.rfc-editor.org/rfc/rfc7517>. [RFC7518] Jones, M., "JSON Web Algorithms (JWA)", RFC 7518, DOI 10.17487/RFC7518, May 2015, <https://www.rfc-editor.org/rfc/rfc7518>. [RFC8017] Moriarty, K., Ed., Kaliski, B., Jonsson, J., and A. Rusch, "PKCS #1: RSA Cryptography Specifications Version 2.2", RFC 8017, DOI 10.17487/RFC8017, November 2016, <https://www.rfc-editor.org/rfc/rfc8017>. [RFC8126] Cotton, M., Leiba, B., and T. Narten, "Guidelines for Writing an IANA Considerations Section in RFCs", BCP 26, RFC 8126, DOI 10.17487/RFC8126, June 2017, <https://www.rfc-editor.org/rfc/rfc8126>. [TLS] Rescorla, E., "The Transport Layer Security (TLS) Protocol Version 1.3", RFC 8446, DOI 10.17487/RFC8446, August 2018, <https://www.rfc-editor.org/rfc/rfc8446>. [WP-HTTP-Sig-Audit] "Security Considerations for HTTP Signatures", 2013, <https://web-payments.org/specs/source/http-signatures- audit/>. Appendix A. Detecting HTTP Message Signatures There have been many attempts to create signed HTTP messages in the past, including other non-standard definitions of the "Signature"headerfield used within this specification. It is recommended that developers wishing to support both this specification and other historical drafts do so carefully and deliberately, as incompatibilities between this specification and various versions of other drafts could lead to unexpected problems. It is recommended that implementers first detect and validate the "Signature-Input"headerfield defined in this specification to detect that this standard is in use and not an alternative. If the "Signature- Input"headerfield is present, all "Signature"headersfields can be parsed and interpreted in the context of this draft. Appendix B. Examples B.1. Example Keys This section provides cryptographic keys that are referenced in example signatures throughout this document. These keys MUST NOT be used for any purpose other than testing. The key identifiers for each key are used throughout the examples in this specification. It is assumed for these examples that the signer and verifier can unambiguously dereference all key identifiers used here, and that the keys and algorithms used are appropriate for the context in which the signature is presented. B.1.1. Example Key RSA test The following key is a 2048-bit RSA public and private key pair, referred to in this document as "test-key-rsa": -----BEGIN RSA PUBLIC KEY----- MIIBCgKCAQEAhAKYdtoeoy8zcAcR874L8cnZxKzAGwd7v36APp7Pv6Q2jdsPBRrw WEBnez6d0UDKDwGbc6nxfEXAy5mbhgajzrw3MOEt8uA5txSKobBpKDeBLOsdJKFq MGmXCQvEG7YemcxDTRPxAleIAgYYRjTSd/QBwVW9OwNFhekro3RtlinV0a75jfZg kne/YiktSvLG34lw2zqXBDTC5NHROUqGTlML4PlNZS5Ri2U4aCNx2rUPRcKIlE0P uKxI4T+HIaFpv8+rdV6eUgOrB2xeI1dSFFn/nnv5OoZJEIB+VmuKn3DCUcCZSFlQ PSXSfBDiUGhwOw76WuSSsf1D4b/vLoJ10wIDAQAB -----END RSA PUBLIC KEY----- -----BEGIN RSA PRIVATE KEY----- MIIEqAIBAAKCAQEAhAKYdtoeoy8zcAcR874L8cnZxKzAGwd7v36APp7Pv6Q2jdsP BRrwWEBnez6d0UDKDwGbc6nxfEXAy5mbhgajzrw3MOEt8uA5txSKobBpKDeBLOsd JKFqMGmXCQvEG7YemcxDTRPxAleIAgYYRjTSd/QBwVW9OwNFhekro3RtlinV0a75 jfZgkne/YiktSvLG34lw2zqXBDTC5NHROUqGTlML4PlNZS5Ri2U4aCNx2rUPRcKI lE0PuKxI4T+HIaFpv8+rdV6eUgOrB2xeI1dSFFn/nnv5OoZJEIB+VmuKn3DCUcCZ SFlQPSXSfBDiUGhwOw76WuSSsf1D4b/vLoJ10wIDAQABAoIBAG/JZuSWdoVHbi56 vjgCgkjg3lkO1KrO3nrdm6nrgA9P9qaPjxuKoWaKO1cBQlE1pSWp/cKncYgD5WxE CpAnRUXG2pG4zdkzCYzAh1i+c34L6oZoHsirK6oNcEnHveydfzJL5934egm6p8DW +m1RQ70yUt4uRc0YSor+q1LGJvGQHReF0WmJBZHrhz5e63Pq7lE0gIwuBqL8SMaA yRXtK+JGxZpImTq+NHvEWWCu09SCq0r838ceQI55SvzmTkwqtC+8AT2zFviMZkKR Qo6SPsrqItxZWRty2izawTF0Bf5S2VAx7O+6t3wBsQ1sLptoSgX3QblELY5asI0J YFz7LJECgYkAsqeUJmqXE3LP8tYoIjMIAKiTm9o6psPlc8CrLI9CH0UbuaA2JCOM cCNq8SyYbTqgnWlB9ZfcAm/cFpA8tYci9m5vYK8HNxQr+8FS3Qo8N9RJ8d0U5Csw DzMYfRghAfUGwmlWj5hp1pQzAuhwbOXFtxKHVsMPhz1IBtF9Y8jvgqgYHLbmyiu1 mwJ5AL0pYF0G7x81prlARURwHo0Yf52kEw1dxpx+JXER7hQRWQki5/NsUEtv+8RT qn2m6qte5DXLyn83b1qRscSdnCCwKtKWUug5q2ZbwVOCJCtmRwmnP131lWRYfj67 B/xJ1ZA6X3GEf4sNReNAtaucPEelgR2nsN0gKQKBiGoqHWbK1qYvBxX2X3kbPDkv 9C+celgZd2PW7aGYLCHq7nPbmfDV0yHcWjOhXZ8jRMjmANVR/eLQ2EfsRLdW69bn f3ZD7JS1fwGnO3exGmHO3HZG+6AvberKYVYNHahNFEw5TsAcQWDLRpkGybBcxqZo 81YCqlqidwfeO5YtlO7etx1xLyqa2NsCeG9A86UjG+aeNnXEIDk1PDK+EuiThIUa /2IxKzJKWl1BKr2d4xAfR0ZnEYuRrbeDQYgTImOlfW6/GuYIxKYgEKCFHFqJATAG IxHrq1PDOiSwXd2GmVVYyEmhZnbcp8CxaEMQoevxAta0ssMK3w6UsDtvUvYvF22m qQKBiD5GwESzsFPy3Ga0MvZpn3D6EJQLgsnrtUPZx+z2Ep2x0xc5orneB5fGyF1P WtP+fG5Q6Dpdz3LRfm+KwBCWFKQjg7uTxcjerhBWEYPmEMKYwTJF5PBG9/ddvHLQ EQeNC8fHGg4UXU8mhHnSBt3EA10qQJfRDs15M38eG2cYwB1PZpDHScDnDA0= -----END RSA PRIVATE KEY----- B.1.2. Example RSA PSS Key The following key is a 2048-bit RSA public and private key pair, referred to in this document as "test-key-rsa-pss": -----BEGIN PUBLIC KEY----- MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAr4tmm3r20Wd/PbqvP1s2 +QEtvpuRaV8Yq40gjUR8y2Rjxa6dpG2GXHbPfvMs8ct+Lh1GH45x28Rw3Ry53mm+ oAXjyQ86OnDkZ5N8lYbggD4O3w6M6pAvLkhk95AndTrifbIFPNU8PPMO7OyrFAHq gDsznjPFmTOtCEcN2Z1FpWgchwuYLPL+Wokqltd11nqqzi+bJ9cvSKADYdUAAN5W Utzdpiy6LbTgSxP7ociU4Tn0g5I6aDZJ7A8Lzo0KSyZYoA485mqcO0GVAdVw9lq4 aOT9v6d+nb4bnNkQVklLQ3fVAvJm+xdDOp9LCNCN48V2pnDOkFV6+U9nV5oyc6XI 2wIDAQAB -----END PUBLIC KEY----- -----BEGIN PRIVATE KEY----- MIIEvgIBADALBgkqhkiG9w0BAQoEggSqMIIEpgIBAAKCAQEAr4tmm3r20Wd/Pbqv P1s2+QEtvpuRaV8Yq40gjUR8y2Rjxa6dpG2GXHbPfvMs8ct+Lh1GH45x28Rw3Ry5 3mm+oAXjyQ86OnDkZ5N8lYbggD4O3w6M6pAvLkhk95AndTrifbIFPNU8PPMO7Oyr FAHqgDsznjPFmTOtCEcN2Z1FpWgchwuYLPL+Wokqltd11nqqzi+bJ9cvSKADYdUA AN5WUtzdpiy6LbTgSxP7ociU4Tn0g5I6aDZJ7A8Lzo0KSyZYoA485mqcO0GVAdVw 9lq4aOT9v6d+nb4bnNkQVklLQ3fVAvJm+xdDOp9LCNCN48V2pnDOkFV6+U9nV5oy c6XI2wIDAQABAoIBAQCUB8ip+kJiiZVKF8AqfB/aUP0jTAqOQewK1kKJ/iQCXBCq pbo360gvdt05H5VZ/RDVkEgO2k73VSsbulqezKs8RFs2tEmU+JgTI9MeQJPWcP6X aKy6LIYs0E2cWgp8GADgoBs8llBq0UhX0KffglIeek3n7Z6Gt4YFge2TAcW2WbN4 XfK7lupFyo6HHyWRiYHMMARQXLJeOSdTn5aMBP0PO4bQyk5ORxTUSeOciPJUFktQ HkvGbym7KryEfwH8Tks0L7WhzyP60PL3xS9FNOJi9m+zztwYIXGDQuKM2GDsITeD 2mI2oHoPMyAD0wdI7BwSVW18p1h+jgfc4dlexKYRAoGBAOVfuiEiOchGghV5vn5N RDNscAFnpHj1QgMr6/UG05RTgmcLfVsI1I4bSkbrIuVKviGGf7atlkROALOG/xRx DLadgBEeNyHL5lz6ihQaFJLVQ0u3U4SB67J0YtVO3R6lXcIjBDHuY8SjYJ7Ci6Z6 vuDcoaEujnlrtUhaMxvSfcUJAoGBAMPsCHXte1uWNAqYad2WdLjPDlKtQJK1diCm rqmB2g8QE99hDOHItjDBEdpyFBKOIP+NpVtM2KLhRajjcL9Ph8jrID6XUqikQuVi 4J9FV2m42jXMuioTT13idAILanYg8D3idvy/3isDVkON0X3UAVKrgMEne0hJpkPL FYqgetvDAoGBAKLQ6JZMbSe0pPIJkSamQhsehgL5Rs51iX4m1z7+sYFAJfhvN3Q/ OGIHDRp6HjMUcxHpHw7U+S1TETxePwKLnLKj6hw8jnX2/nZRgWHzgVcY+sPsReRx NJVf+Cfh6yOtznfX00p+JWOXdSY8glSSHJwRAMog+hFGW1AYdt7w80XBAoGBAImR NUugqapgaEA8TrFxkJmngXYaAqpA0iYRA7kv3S4QavPBUGtFJHBNULzitydkNtVZ 3w6hgce0h9YThTo/nKc+OZDZbgfN9s7cQ75x0PQCAO4fx2P91Q+mDzDUVTeG30mE t2m3S0dGe47JiJxifV9P3wNBNrZGSIF3mrORBVNDAoGBAI0QKn2Iv7Sgo4T/XjND dl2kZTXqGAk8dOhpUiw/HdM3OGWbhHj2NdCzBliOmPyQtAr770GITWvbAI+IRYyF S7Fnk6ZVVVHsxjtaHy1uJGFlaZzKR4AGNaUTOJMs6NadzCmGPAxNQQOCqoUjn4XR rOjr9w349JooGXhOxbu8nOxX -----END PRIVATE KEY----- B.1.3. Example ECC P-256 Test Key The following key is an elliptical curve key over the curve P-256, referred to in this document as "test-key-ecc-p256". -----BEGIN EC PRIVATE KEY----- MHcCAQEEIFKbhfNZfpDsW43+0+JjUr9K+bTeuxopu653+hBaXGA7oAoGCCqGSM49 AwEHoUQDQgAEqIVYZVLCrPZHGHjP17CTW0/+D9Lfw0EkjqF7xB4FivAxzic30tMM 4GF+hR6Dxh71Z50VGGdldkkDXZCnTNnoXQ== -----END EC PRIVATE KEY----- -----BEGIN PUBLIC KEY----- MFkwEwYHKoZIzj0CAQYIKoZIzj0DAQcDQgAEqIVYZVLCrPZHGHjP17CTW0/+D9Lf w0EkjqF7xB4FivAxzic30tMM4GF+hR6Dxh71Z50VGGdldkkDXZCnTNnoXQ== -----END PUBLIC KEY----- B.1.4. Example Shared Secret The following shared secret is 64 randomly-generated bytes encoded in Base64, referred to in this document as "test-shared-secret". NOTE: '\' line wrapping per RFC 8792 uzvJfB4u3N0Jy4T7NZ75MDVcr8zSTInedJtkgcu46YW4XByzNJjxBdtjUkdJPBt\ bmHhIDi6pcl8jsasjlTMtDQ== B.2. Test Cases This section provides non-normative examples thatmaymay be used as test cases to validate implementation correctness. These examples are based on the following HTTP messages: For requests, this "test-request" message is used: POST /foo?param=value&pet=dog HTTP/1.1 Host: example.com Date: Tue, 20 Apr 2021 02:07:55 GMT Content-Type: application/json Digest: SHA-256=X48E9qOokqqrvdts8nOJRJN3OWDUoyWxBf7kbu9DBPE= Content-Length: 18 {"hello": "world"} For responses, this "test-response" message is used: HTTP/1.1 200 OK Date: Tue, 20 Apr 2021 02:07:56 GMT Content-Type: application/json Digest: SHA-256=X48E9qOokqqrvdts8nOJRJN3OWDUoyWxBf7kbu9DBPE= Content-Length: 18 {"hello": "world"} B.2.1. Minimal Signature Using rsa-pss-sha512 This example presents a minimal "Signature-Input" and "Signature" header for a signature using the "rsa-pss-sha512" algorithm over "test-request", covering none of the components of the HTTP message request but providing a timestamped signature proof of possession of the key. The corresponding signature input is: NOTE: '\' line wrapping per RFC 8792 "@signature-params": ();created=1618884475\ ;keyid="test-key-rsa-pss";alg="rsa-pss-sha512" This results in the following "Signature-Input" and "Signature" headers being added to the message: NOTE: '\' line wrapping per RFC 8792 Signature-Input: sig1=();created=1618884475\ ;keyid="test-key-rsa-pss";alg="rsa-pss-sha512" Signature: sig1=:HWP69ZNiom9Obu1KIdqPPcu/C1a5ZUMBbqS/xwJECV8bhIQVmE\ AAAzz8LQPvtP1iFSxxluDO1KE9b8L+O64LEOvhwYdDctV5+E39Jy1eJiD7nYREBgx\ TpdUfzTO+Trath0vZdTylFlxK4H3l3s/cuFhnOCxmFYgEa+cw+StBRgY1JtafSFwN\ cZgLxVwialuH5VnqJS4JN8PHD91XLfkjMscTo4jmVMpFd3iLVe0hqVFl7MDt6TMkw\ IyVFnEZ7B/VIQofdShO+C/7MuupCSLVjQz5xA+Zs6Hw+W9ESD/6BuGs6LF1TcKLxW\ +5K+2zvDY/Cia34HNpRW5io7Iv9/b7iQ==: Note that since the covered components list is empty, this signature could beused as test casesapplied by an attacker tovalidate implementation correctness. These examples are based on the followingan unrelated HTTPmessages: For requests, this "test-request" messagemessage. Therefore, use of an empty covered components set isused: POST /foo?param=value&pet=dog HTTP/1.1 Host:discouraged. B.2.2. Selective Covered Components using rsa-pss-sha512 This example covers additional components in "test-request" using the "rsa-pss-sha512" algorithm. The corresponding signature input is: NOTE: '\' line wrapping per RFC 8792 "@authority": example.comDate: Tue, 20 Apr 2021 02:07:55 GMT Content-Type:"content-type": application/jsonDigest: SHA-256=X48E9qOokqqrvdts8nOJRJN3OWDUoyWxBf7kbu9DBPE= Content-Length: 18 {"hello": "world"} For responses, this "test-response""@signature-params": ("@authority" "content-type")\ ;created=1618884475;keyid="test-key-rsa-pss" This results in the following "Signature-Input" and "Signature" headers being added to the message: NOTE: '\' line wrapping per RFC 8792 Signature-Input: sig1=("@authority" "content-type")\ ;created=1618884475;keyid="test-key-rsa-pss" Signature: sig1=:ik+OtGmM/kFqENDf9Plm8AmPtqtC7C9a+zYSaxr58b/E6h81gh\ JS3PcH+m1asiMp8yvccnO/RfaexnqanVB3C72WRNZN7skPTJmUVmoIeqZncdP2mlf\ xlLP6UbkrgYsk91NS6nwkKC6RRgLhBFqzP42oq8D2336OiQPDAo/04SxZt4Wx9nDG\ uy2SfZJUhsJqZyEWRk4204x7YEB3VxDAAlVgGt8ewilWbIKKTOKp3ymUeQIwptqYw\ v0l8mN404PPzRBTpB7+HpClyK4CNp+SVv46+6sHMfJU4taz10s/NoYRmYCGXyadzY\ YDj0BYnFdERB6NblI/AOWFGl5Axhhmjg==: B.2.3. Full Coverage using rsa-pss-sha512 This example covers all headers in "test-request" (including the messageis used: HTTP/1.1 200 OK Date:body "Digest") plus various elements of the control data, using the "rsa-pss-sha512" algorithm. The corresponding signature input is: NOTE: '\' line wrapping per RFC 8792 "date": Tue, 20 Apr 2021 02:07:56 GMTContent-Type:"@method": POST "@path": /foo "@query": ?param=value&pet=dog "@authority": example.com "content-type": application/jsonDigest:"digest": SHA-256=X48E9qOokqqrvdts8nOJRJN3OWDUoyWxBf7kbu9DBPE=Content-Length:"content-length": 18{"hello": "world"} B.2.1. Minimal Signature Header using rsa-pss-sha512"@signature-params": ("date" "@method" "@path" "@query" \ "@authority" "content-type" "digest" "content-length")\ ;created=1618884475;keyid="test-key-rsa-pss" Thisexample presents a minimalresults in the following "Signature-Input" and "Signature" headers being added to the message: NOTE: '\' line wrapping per RFC 8792 Signature-Input: sig1=("date" "@method" "@path" "@query" \ "@authority" "content-type" "digest" "content-length")\ ;created=1618884475;keyid="test-key-rsa-pss" Signature: sig1=:JuJnJMFGD4HMysAGsfOY6N5ZTZUknsQUdClNG51VezDgPUOW03\ QMe74vbIdndKwW1BBrHOHR3NzKGYZJ7X3ur23FMCdANe4VmKb3Rc1Q/5YxOO8p7Ko\ yfVa4uUcMk5jB9KAn1M1MbgBnqwZkRWsbv8ocCqrnD85Kavr73lx51k1/gU8w673W\ T/oBtxPtAn1eFjUyIKyA+XD7kYph82I+ahvm0pSgDPagu917SlqUjeaQaNnlZzO03\ Iy1RZ5XpgbNeDLCqSLuZFVID80EohC2CQ1cL5svjslrlCNstd2JCLmhjL7xV3NYXe\ rLim4bqUQGRgDwNJRnqobpS6C1NBns/Q==: Note in this example that the value of the "Date" headerfor aand the value of the "created" signatureusingparameter need not be the same. This is due to the fact that the "Date" header is added when creating the HTTP Message and the "created" parameter is populated when creating the signature over that message, and these two times could vary. If the"rsa-pss-sha512" algorithm over "test-request", covering none of"Date" header is covered by thecontentsignature, it is up to the verifier to determine whether its value has to match that of theHTTP message request but providing"created" parameter or not. B.2.4. Signing atimestamped signature proof of possessionResponse using ecdsa-p256-sha256 This example covers portions of thekey."test-response" response message using the "ecdsa-p256-sha256" algorithm and the key "test-key-ecc- p256". The corresponding signature input is: NOTE: '\' line wrapping per RFC 8792 "content-type": application/json "digest": SHA-256=X48E9qOokqqrvdts8nOJRJN3OWDUoyWxBf7kbu9DBPE= "content-length": 18 "@signature-params":();created=1618884475\ ;keyid="test-key-rsa-pss";alg="rsa-pss-sha512"("content-type" "digest" "content-length")\ ;created=1618884475;keyid="test-key-ecc-p256" This results in the following "Signature-Input" and "Signature" headers being added to the message: NOTE: '\' line wrapping per RFC 8792 Signature-Input:sig1=();created=1618884475\ ;keyid="test-key-rsa-pss";alg="rsa-pss-sha512"sig1=("content-type" "digest" "content-length")\ ;created=1618884475;keyid="test-key-ecc-p256" Signature:sig1=:VrfdC2KEFFLoGMYTbQz4PSlKat4hAxcr5XkVN7Mm/7OQQJG+uX\ gOez7kA6n/yTCaR1VL+FmJd2IVFCsUfcc/jO9siZK3siadoK1Dfgp2ieh9eO781ty\ SS70OwvAkdORuQLWDnaDMRDlQhg5sNP6JaQghFLqD4qgFrM9HMPxLrznhAQugJ0Fd\ RZLtSpnjECW6qsu2PVRoCYfnwe4gu8TfqH5GDx2SkpCF9BQ8CijuIWlOg7QP73tKt\ QNp65u14Si9VEVXHWGiLw4blyPLzWz/fqJbdLaq94Ep60Nq8WjYEAInYH6KyV7EAD\ 60LXdspwF50R3dkWXJP/x+gkAHSMsxbg==: B.2.2. Header Coveragesig1=:n8RKXkj0iseWDmC6PNSQ1GX2R9650v+lhbb6rTGoSrSSx18zmn\ 6fPOtBx48/WffYLO0n1RHHf9scvNGAgGq52Q==: B.2.5. Signing a Request usingrsa-pss-sha512hmac-sha256 This example coversallportions of thespecified headers in"test-request"except for the body digest headerusing the"rsa-pss-sha512" algorithm."hmac- sha256" algorithm and the secret "test-shared-secret". The corresponding signature input is:"host":NOTE: '\' line wrapping per RFC 8792 "@authority": example.com "date": Tue, 20 Apr 2021 02:07:55 GMT "content-type": application/json "@signature-params":("host"("@authority" "date" "content-type")\;created=1618884475;keyid="test-key-rsa-pss";created=1618884475;keyid="test-shared-secret" This results in the following "Signature-Input" and "Signature" headers being added to the message: NOTE: '\' line wrapping per RFC 8792 Signature-Input:sig1=("host"sig1=("@authority" "date" "content-type")\;created=1618884475;keyid="test-key-rsa-pss";created=1618884475;keyid="test-shared-secret" Signature:sig1=:Zu48JBrHlXN+hVj3T5fPQUjMNEEhABM5vNmiWuUUl7BWNid5Rz\ OH1tEjVi+jObYkYT8p09lZ2hrNuU3xm+JUBT8WNIlopJtt0EzxFnjGlHvkhu3KbJf\ xNlvCJVlOEdR4AivDLMeK/ZgASpZ7py1UNHJqRyGCYkYpeedinXUertL/ySNp+VbK\ 2O/qCoui2jFgff2kXQd6rjL1Up83Fpr+/KoZ6HQkv3qwBdMBDyHQykfZHhLn4AO1I\ G+vKhOLJQDfaLsJ/fYfzsgc1s46j3GpPPD/W2nEEtdhNwu7oXq81qVRsENChIu1XI\ FKR9q7WpyHDKEWTtaNZDS8TFvIQRU22w==: B.2.3. Full Coverage using rsa-pss-sha512 This example covers all headerssig1=:fN3AMNGbx0V/cIEKkZOvLOoC3InI+lM2+gTv22x3ia8=: B.3. TLS-Terminating Proxies In this example, there is a TLS-terminating reverse proxy sitting in"test-request" plusfront of the resource. The client does not sign the requesttargetbut instead uses mutual TLS to make its call. The terminating proxy validates the TLS stream andmessage body digest usinginjects a "Client-Cert" header according to [I-D.ietf-httpbis-client-cert-field]. By signing this header field, a reverse proxy can not only attest to its own validation of the"rsa-pss-sha512" algorithm.initial request but also authenticate itself to the backend system independently of the client's actions. Thecorresponding signature input is: "@request-target": post /foo?param=value&pet=dog "host":client makes the following request to the TLS terminating proxy using mutual TLS: POST /foo?Param=value&pet=Dog HTTP/1.1 Host: example.com"date":Date: Tue, 20 Apr 2021 02:07:55 GMT Content-Type: application/json Content-Length: 18 {"hello": "world"} The proxy processes the TLS connection and extracts the client's TLS certificate to a "Client-Cert" header field and passes it along to the internal service hosted at "service.internal.example". This results in the following unsigned request: NOTE: '\' line wrapping per RFC 8792 POST /foo?Param=value&pet=Dog HTTP/1.1 Host: service.internal.example Date: Tue, 20 Apr 2021 02:07:55 GMT"content-type":Content-Type: application/json"digest": SHA-256=X48E9qOokqqrvdts8nOJRJN3OWDUoyWxBf7kbu9DBPE= "content-length":Content-Length: 18"@signature-params": ("@request-target" "host" "date" \ "content-type" "digest" "content-length");created=1618884475\ ;keyid="test-key-rsa-pss" This results inClient-Cert: :MIIBqDCCAU6gAwIBAgIBBzAKBggqhkjOPQQDAjA6MRswGQYDVQQKD\ BJMZXQncyBBdXRoZW50aWNhdGUxGzAZBgNVBAMMEkxBIEludGVybWVkaWF0ZSBDQT\ AeFw0yMDAxMTQyMjU1MzNaFw0yMTAxMjMyMjU1MzNaMA0xCzAJBgNVBAMMAkJDMFk\ wEwYHKoZIzj0CAQYIKoZIzj0DAQcDQgAE8YnXXfaUgmnMtOXU/IncWalRhebrXmck\ C8vdgJ1p5Be5F/3YC8OthxM4+k1M6aEAEFcGzkJiNy6J84y7uzo9M6NyMHAwCQYDV\ R0TBAIwADAfBgNVHSMEGDAWgBRm3WjLa38lbEYCuiCPct0ZaSED2DAOBgNVHQ8BAf\ 8EBAMCBsAwEwYDVR0lBAwwCgYIKwYBBQUHAwIwHQYDVR0RAQH/BBMwEYEPYmRjQGV\ 4YW1wbGUuY29tMAoGCCqGSM49BAMCA0gAMEUCIBHda/r1vaL6G3VliL4/Di6YK0Q6\ bMjeSkC3dFCOOB8TAiEAx/kHSB4urmiZ0NX5r5XarmPk0wmuydBVoU4hBVZ1yhk=: {"hello": "world"} Without a signature, thefollowing "Signature-Input" and "Signature" headers being addedinternal service would need to trust that themessage: Signature-Input: sig1=("@request-target" "host" "date" \ "content-type" "digest" "content-length");created=1618884475\ ;keyid="test-key-rsa-pss" Signature: \ sig1=:iD5NhkJoGSuuTpWMzS0BI47DfbWwsGmHHLTwOxT0n+0cQFSC+1c26B7IOfI\ RTYofqD0sfYYrnSwCvWJfA1zthAEv9J1CxS/CZXe7CQvFpuKuFJxMpkAzVYdE/TA6\ fELxNZy9RJEWZUPBU4+aJ26d8PC0XhPObXe6JkP6/C7XvG2QinsDde7rduMdhFN/H\ j2MuX1Ipzvv4EgbHJdKwmWRNamfmKJZC4U5Tn0F58lzGF+WIpU73V67/6aSGvJGM5\ 7U9bRHrBB7ExuQhOX2J2dvJMYkE33pEJA70XBUp9ZvciTI+vjIUgUQ2oRww3huWML\ mMMqEc95CliwIoL5aBdCnlQ==: B.2.4. Signing a Response using ecdsa-p256-sha256 This example coversincoming connection has the right information. By signing the "Client-Cert" header and other portions of the"test-response" response message usinginternal request, the"ecdsa-p256-sha256" algorithminternal service can be assured that the correct party, the trusted proxy, has processed the request and presented it to thekey "test-key-ecc- p256".correct service. Thecorrespondingproxy's signature inputis: "date": Tue, 20 Apr 2021 02:07:56 GMT "content-type": application/json "digest": SHA-256=X48E9qOokqqrvdts8nOJRJN3OWDUoyWxBf7kbu9DBPE= "content-length": 18consists of the following: NOTE: '\' line wrapping per RFC 8792 "@path": /foo "@query": Param=value&pet=Dog "@method": POST "@authority": service.internal.example "client-cert": :MIIBqDCCAU6gAwIBAgIBBzAKBggqhkjOPQQDAjA6MRswGQYDVQQ\ KDBJMZXQncyBBdXRoZW50aWNhdGUxGzAZBgNVBAMMEkxBIEludGVybWVkaWF0ZSBD\ QTAeFw0yMDAxMTQyMjU1MzNaFw0yMTAxMjMyMjU1MzNaMA0xCzAJBgNVBAMMAkJDM\ FkwEwYHKoZIzj0CAQYIKoZIzj0DAQcDQgAE8YnXXfaUgmnMtOXU/IncWalRhebrXm\ ckC8vdgJ1p5Be5F/3YC8OthxM4+k1M6aEAEFcGzkJiNy6J84y7uzo9M6NyMHAwCQY\ DVR0TBAIwADAfBgNVHSMEGDAWgBRm3WjLa38lbEYCuiCPct0ZaSED2DAOBgNVHQ8B\ Af8EBAMCBsAwEwYDVR0lBAwwCgYIKwYBBQUHAwIwHQYDVR0RAQH/BBMwEYEPYmRjQ\ GV4YW1wbGUuY29tMAoGCCqGSM49BAMCA0gAMEUCIBHda/r1vaL6G3VliL4/Di6YK0\ Q6bMjeSkC3dFCOOB8TAiEAx/kHSB4urmiZ0NX5r5XarmPk0wmuydBVoU4hBVZ1yhk=: "@signature-params":("date" "content-type" "digest"("@path" "@query" "@method" "@authority" \"content-length");created=1618884475;keyid="test-key-ecc-p256""client-cert");created=1618884475;keyid="test-key-ecc-p256" This results in the following"Signature-Input" and "Signature" headers being added to the message: Signature-Input: sig1=("date" "content-type" "digest" \ "content-length");created=1618884475;keyid="test-key-ecc-p256" Signature: \ sig1=:3zmRDW6r50/RETqqhtx/N5sdd5eTh8xmHdsrYRK9wK4rCNEwLjCOBlcQxTL\ 2oJTCWGRkuqE2r9KyqZFY9jd+NQ==: B.2.5. Signing a Request using hmac-sha256 This example covers portions ofsignature: NOTE: '\' line wrapping per RFC 8792 5gudRjXaHrAYbEaQUOoY9TuvqWOdPcspkp7YyKCB0XhyAG9cB715hucPPanEK0OVyiN\ LJqcoq2Yn1DPWQcnbog== Which results in the"test-request" usingfollowing signed request sent from the"hmac- sha256" algorithm andproxy to thesecret "test-shared-secret". The corresponding signature input is: "host": example.com "date":internal service: NOTE: '\' line wrapping per RFC 8792 POST /foo?Param=value&pet=Dog HTTP/1.1 Host: service.internal.example Date: Tue, 20 Apr 2021 02:07:55 GMT"content-type":Content-Type: application/json"@signature-params": ("host" "date" "content-type")\ ;created=1618884475;keyid="test-shared-secret" This results inContent-Length: 18 Client-Cert: :MIIBqDCCAU6gAwIBAgIBBzAKBggqhkjOPQQDAjA6MRswGQYDVQQKD\ BJMZXQncyBBdXRoZW50aWNhdGUxGzAZBgNVBAMMEkxBIEludGVybWVkaWF0ZSBDQT\ AeFw0yMDAxMTQyMjU1MzNaFw0yMTAxMjMyMjU1MzNaMA0xCzAJBgNVBAMMAkJDMFk\ wEwYHKoZIzj0CAQYIKoZIzj0DAQcDQgAE8YnXXfaUgmnMtOXU/IncWalRhebrXmck\ C8vdgJ1p5Be5F/3YC8OthxM4+k1M6aEAEFcGzkJiNy6J84y7uzo9M6NyMHAwCQYDV\ R0TBAIwADAfBgNVHSMEGDAWgBRm3WjLa38lbEYCuiCPct0ZaSED2DAOBgNVHQ8BAf\ 8EBAMCBsAwEwYDVR0lBAwwCgYIKwYBBQUHAwIwHQYDVR0RAQH/BBMwEYEPYmRjQGV\ 4YW1wbGUuY29tMAoGCCqGSM49BAMCA0gAMEUCIBHda/r1vaL6G3VliL4/Di6YK0Q6\ bMjeSkC3dFCOOB8TAiEAx/kHSB4urmiZ0NX5r5XarmPk0wmuydBVoU4hBVZ1yhk=: Signature-Input: ttrp=("@path" "@query" "@method" "@authority" \ "client-cert");created=1618884475;keyid="test-key-ecc-p256" Signature: ttrp=:5gudRjXaHrAYbEaQUOoY9TuvqWOdPcspkp7YyKCB0XhyAG9cB7\ 15hucPPanEK0OVyiNLJqcoq2Yn1DPWQcnbog==: {"hello": "world"} The internal service can validate thefollowing "Signature-Input"proxy's signature and"Signature" headers being addedtherefore be able to trust that themessage: Signature-Input: sig1=("host" "date" "content-type")\ ;created=1618884475;keyid="test-shared-secret" Signature: sig1=:x54VEvVOb0TMw8fUbsWdUHqqqOre+K7sB/LqHQvnfaQ=:client's certificate has been appropriately processed. Acknowledgements This specification was initially based on the draft-cavage-http- signatures internet draft. The editors would like to thank the authors of that draft, Mark Cavage and Manu Sporny, for their work on that draft and their continuing contributions. The editors would also like to thank the following individuals for feedback, insight, and implementation of this draft and its predecessors (in alphabetical order): Mark Adamcin, Mark Allen, Paul Annesley, Karl Boehlmark, Stephane Bortzmeyer, Sarven Capadisli, Liam Dennehy, ductm54, Stephen Farrell, Phillip Hallam-Baker, Eric Holmes, Andrey Kislyuk, Adam Knight, Dave Lehn, Dave Longley, Ilari Liusvaara, James H. Manger, Kathleen Moriarty, Mark Nottingham, Yoav Nir, Adrian Palmer, Lucas Pardue, Roberto Polli, Julian Reschke, Michael Richardson, Wojciech Rygielski, Adam Scarr, Cory J. Slep, Dirk Stein, Henry Story, Lukasz Szewc, Chris Webber, and Jeffrey Yasskin. Document History _RFC EDITOR: please remove this section before publication_ * draft-ietf-httpbis-message-signatures - -06 o Updated language for message components, including identifiers and values. o Clarified that Signature-Input and Signature are fields which can be used as headers or trailers. o Add "Accept-Signature" field and semantics for signature negotiation. o Define new specialty content identifiers, re-defined request-target identifier. o Added request-response binding. - -05 o Remove list prefixes. o Clarify signature algorithm parameters. o Update and fix examples. o Add examples for ECC and HMAC. - -04 o Moved signature component definitions up to intro. o Created formal function definitions for algorithms to fulfill. o Updated all examples. o Added nonce parameter field. - -03 o Clarified signing and verification processes. o Updated algorithm and key selection method. o Clearly defined core algorithm set. o Defined JOSE signature mapping process. o Removed legacy signature methods. o Define signature parameters separately from "signature" object model. o Define serialization values for signature-input header based on signature input. - -02 o Removed editorial comments on document sources. o Removed in-document issues list in favor of tracked issues. o Replaced unstructured "Signature" header with "Signature- Input" and "Signature" Dictionary Structured Header Fields. o Defined content identifiers for individual Dictionary members, e.g., ""x-dictionary-field";key=member-name". o Defined content identifiers for first N members of a List, e.g., ""x-list-field":prefix=4". o Fixed up examples. o Updated introduction now that it's adopted. o Defined specialty content identifiers and a means to extend them. o Required signature parameters to be included in signature. o Added guidance on backwards compatibility, detection, and use of signature methods. - -01 o Strengthened requirement for content identifiers for header fields to be lower-case (changed from SHOULD to MUST). o Added real example values for Creation Time and Expiration Time. o Minor editorial corrections and readability improvements. - -00 o Initialized from draft-richanna-http-message-signatures-00, following adoption by the working group. * draft-richanna-http-message-signatures - -00 o Converted to xml2rfc v3 and reformatted to comply with RFC style guides. o Removed Signature auth-scheme definition and related content. o Removed conflicting normative requirements for use of algorithm parameter. Now MUST NOT be relied upon. o Removed Extensions appendix. o Rewrote abstract and introduction to explain context and need, and challenges inherent in signing HTTP messages. o Rewrote and heavily expanded algorithm definition, retaining normative requirements. o Added definitions for key terms, referenced RFC 7230 for HTTP terms. o Added examples for canonicalization and signature generation steps. o Rewrote Signature header definition, retaining normative requirements. o Added default values for algorithm and expires parameters. o Rewrote HTTP Signature Algorithms registry definition. Added change control policy and registry template. Removed suggested URI. o Added IANA HTTP Signature Parameter registry. o Added additional normative and informative references. o Added Topics for Working Group Discussion section, to be removed prior to publication as an RFC. Authors' Addresses Annabelle Backman (editor) Amazon P.O. Box 81226 Seattle, WA 98108-1226 United States of America Email: richanna@amazon.com URI: https://www.amazon.com/ Justin Richer Bespoke Engineering Email: ietf@justin.richer.org URI: https://bspk.io/ Manu Sporny Digital Bazaar 203 Roanoke Street W. Blacksburg, VA 24060 United States of America Email: msporny@digitalbazaar.com URI: https://manu.sporny.org/