IPFS Chrome Extension

1,231 views
Skip to first unread message

Dylan Powers

unread,
Mar 3, 2015, 10:34:59 PM3/3/15
to ipfs-...@googlegroups.com
Hi everyone!
I've made a Chrome extension that will redirect queries to http://gateway.ipfs.io/... to a locally running IPFS daemon or even a daemon on a remote server you control. This will allow us to use IPFS the way it's meant to be used, while also sharing links that allow others to view files through IPFS in a backwards compatible fashion. 

Juan Benet

unread,
Mar 3, 2015, 10:43:30 PM3/3/15
to Dylan Powers, ipfs-...@googlegroups.com
This is great! Thanks for sharing Dylan. 

I wonder if there's a way to drop to required privileges? Instead of reading the data on 
the page, hook into url resolution instead? still a lot of data access... but significantly less.

I tend to be hyper-cautious with extensions that have to read all the data. it's great that
you have build instructions in the source, so we can read it + build it ourselves! (maybe
the readme could have a bit on how to load it into chrome for those unfamiliar?)

Also, i should say that while the gateway is at gatway.ipfs.io, we'll move it to ipfs.io soon.

Juan


--
You received this message because you are subscribed to the Google Groups "ipfs-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to ipfs-users+...@googlegroups.com.
To post to this group, send email to ipfs-...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/ipfs-users/00f3f6a6-256f-4d32-a451-aedd56dec9e5%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Dylan Powers

unread,
Mar 3, 2015, 11:26:42 PM3/3/15
to ipfs-...@googlegroups.com, dylan.ky...@gmail.com

I have access to all domains so that things like iframes, css, scripts, or embeded cat pictures like the above will use your local ipfs daemon no matter where you are on the web. For a little peace of mind, it's not active on the pages where security truely matters: https. However that means the extension doesn't work on this Google groups page or your web based email client so I may enable it for all. I'll certainly look into making it an optional permission that can be selectively enabled.

Marcin Rataj

unread,
Mar 27, 2015, 10:57:57 AM3/27/15
to ipfs-...@googlegroups.com, dylan.ky...@gmail.com
Dylan,

I don't think we would decrease security by enabling use of local gateway on HTTPS sites, quite the opposite :-)

Currently gateway.ipfs.io does not support HTTPS, so the image is loaded via HTTP anyway: no encryption, no validation.
Someone (eg. my ISP) could easily perform man-in-the-middle attack and replace gateway response with something else.

On the other hand: if we replace it with HTTP request to gateway at localhost we improve overall security
because unencrypted HTTP request does not leave ones machine (or local network)
and he/she gets file from IPFS daemon which by definition will return data that match requested hash.

I'd say it is a lot safer to rely on local go-ipfs to provide you with untempered file than on HTTP GET over public network.

PS. When it comes to browser plugins we can't do much more from security standpoint than to
provide instructions for verifying that extension package match sources from a specific git tag.
Checkbox is too late: it is displayed because someone already installed it :-)

BR, Marcin

Dylan Powers

unread,
Mar 29, 2015, 9:40:59 PM3/29/15
to ipfs-...@googlegroups.com
Marcin,
I wholly agree from the standpoint of a man-in-the-middle attack. If you trust my code to be doing what I say it's doing or you've read through the source yourself it's a lot safer. On the other hand, if you don't trust me or haven't taken the time to read through the source, an extension that has access to all https pages whether or not it's related to ipfs may seem a little invasive to the security conscious out there.
I'd rather give people the option to grant permissions later rather than force them into it immediately upon installation.

You received this message because you are subscribed to a topic in the Google Groups "ipfs-users" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/ipfs-users/IKrDkUnIk7E/unsubscribe.
To unsubscribe from this group and all its topics, send an email to ipfs-users+...@googlegroups.com.

To post to this group, send email to ipfs-...@googlegroups.com.

Marcin Rataj

unread,
Mar 30, 2015, 2:20:35 AM3/30/15
to ipfs-...@googlegroups.com
Dylan,

ah, now I understand why I missed your point: 

Chrome provides chrome.permissions
<https://developer.chrome.com/extensions/permissions>
which is an “API to request declared optional permissions at run time
rather than install time, so users understand why the permissions
are needed and grant only those that are necessary”.

Sadly Firefox does not provide such capability and the decision to grant
full access to the browser API needs to be made before install.
Due to this, as a necessity, the ipfs-firefox-addon
<https://github.com/lidel/ipfs-firefox-addon> will have redirect enabled
on HTTPS by default: there is no gain in artificially restricting it in Firefox.


On Mon, Mar 30, 2015 at 7:35 AM, Marcin Rataj <li...@lidel.org> wrote:
Dylan,

Ah, now I understand why I missed your point:  I see that Chrome provides chrome.permissions which is an “API to request declared optional permissions at run time rather than install time, so users understand why the permissions are needed and grant only those that are necessary”.

Sadly Firefox does not provide such capability and the decision to grant full access to the browser API needs to be made before install.
Due to this, as a necessity, the ipfs-firefox-addon will have redirect enabled on HTTPS by default: there is no gain in artificially restricting it in Firefox.

All I can do is to provide way for security-conscious users to build and verify sources beforehand (plus they can also disable automatic updates).



For more options, visit https://groups.google.com/d/optout.



--
BR, Marcin



--
Kind regards,
Marcin Rataj

Juan Benet

unread,
Mar 30, 2015, 7:24:35 PM3/30/15
to ipfs-...@googlegroups.com
I think it is key to make sure that these sorts of addons:

- can be audited by a user
- a user can _easily_ compile it and use their own version
- we work towards minimizing the privileges used.

We'll eventually get a wildcard cert for ipfs.io (i really dislike the 
CA system). If you want this sooner or can help, discuss at:

Juan


Juan Benet

unread,
Mar 30, 2015, 7:25:57 PM3/30/15
to ipfs-...@googlegroups.com
(oh i should mention, i think both of these addons are doing well on
those three properties-- keep up the good work. perhaps in time we'll
be able to limit privs even more).
Reply all
Reply to author
Forward
0 new messages