#1041: Signature-Based Integrity.
Discussions
Log in to see TAG-private discussions.
Comment by @mikewest Jan 21, 2025 (See Github)
(Also (because everyone loves bikeshedding!), it might be helpful for y'all to have an opinion on the We landed on something.Identity-Digest
header name that this proposal depends upon: https://github.com/LPardue/draft-pardue-http-identity-digest/issues/10.)
Discussed
Feb 10, 2025 (See Github)
Martin: Seems broadly fine. I don't like it. The number of moving parts is challenging. But it'll probably work out.
Jeffrey: Good that it builds on already-standard stuff.
Martin: I don't like the signature scheme. Question of what you sign is critical. Maybe the spec already covers that? It should be buttoned down correctly. Right now, you can say script-src=whatever, and an integrity tag with a public key. That comes with a bunch of implications. If you sign just the content, and the type doesn't match, then the load won't work. Maybe for script-src it's ok not to cover any other parts of the headers.
Jeffrey: Maybe the spec should explicitly say what parts of the HTTP message needs to be signed?
Martin: Yes. E.g. you can sign [nothing]. A minimum set is probably ok. I'll raise a spec issue.
Jeffrey: Remind them to move to WebAppSec.
<blockquote>This looks like a generally good feature to us. We note that this spec should require that some minimum set of fields are signed (see https://github.com/WICG/signature-based-sri/issues/44), and that it should eventually move to an appropriate working group, like WebAppSec, but we're generally satisfied otherwise. This also depends on work being adopted in the IETF, but we see that discussions are happening there.
</blockquote>Waiting on input from Sarven, but plan on satisfied
.
Comment by @martinthomson Feb 18, 2025 (See Github)
Having spent a little time discussing a few issues with Mike on his issue tracker, I'm starting to think that this probably needed to be marked as an early review rather than a final review. There are a couple of pretty fundamental issues that still need resolution. In particular, https://github.com/WICG/signature-based-sri/issues/45, https://github.com/WICG/signature-based-sri/issues/44, https://github.com/WICG/signature-based-sri/issues/38, and (I can't find the number) a very serious question about whether the signature needs to cover the (current) request URL.
Should this spend a little more time in the shop before we review it like it's done?
Comment by @mikewest Feb 18, 2025 (See Github)
I appreciate y'all's feedback and engagement however you'd like to label it, and the questions you've raised are quite helpful! The two questions I think are most pressing are:
-
Should we apply a public key constraint only to the response we get at the end of a redirect chain, or to each hop along the way? It seems reasonable to define a signature mechanism for redirects, so I'll do that in any event; it's simply unclear to me whether we should require developers to care about that in every case, or make it somehow optional. This is https://github.com/WICG/signature-based-sri/issues/45.
-
How do we best support evolution of this standard in the future? The current draft ignores signature/signature-input members it doesn't understand, requiring developers to attach multiple signatures to cover a breadth of client versions. An alternative would be to accept unknown aspects of signatures, and sign them as best we can. Each approach has some benefits and drawbacks. This is https://github.com/WICG/signature-based-sri/issues/38.
The question of covering the current request URL seems like it was answered: @path
represents the request's "current URL", not "URL". It sounds like you're suggesting that we might want to require developers to sign @path
along with unencoded-digest
? That seems like it would introduce deployment brittleness (the signing infrastructure would have to the URL from which the resource will be served) that doesn't seem justified as a requirement. I don't think there's an issue on that topic specifically, so if we should discuss it, I'll file another. :)
In parallel with continuing the conversation on those issues, my plan at the moment is:
-
To run an origin trial with Chromium's current implementation to get some feedback from developers about what I think we generally agree upon as the feature's core (sign
unencoded-digest
, punt on ~everything else). That should give us some insight into deployability of signatures generally, as that infrastructure will require testing at scale. -
To ask WebAppSec to spin up an update to SRI that will include this problem space, which hopefully provides a broader forum to hammer out the specifics (along with other bug fixes from the last ~decade already present in the ED).
Does that sound reasonable to y'all?
Thanks again for your time and attention!
Discussed
Feb 24, 2025 (See Github)
Martin: Based on the discussion with Mike, there are several corner cases that haven't been worked through. Some fundamental pieces that aren't clear. Would be best to defer until some of those are sorted out. E.g. What if you say you need a signature-based SRI and there's a redirect? A core attack is a bunch of resources are signed, and you substitute one resource for another. Implication is that you need to sign the identity of the resource. But when you do that, you engage the whole redirect problem.
Jeffrey: What about naming resources, where the name isn't equal to the path, but is signed?
Martin: That's the "nonce" approach. Need to resolve that too. It's tricky, but Mike has all the tools to work through it. We won't be helping as the TAG.
Jeffrey: I assume we're supportive of the direction?
Martin: Not excited, since it's narrowly applicable. But we've already solved the low-hanging fruit, so this is ok as long as it doesn't lead to major complexity problems downstream.
Martin to write a closing comment.
Posted: https://github.com/w3ctag/design-reviews/issues/1041#issuecomment-2683769144
Discussed
Feb 24, 2025 (See Github)
Jeffrey: Martin has been iterating on this...
Rescheduled for breakout B
Sarven: concerns about compromised keys and manifests...
Jeffrey: i do think they talk about compromised keys (rotation)... manifests yes.
Sarven: Asked about signed manifests: https://github.com/w3ctag/design-reviews/issues/1041#issuecomment-2679225817
Comment by @csarven Feb 24, 2025 (See Github)
This is just an incremental question and does not represent the views of the entire TAG:
Is there a need for something like signed manifests - listing expected hashes of resources - that can be looked up?
Comment by @mikewest Feb 24, 2025 (See Github)
@csarven:
Is there a need for something like signed manifests - listing expected hashes of resources - that can be looked up?
There's a proposal from Meta and Mozilla pushing in something like that direction (Web Application Integrity Consistency and Transparency (WAICT)) that we discussed in WebAppSec last week. It also vaguely reminds me of Web Bundles Integrity Block proposal.
These proposals seem quite complimentary to the HTTP Message Signature-based mechanism described here, and well-worth exploring.
Comment by @martinthomson Feb 24, 2025 (See Github)
Complementary, perhaps, though the two approaches address fundamentally different goals. Signing provides a second layer of provenance on top of what you get from obtaining content using HTTPS, but it cannot provide integrity in the sense that the application is guaranteed to have a fixed shape. If you care about things like whether you got the same app as everyone else, signing cannot help.
Where signing helps is cases where the provenance of content is not closely tied to its delivery. Like when you use an intermediary (a CDN or static file host) to deliver high-impact content, or just because your own delivery pipeline is not something you want to trust. In those cases, you might want to provide an additional layer of protection in case of mistakes or attacks.
Comment by @martinthomson Feb 26, 2025 (See Github)
After discussion with @jyasskin, we concluded that the proposal is headed in a constructive direction, but it is more appropriate for @mikewest to continue to chase down some of the outstanding issues in the design before we get into a review.
These issues all trace to the same question: what might be done about the potential for the content substitution from within the set of resources that are signed with the same key. There are a bunch of questions about signing the current URL somehow (which interacts poorly with redirects) or maybe signing a nonce instead (which creates a tighter coupling between linking content and linked content, which might reintroduce the exact for operational problems that this approach is intended to avoid). These seem like a significant-enough set of problems to work through that the ultimate solution might need some significant changes.
With that in mind, we're deferring this one and will ask that you come back once things are more mature. Either open a new issue (mentioning this one) or reopen this one, as you best see fit when that happens.
Comment by @mikewest Feb 26, 2025 (See Github)
Thanks for your thoughts. My expectation is that we'll land on initial answers quickly, and hopefully get feedback on their deployability from developers who experiment with the system. I'll bring that feedback back to y'all as it comes.
One thing, though, before deferring this for another day: I was hoping for some higher-level guidance on WICG/signature-based-sri#38. It's a somewhat long thread, but the last two messages (from https://github.com/WICG/signature-based-sri/issues/38#issuecomment-2576937213) reasonably sum up the context. This kind of design question seems generic-enough that it would be helpful for us to come up with a principle we can apply. @martinthomson and I touched on this in WICG/signature-based-sri#44, but I think it would benefit from a little more attention. I'll leave this closed, but I'd appreciate continuing the conversation elsewhere. :)
Comment by @jyasskin Feb 26, 2025 (See Github)
One possible principle on handling unknown parameters might be that it's often important to include a "critical" list, of parameters that the client must understand: https://github.com/w3ctag/design-principles/issues/560. There might also be other extensibility principles that we could identify, but I think they're likely to be of the form "consider these aspects when making the tradeoff", and won't just give an answer for the signature-based-sri case.
Comment by @mikewest Aug 13, 2025 (See Github)
I'd invite y'all to take another look at the spec, as I intend to begin breaking it into PRs against SRI for review. https://wicg.github.io/signature-based-sri/#security-substitution describes the set of issues we discussed earlier in the year, along with potential mitigations. For the moment, key segregation is enough for developers who have experimented with the feature, and there hasn't been substantial interest in requiring signed redirects by default.
I intend to define a redirect-signing profile, and allow site developers to opt-into it via an option on the integrity declaration, but I think that will be a separate extension to SRI, and I'll open a distinct review for it in the future.
Thanks!
OpenedJan 21, 2025
Guten TAG!
I'm requesting a TAG review of Signature-Based Integrity.
TL;DR: It would be nice if web developers could verify the provenance of resources they depend upon, establishing a technical foundations upon which they can build confidence in the integrity of their supply chain. SRI offers brittle, content-based integrity mechanisms today which can (in theory) but do not (in practice) enable this capability. This proposal explores an alternative that builds upon existing integrity checks (e.g.
<script integrity>
and HTTP Message Signatures to give developers an additional option when deciding how to protect their sites from unexpected injection.In short, developers will include the following on their site:
Servers will deliver resources signed with the asserted key:
Further details:
I'd highlight a few comment threads that might be helpful for y'all to weigh in on specifically:
The bottom half of https://github.com/WICG/signature-based-sri/issues/10 discusses the applicability of this model to inline scripts, where the dependency on HTTP Message Signatures doesn't really fit.[Update, 2025-02-06] I ended up turning this into https://mikewest.github.io/inline-integrity/, which I'll present to WebAppSec this month, and come back to y'all if there's enough interest to justify the work.Thanks for your time!