Summary
Response signatures often need to cover request-derived components using the ;req parameter (RFC 9421 §2.2.2), e.g. @method;req, @path;req, @query;req.
Today this requires AddHeaderExt with four booleans:
fields.AddHeaderExt("@method", false, false, true, false).
AddHeaderExt("@path", false, false, true, false).
AddHeaderExt("@query", false, false, true, false)
The signature is (optional, binarySequence, associatedRequest, trailer). For the WIMSE HTTP-Sig response case, associatedRequest=true and optional=false — these components are required, not optional.
Proposal
Add a convenience method:
// AddRequestComponent adds a required derived component from the associated request (sets ;req).
func (fs *Fields) AddRequestComponent(name string) *Fields
Usage:
fields.AddHeaders("@status", "workload-identity-token").
AddHeaderOptional("Content-Type").
AddHeaderOptional("Content-Digest").
AddRequestComponent("@method").
AddRequestComponent("@path").
AddRequestComponent("@query")
Equivalent to:
AddHeaderExt(name, false, false, true, false)
No optional variant is proposed: WIMSE (and typical response-binding profiles) require these components whenever the response is signed. Optional coverage applies to headers like Content-Type / Content-Digest (AddHeaderOptional), not to @method;req / @path;req / @query;req.
Motivation
- Reduces caller mistakes (easy to get the four booleans wrong).
- Makes the required-vs-optional distinction explicit at the call site.
- WIMSE HTTP-Sig response signing uses this pattern for every signed response.
Related consumer: https://github.com/yaronf/wimse-s2s-doc
Summary
Response signatures often need to cover request-derived components using the
;reqparameter (RFC 9421 §2.2.2), e.g.@method;req,@path;req,@query;req.Today this requires
AddHeaderExtwith four booleans:The signature is
(optional, binarySequence, associatedRequest, trailer). For the WIMSE HTTP-Sig response case,associatedRequest=trueandoptional=false— these components are required, not optional.Proposal
Add a convenience method:
Usage:
Equivalent to:
No optional variant is proposed: WIMSE (and typical response-binding profiles) require these components whenever the response is signed. Optional coverage applies to headers like
Content-Type/Content-Digest(AddHeaderOptional), not to@method;req/@path;req/@query;req.Motivation
Related consumer: https://github.com/yaronf/wimse-s2s-doc