-
-
Notifications
You must be signed in to change notification settings - Fork 3.2k
Configuration Flag to run Gateway in Trustless-Only Mode #9167
Copy link
Copy link
Closed
Labels
P2Medium: Good to have, but can wait until someone steps upMedium: Good to have, but can wait until someone steps upeffort/daysEstimated to take multiple days, but less than a weekEstimated to take multiple days, but less than a weekgood first issueGood issue for new contributorsGood issue for new contributorshelp wantedSeeking public contribution on this issueSeeking public contribution on this issuekind/enhancementA net-new feature or improvement to an existing featureA net-new feature or improvement to an existing featuretopic/gatewayTopic gatewayTopic gateway
Milestone
Metadata
Metadata
Assignees
Labels
P2Medium: Good to have, but can wait until someone steps upMedium: Good to have, but can wait until someone steps upeffort/daysEstimated to take multiple days, but less than a weekEstimated to take multiple days, but less than a weekgood first issueGood issue for new contributorsGood issue for new contributorshelp wantedSeeking public contribution on this issueSeeking public contribution on this issuekind/enhancementA net-new feature or improvement to an existing featureA net-new feature or improvement to an existing featuretopic/gatewayTopic gatewayTopic gateway
tldr
Add a configuration option that limits Gateway to trustless Block and CAR response types.
More details in the specification at /ipfs/specs/http-gateways/TRUSTLESS_GATEWAY.md
Details
Context
Kubo 0.13 shipped support for Block and CAR response types (#8758).
These "trustless" response types disable IPLD deserialization and website hosting, and enable clients to verify the data is matching the requested CID, removing the need to trust that the gateway sent the correct bytes.
Why
Right now, Kubo supports both trusted and trustless response types, and there is no way to disable trusted ones:
text/htmland other deserialized responses have to be blocked on reverse proxy running in front of Kubo.I believe we should have a clear config
Flagthat allows people to limit their gateway to Block and CAR responses for direct CID at/ipfs/{cid}(and nothing more).Value added:
text/htmlused in phishing campaignsHow
We already have
Gateway.NoDNSLink(bool) which can be used globally or be limited to specific hostname defined inGateway.PublicGateways(see docs/condif.md)The idea here is to add
Gateway.NoTrust(name TBD, ideas welcome), working in analogous fashion.Some pointer for implementer: