Chrome Error: Please use a browser with webcrypto support #475
Labels
area/window-ipfs
Issues related to IPFS API exposed on every page
kind/bug
A bug in existing code (including security flaws)
Problem / TL;DR
Chrome won't allow access to webcrypto for pages served via HTTP unless it's at
localhost
.This means parts of
window.ipfs
will be broken on non-TLS non-localhost gateways.webcrypto
since version 60.How to Reproduce
window.ipfs
experiment enabledwindow.ipfs.object.put()
(try this Example code)Background
This is not a bug, it is a feature sort of a thing.
Modern browsers are limiting selected APIs to be available in Secure Contexts only.
Chrome includes
webcrypto
in this scheme, which means it cannot be accessed when served from insecure origin:Current list of “secure” origins according to Chrome can be found here:
Related discussion on our end: multiformats/js-multihashing-async#22
Potential Solutions
Please use a browser with webcrypto support
error injs-multihashing-async
to be less ambiguous, include information about the prerequisite of secure context,should we shim webcrypto when native implementation is not available?prior art: Why the requirement on webcrypto? multiformats/js-multihashing-async#22 (comment)window.ipfs
is available only in secure contexts? (Restricting window.ipfs to Secure Context #476)The text was updated successfully, but these errors were encountered: