10 ms·
HTTP Message Signatures
- NovemberWhiskey 5y agoDid something happen to make this pop here? I've been tracking this draft for a fairly long time, at least a year, and wondered whether it had finally reached RFC stage - but no, still a draft.
- rgj 5y ago“ Published: 19 November 2021”
- tialaramex 5y agoSure, but that's just a publication for this particular draft. Which seems to be maybe draft 07. And that numbering starts when it was formally adopted with a 00 draft owned by the working group, it dates back years before that.
- mooreds 5y agoI submitted this because this conversation happened in the OAuth working group (which I follow): https://mailarchive.ietf.org/arch/msg/oauth/DxB8mmBW9BtArUIdPq-RaYDjKzA/ https://mailarchive.ietf.org/arch/msg/oauth/DxB8mmBW9BtArUId...
- zozbot234 5y agoIs this intended to include the featureset of Signed HTTP Exchanges (SXG) as well?
- westurner 5y agoFrom https://news.ycombinator.com/item?id=28543911 https://news.ycombinator.com/item?id=28543911 : ``` From https://blog.cloudflare.com/automatic-signed-exchanges/ https://blog.cloudflare.com/automatic-signed-exchanges/ : > The broader implication of SXGs is that they make content portable: content delivered via an SXG can be easily distributed by third parties while maintaining full assurance and attribution of its origin. Historically, the only way for a site to use a third party to distribute its content while maintaining attribution has been for the site to share its SSL certificates with the distributor. This has security drawbacks. Moreover, it is a far stretch from making content truly portable. > In the long-term, truly portable content can be used to achieve use cases like fully offline experiences. In the immediate term, the primary use case of SXGs is the delivery of faster user experiences by providing content in an easily cacheable format. Specifically, Google Search will cache and sometimes prefetch SXGs. For sites that receive a large portion of their traffic from Google Search, SXGs can be an important tool for delivering faster page loads to users. > It’s also possible that all sites could eventually support this standard. Every time a site is loaded, all the linked articles could be pre-loaded. Web speeds across the board would be dramatically increased. "Signed HTTP Exchanges" draft-yasskin-http-origin-signed-responses https://wicg.github.io/webpackage/draft-yasskin-http-origin-signed-responses.html https://wicg.github.io/webpackage/draft-yasskin-http-origin-... "Bundled HTTP Exchanges" draft-yasskin-wpack-bundled-exchanges https://wicg.github.io/webpackage/draft-yasskin-wpack-bundled-exchanges.html https://wicg.github.io/webpackage/draft-yasskin-wpack-bundle... : > Web bundles provide a way to bundle up groups of HTTP responses, with the request URLs and content negotiation that produced them, to transmit or store together. They can include multiple top-level resources with one identified as the default by a primaryUrl metadata, provide random access to their component exchanges, and efficiently store 8-bit resources. From https://web.dev/web-bundles/ https://web.dev/web-bundles/ : > Introducing the Web Bundles API. A Web Bundle is a file format for encapsulating one or more HTTP resources in a single file. It can include one or more HTML files, JavaScript files, images, or stylesheets. > Web Bundles, more formally known as Bundled HTTP Exchanges, are part of the Web Packaging proposal. > HTTP resources in a Web Bundle are indexed by request URLs, and can optionally come with signatures that vouch for the resources. Signatures allow browsers to understand and verify where each resource came from, and treats each as coming from its true origin. This is similar to how Signed HTTP Exchanges, a feature for signing a single HTTP resource, are handled. ```
- dane-pgp 5y agoI was wondering how much overlap the two technologies have too. What I'd really like to see supported is a way for a web app to specify a public key and a version number, and for the browser to then prompt you every subsequent time you access that page if the key or version number has changed. This would effectively allow web apps to use the same security model as desktop apps, i.e. TOFU. Arguably, though, auto-updating desktop apps are less secure than even TOFU, but I don't know users can be expected to judge whether v1.2.3 is more secure than v1.2.2, so perhaps the prompt doesn't provide any practical benefit.
- westurner 5y agoIs this solveable by including a cache key in the URL or other client-side storage?
- dane-pgp 5y agoWell, there is the SecureBookmarks trick[0], which uses integrity hashes and Data URLs, so you're right that signatures aren't strictly needed (especially at the HTTP level). I think the difficult part is the UX, and how to handle the failure modes, which is why browsers might reasonably be reluctant to support something like this. [0] https://github.com/coins/secure-bookmark https://github.com/coins/secure-bookmark
- westurner 5y agoAre there additional HTTP status code-like error codes that need to be specified? What [same origin, SXG,] failure modes are there? From "HTTP 402: Payment Required" https://news.ycombinator.com/item?id=22214156 https://news.ycombinator.com/item?id=22214156 : > The new W3C Payment Request API [4] makes it easy for browsers to offer a standard (and probably(?) already accessible) interface for the payment data entry screen, at least. > https://www.w3.org/TR/payment-request/ https://www.w3.org/TR/payment-request/
- dane-pgp 5y ago
- rdpintqogeogsaa 5y agoI'll take this opportunity to point out that Ed25519 support is an open issue, but no one has stepped up to specify it yet.[0] [0] https://github.com/httpwg/http-extensions/issues/1509 https://github.com/httpwg/http-extensions/issues/1509
- mitchtbaum 5y agoThank you for pointing that out. I commented there.
- arianvanp 5y agoIs this similar to how Amazon's authentication works?
- mhio 5y agoAWS signing uses the same concept, but the secret/key is not used to create the "signature". AWS use a hash of the headers, payload and auth scope to create an equivalent string to the `Signature` header described in the draft. [0] AWS then sign that equivalent `Signature` string with your secret token plus some AWS specifics to create an `Authorization` header to add to the request. [0]: https://docs.aws.amazon.com/general/latest/gr/sigv4-create-string-to-sign.html https://docs.aws.amazon.com/general/latest/gr/sigv4-create-s...
- mooreds 5y agoThat's my understanding. Here's a Twitter thread from Ben Kehoe (an AWS community hero) with more: https://twitter.com/ben11kehoe/status/1457765599040311298 https://twitter.com/ben11kehoe/status/1457765599040311298
- dorianmariefr 5y agoWhy not have a hash header?
- remram 5y agoThere's already one, Digest (and Content-Digest). Edit: it seems to be a Draft as well though
- heythere22 5y agoWhat do you gain by signing the response headers? Ctrl+F for "body" yielded only 2 results. Wouldn't signing the response body be a bit more useful or am I missing something?
- niros_valtos 5y agoIf you are connecting over TLS, the server is already trusted and I see no reason to validate the response. The theory may be the ability to tamper the response before it hits your code (such as in SDK), but even then a malicious SDK can make everything look legit.
- codetrotter 5y agoThey keep talking about HTTP message and then they say: > 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. And further down they say: > 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. So to me it sounds like when the body is important, include a hash digest of it, and then include the digest header in the set of headers to sign. Earlier they also explain why you can’t simply sign everything all together: > 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.
- mhio 5y agoSigning the body is supported by including a `Digest` header for the body in the signature.
- niros_valtos 5y agoWhy SigV4 is insufficient? It works across AWS’s SDK and seems to be safe as it is time bound (limited time to serve the request and each request signature includes the timestamp).
- mhio 5y agoThe draft isn't AWS authorisation specific, Signature Version 4 is.
- orf 5y agoI think the question being asked is “why isn’t the spec just Sigv4”?
- mhio 5y agoThat was the information I was trying to (too quickly) highlight. AWS sig v4 is specifically for authorising AWS requests, it's not portable. The concepts in the draft are very similar so this looks like the generic internet version of the AWS signing concept. It looks like the draft involves Amazon people too but I'm not sure which one was chicken or egg. NovemberWhiskey's comment highlights the specific differences better than I.
- NovemberWhiskey 5y agoSigV4 is limited to symmetric HMAC-type signatures which require a shared secret; and many of the specifics are tightly linked to AWS concepts like regions, service names, amz headers and so on. Conceptually, SigV4 is not a whole lot different from a symmetric implementation of this draft; but the draft has support for public key signatures and binds to fewer AWS specificities.
- egberts1 5y agoWhat was once HTTP being a simple protocol with a simple syntax has ballooned into a monstrosity. And none of the lessons learned about and from other protocols. Part of the problem is too many hands in the cookie jar. Put it back under a single research lab group, something like DARPA or Bell Labs. This is from the mind of a high-speed IPS/IDS architect.
- pornel 5y agoIt's the "simple" text-based nature of HTTP that keeps biting it. It's the source of parsing complexity (it's really nasty when you need to handle all the weird "web-compatible" edge cases and not be vulnerable to things like request smuggling). In this RFC it increases complexity due to the need for normalization.
- tenebrisalietum 5y agoThe blame chain is this: - Microsoft is king of the corporate PC in the early-to-mid 90's. - Internet and it's Unix-y origins starts getting popular. - Windows was not fundamentally designed to be connected to an open global network and Windows/Microsoft product security issues start becoming constant and prevalent. - This causes an antivirus/security industry to start and grow, hooking into PC pop culture, corporate/government life which causes recommendations such as "block everything except outgoing TCP 80 and 443" to be implemented large-scale. - Microsoft is getting better but is so prevalent that it becomes the substrate for things like major ransomware operations. The cloud becomes a thing and cloud-based firewalls that are basically HTTP proxies start becoming a thing. - So now everything has to be HTTP otherwise it requires network owners to reconfigure firewalls and potentially take blame for ever-escalating security incidents. Just easier to ride HTTP.
- jedisct1 5y agoI too miss the days where I could use "telnet 80" to interact with a web server. And when a website could be made by writing simple HTML/CSS code, and hosted anywhere, even by your own ISP. Yes, HTTP has become a monstrosity. Something that's incredibly hard to comprehend and implement. It just got even worse with HTTP/3 that replaces TCP with QUIC. On the other hand, HTTP has become a little bit more than just a protocol for serving web pages. It's become a universal transport protocol for everything: small content, very large content, interactive content, streamed content, public content, sensitive content, APIs, iOT... With being able to be a good fit for all these radically different use cases come a lot of complexity. It's a tradeoff. And HTTP is actually doing an amazing job at balancing complexity vs being a universal protocol.
- vbezhenar 5y agoI thought that HTTPS already provides all the proofs that message originated from a particular server. Why isn't it enough to capture some additional crypto information from HTTPS protocol?
- flumpcakes 5y agoHTTPS does not mean that a message came from the particular server you assume it does. For example, most CDNs will be acting just like a MITM in order to operate. Having a separate signature that can verify the HTTP _content_ is from the origin server, regardless if it gets re-encrypted by other services en route, is probably useful.
- NovemberWhiskey 5y agoTLS will provide assurance of client identity as long as there's no intermediate termination; like (say) TLS inspection, an API gateway, a CDN or an L7 load balancer. This specification allows the use of TLS for per-hop confidentiality with end-to-end assurance of identity.