Restricting window.ipfs to Secure Context #476
Labels
area/window-ipfs
Issues related to IPFS API exposed on every page
kind/discussion
Topical discussion; usually not changes to codebase
topic/security
Work related to security
TL;DR
This is a notice of intent to ensure
window.ipfs
is available only in Secure Contexts.Rationale
Re-use existing security perimeter and take advantage of its guarantees
Follow convention of requiring secure context for all new features
Avoid shimming of existing Web APIs in insecure contexts
Transitive dependencies such as js-multihashing-async rely on Web Crypto API, which does not work in insecure contexts, as noted in #475. This means we can't do a simple
window.ipfs.object.put()
without providing userland implementation of webcrypto before ipfs-postmsg-proxy is injected into every webpage.While doable, it may not be feasible for multiple reasons:
crypto
but notcrypto.subtle
which requires additional orchestration.Related Reading
window.isSecureContext
The text was updated successfully, but these errors were encountered: