Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Verifiable HTTP Gateway Responses #128

Closed
3 of 6 tasks
lidel opened this issue Nov 2, 2018 · 2 comments
Closed
3 of 6 tasks

Verifiable HTTP Gateway Responses #128

lidel opened this issue Nov 2, 2018 · 2 comments
Labels
epic status/deferred Conscious decision to pause or backlog

Comments

@lidel
Copy link
Member

lidel commented Nov 2, 2018

Summary

Various organizations are exposing IPFS content via Public HTTP Gateways (eg. Cloudflare).

There are users who can't run local IPFS node, but still could get some guarantees provided by content-addressing if they have software capable of re-calculating CIDs from arbitratry payloads.

This issue tracks ways we could do that.

Problem statement

Use Cases

  • (UC1) Package Manager fetching archive from HTTP Gateway
  • (UC2) User running ipfs-companion or other browser extension
  • (UC3) IoT / low power devices that are unable to use true p2p, but can reach HTTP gateways
  • (UC4) Web browser that wants to natively delegate IPFS handling to public gateways, but provide users with integrity guarantees of IPFS

Work

Resources

Prior Art

  • (UC2) Cloudflare

  • https://tools.ietf.org/html/rfc6249: Metalink/HTTP: Mirrors and Hashes
    Very relevant RFC, which provides HTTP-native semantics for returning Digest with the payload:

     Link: <http://example.com/example.ext.asc>; rel=describedby;
     type="application/pgp-signature"
     Digest: SHA-256=MWVkMWQxYTRiMzk5MDQ0MzI3NGU5NDEyZTk5OWY1ZGFmNzgyZTJlO
     DYzYjRjYzFhOTlmNTQwYzI2M2QwM2U2MQ==
    

IPFS

@lidel lidel added the status/deferred Conscious decision to pause or backlog label Nov 5, 2018
@lidel lidel added the epic label Feb 11, 2019
@lidel
Copy link
Member Author

lidel commented Jun 9, 2022

@lidel
Copy link
Member Author

lidel commented Aug 11, 2022

This is solved since Kubo 0.13 (see release notes).

Please upgrade your gateways and clients.
Every Gateway should support Block and CAR responses.

tl;dr summary

When you don't trust gateway, use Block and CAR responses. CAR verification does not require running IPFS node. Clients can leverage standalone tools and libraries such as @ipld/car or ipfs-car:

$ npm i -g ipfs-car
$ curl "https://ipfs.io/ipfs/bafybeiakou6e7hnx4ms2yangplzl6viapsoyo6phlee6bwrg4j2xt37m3q?format=car" | ipfs-car
$ ls ./bafybeiakou6e7hnx4ms2yangplzl6viapsoyo6phlee6bwrg4j2xt37m3q/
1007 - Sustainable - alt.txt
1007 - Sustainable - transcript.txt
1007 - Sustainable.png

Further reading

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
epic status/deferred Conscious decision to pause or backlog
Projects
None yet
Development

No branches or pull requests

1 participant