ipfs / in-web-browsers

Tracking the endeavor towards getting web browsers to natively support IPFS and content-addressing
https://docs.ipfs.tech/how-to/address-ipfs-on-web/
MIT License
349 stars 29 forks source link

Using CID in HTML SRI (Subresource Integrity attributes) #214

Open lidel opened 8 months ago

lidel commented 8 months ago

Subresource Integrity (SRI) is a security feature that enables browsers to verify that resources they fetch (for example, from a CDN) are delivered without unexpected manipulation. It works by allowing you to provide a cryptographic hash that a fetched resource must match. – https://developer.mozilla.org/en-US/docs/Web/Security/Subresource_Integrity

<script
  src="https://example.com/sw.js"
  integrity="sha384-oqVuAfXRKap7fdgcCY5uykM6+R9GqQ8K/uxy9rx7HNQlGYl1kPzQho1wx4JwY8wC"
  crossorigin="anonymous"></script>

This is a placeholder issue with the current state of things.

In my mind there are three "stages" of SRI support we could think of, and only first one can be done without internal support from browser engines and standards bodies.

Ref.