-
Notifications
You must be signed in to change notification settings - Fork 7
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Disabling server-initiated integrity checks #27
Comments
|
Yeah, I'd prefer for this not to be part of the signature input, so that this parameter can be changed at runtime without having to re-sign anything. In terms of the preferred spelling, I'd lean towards just putting it in a separate header: E.g. something like
With the current spec, rolling out signature-based SRI would consist of:
This is riskier than necessary since step 1 means starting to validate integrity even for existing clients, which could lead to breakages (or performance degradation). #21 and this issue make it possible to have a safer rollout strategy consisting of:
|
Ok, sounds reasonable, but I don't feel like I understand the rollout strategy this would support. The system as it's currently designed has three parts, each of which is enforced in parallel in order to give the guarantees at the end of the day:
Do you need the ability to make all of those optional? It's not clear what you'd want the user agent to do in a case where one of more of the constraints isn't enforced. Perhaps this is wrapped up in the reporting discussion from #28?
I agree that pushing to 100% tomorrow would be somewhat risky, but I'd imagine your actual plan here as being just as gradual as the next step: you can roll out message signature headers to a subset of the population, gather experimental data about client-side error rates and performance metrics, and ramp the rollout accordingly. Performance data in particular seems like it would be unaffected by enforcement, since the core costs you'll incur are parsing and signature validation on the one hand, and generating a digest of the response body on the other. You'd pay those costs in any event, assuming you'd want reports, so you'd want to ramp over time.
I have a different intuition here. Presumably you'd be able to ramp signature attachment to 100% over time, giving you the opportunity to monitor performance regressions, gain confidence in your signature pipeline, etc.
This sounds to me like the riskiest way to start. Rather than validating the signature mechanism in itself, you'd only attach signatures when failure meant breakage.
As above, can you help me understand what you want |
Yeah, that is what I had in mind.
Ah, I hadn't realized that And just to be clear, once a site sets
The concern here is also about performance regressions on the client-side, which is harder to monitor. So overall I do think it would be quite reasonable for sites to say that they only care about client-initiated integrity checks (since those are the ones that deliver the real security value), and that they don't want to have server-initiated integrity checks. |
This seems to be in tension with the suggestion below that "... once a site sets I think what you're suggesting is something like this:
Help me out with the second scenario? :) For the first scenario, it sounds like there's no delta between simply not sending the headers, and sending the headers with another header that disables them. Why add the complication?
Presumably you'll want to hook into the
Assuming we gave you what you're asking for in #21, you could get this same result by simply not sending the headers unless they're asked for. It's not clear to me why that's not a solution you're happy with. |
Then the response should be checked against the signed response. So if the integrity check passes, then it is allowed. Otherwise, it is blocked. This header would only be about turning off the server-initiated checks. Client-initiated checks would still be processed.
Yeah, this is true iff we address #21. But without #21, the server doesn't know if client-initiated checks are enabled so it has to always send the headers.
I think you are right. So if we fix #21, closing this out as won't fix seems reasonable to me. |
Currently, if a server sets signature-based SRI headers on a response, the signature is validated even if the request has not specified an
integrity
value. This is a useful capability since it allows services hosting JS to enable signature-based SRI as a by-default defense mechanism against tampering.But I'm wondering if we should offer a toggle to disable this? Enabling integrity checks for all requests may or may not be the right behavior in all circumstances, so it seems like it could make sense to make this configurable. I also think this is especially important if we don't pursue #21 since there should be a way for servers to enable SRI for a subset of clients without impacting other clients.
The text was updated successfully, but these errors were encountered: