Skip to content
IAM Insights

Briefing · Article · source · published · Boston Identity

A valid RFC 9421 signature does not prove who signed; key and algorithm checks are left to each profile

RFC 9421, published in February 2024 and edited by Annabelle Backman and Justin Richer with Manu Sporny, is the IETF standard for signing chosen parts of an HTTP message so integrity holds past the TLS connection that ends at a proxy. It leaves which keys to trust, which parts must be signed and how fresh a signature must be to each application, and it warns that a valid signature alone does not show the right party signed. With a shared HMAC key, the verifier itself could produce the signer's signature.

RFC Editor · Annabelle Backman, Justin Richer, Manu Sporny · February 1, 2024 · read

share
31,946 words.
01

What's happening

Finding3
BI-FIND-2024-0054Lead finding

RFC 9421 lets a verifier check that named parts of an HTTP message were signed with a given key, and leaves who holds it, and trust in it, to the application.

RFC 9421 lets a verifier check that named parts of an HTTP message were signed with a given key, and leaves who holds that key, and whether to trust it, to the application. The RFC says an application or profile MUST specify which message components must be covered, how to retrieve the key material, which algorithms are allowed and what errors to return; the keyid parameter names a key, and the application defines how to resolve it. A verifier MUST fail when the key is one it does not know or trust for the request, and the security considerations say to accept only signatures from expected signers, "regardless of the cryptographic validity of the signature itself." A valid signature is "not sufficient to prove that the message has been signed by the appropriate party": the verifier needs to check that the key and algorithm are right for the message, or an attacker can swap in a signature made with their own key or downgrade the algorithm, for example to an HMAC keyed with the public RSA key. With symmetric algorithms such as HMAC, the verifier holds the same key and can generate a valid signature itself, so the RFC says asymmetric methods should be used where possible.

high confidencebest source: independent researchobserved Feb 2024EvidenceSection 1Section 3Security and privacy considerations
flag a problem with BI-FIND-2024-0054
Figure steps
  1. The client signs its request as sig1, covering the method, authority, path and content digest with its own key.
  2. The reverse proxy validates sig1, then changes the Host and adds a Forwarded field before passing the request on.
  3. The proxy adds proxy_sig, made with its own key over the message it forwards, and passes sig1 along unchanged.
  4. The proxy's signature does not cover sig1's value. The RFC marks signing a signature NOT RECOMMENDED, because it gives no transitive coverage.
Fig. 1

The proxy vouches for the message it forwards with its own key; the client's signature rides along, and the proxy's signature does not cover it.

Drawn from the RFC's own reverse-proxy example (Section 4.3)Source dated February 1, 2024Passage: Section 3

Swipe for the full figure →

BI-FIND-2024-0055

An RFC 9421 signature protects only the parts of a message the signer chose to cover, and the RFC leaves two gaps, the body and freshness, to the profile.

An RFC 9421 signature protects only the parts of the message the signer chose to cover, and the RFC leaves two gaps to the profile. The body is not signed directly: it is covered through a Content-Digest field (RFC 9530), and the RFC says it is important that the verifier also checks that digest against the content it received, because "checking only the signature is not sufficient protection against such a substitution attack." Freshness is optional too. The created timestamp is RECOMMENDED rather than required, expires is only a hint from the signer, and replay defence rests on covering enough of the message plus an optional nonce.

high confidencebest source: independent researchobserved Feb 2024EvidenceSection 1Message components and the signature baseSecurity and privacy considerations
flag a problem with BI-FIND-2024-0055
BI-FIND-2024-0056

In the RFC's worked example, a reverse proxy signs the forwarded message with its own key, and the proxy's signature does not cover the client's.

Several signatures can sit on one message under different labels, and the RFC's worked example has a reverse proxy validate the client's signature, change the Host, add a Forwarded field and then sign the forwarded message with its own key and a short expiry. The proxy's signature does not cover the client's. Section 4.3 opens by mentioning a proxy signing over the client's original signature values, but the RFC then marks that practice NOT RECOMMENDED, because a signature over a signature does not transitively cover what the first signer signed (it cites Jackson et al., 2019). An application that needs to signal that a signature was validated "would need to carefully specify alternative mechanisms", and a verifier facing several signatures has to account for every signer.

high confidencebest source: independent researchobserved Feb 2024EvidenceSection 3Security and privacy considerations
flag a problem with BI-FIND-2024-0056
02

Section by section

5

showing 5 of 5

[1]

Why TLS is not enough, and what an application must specify

Standards

The RFC argues that TLS protects integrity only over a single connection, so end-to-end integrity across gateways, proxies and libraries needs a detached signature over chosen message components. It lists what an application profile MUST specify, from covered components and key lookup to allowed algorithms and errors. It calls itself only part of a security system and leaves message content to the Digest fields.

technical artifactfrom published text

[2]

Message components and the signature base

Standards

The RFC defines component identifiers: lowercased field names plus derived components such as @method, @authority, @path, @query-param and @status. Parameters (sf, key, bs, tr, req) adjust how a value is read, and the canonical signature base ends in @signature-params. The req parameter binds a response to its request, and the requester then has to keep the request values until it checks the response.

technical artifactfrom published text

[3]

Creating and verifying signatures, carrying them, requesting them

Standards

The signing and verifying steps come with six algorithms (RSA-PSS, RSA v1.5, HMAC, ECDSA P-256 and P-384, Ed25519) plus JWS algorithms, never none. Signatures travel in the Signature-Input and Signature fields under labels, so one message can carry several, as in the example of a client and a reverse proxy. Accept-Signature lets one side ask the other to sign.

technical artifactfrom published text

[4]

IANA registries (algorithms, parameters, component names)

Standards

The RFC registers Signature-Input, Signature and Accept-Signature as HTTP fields and creates four registries: signature algorithms, metadata parameters, derived component names and component parameters. New entries need Specification Required, and the six algorithms from section 3.3 start out Active.

technical artifactfrom published text

[5]

Security and privacy considerations

Standards

The security section walks through skipped verification, thin coverage, replay, confusion between several signatures, an unchecked Content-Digest, key theft, impersonation with a shared symmetric key, algorithm downgrade, canonicalization tricks and signing signature values, citing a 2019 attack study by Jackson et al. On privacy, it warns that a reused key lets verifiers track a signer, and that signatures give no confidentiality.

technical artifactfrom published text

Terms used

HTTP Message Signatures
An IETF standard (RFC 9421) for cryptographically signing parts of an HTTP request or response, so a receiver can verify who sent it and that it was not altered in transit — an application-layer alternative to relying on TLS alone.
IETF
The body that writes the internet's protocol standards, including OAuth, JWT, and the workload-identity work known as WIMSE.
HTTP
Hypertext Transfer Protocol: the request-and-response protocol of the web, in which a client sends a method such as GET or POST to a URL and receives a status code and body.
TLS
Transport Layer Security, the protocol that encrypts traffic between two systems and lets each check the other's certificate. Mutual TLS (mTLS) makes both sides prove who they are, which is how many workload identity schemes authenticate services.
HMAC
Hash-based message authentication code (HMAC): a keyed hash that proves a message came from someone holding a shared secret; both sides use the same key, so it cannot prove which of them signed.
RFC
Request for Comments: the numbered document series in which the Internet Engineering Task Force publishes internet specifications, from standards such as RFC 8693 to informational notes. A draft is not an RFC.
Digest Fields (RFC 9530)
HTTP header fields (Content-Digest, Repr-Digest) that carry a hash of a message body so a signature can cover the body.
RSA-PSS
The RSA signature scheme with probabilistic padding, preferred over older RSA v1.5 signatures. It appears in JOSE and COSE as a signing option.

Read next

Was this briefing useful?

Share this briefing

Every finding, forecast and open question on this site has a permanent ID. If we reword one, its ID stays the same, so a citation keeps pointing to the same claim.

Follow us on LinkedInRSS feed

Working on an identity problem this research touches? Talk to Boston Identity