Add ability to deny serving any Paths
content on a gateway by default
#10465
Labels
kind/enhancement
A net-new feature or improvement to an existing feature
need/triage
Needs initial labeling and prioritization
Checklist
Description
Unless I’m missing something, it is currently impossible to prevent Kubo from exposing the /ipfs/ and /ipns/ paths for all domains that may ever point to it – one has to instead list every single domain that may access Kubo inside
Gateway.PublicGateways
, specifyingPaths: []
for each of them.This results in configuration like the following:
… and if you forget anything you risk Kubo might become an open relay after all.
This happened on my server by accident since I had the front-end server forward traffic to Kubo on an extra domain name that ended up not having a DNSLink value set after a migration. Apparently bots (and maybe also people) found it and it made Kubo’s memory and disk usage rise to levels that overloaded the server until I restrained the application’s memory and disk usage for not knowing why it “misbehaved”. I wouldn’t be surprised if several of the “too high memory” issues opened here had a similar cause – it’s just too easy to mess this up.
Essentially I’d like to be able to write something like this to not have Kubo to be an open relay by default and only serve content if it can find a DNSLink record at the received
Host
domain:I had also tried writing the following after discovery this based on the documentation but it didn’t have any effect:
The only suggested workaround in the documentation that I could find was to use
Gateway.NoFetch
, but that seems too restrictive for many use-cases.Maybe related to #4973.
The text was updated successfully, but these errors were encountered: