-
-
Notifications
You must be signed in to change notification settings - Fork 3k
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
feat: Gateway.DeserializedResponses config flag #9789
Conversation
775bace
to
3de34fd
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Could tweak the name/meaning in Kubo, and add OnlyTrustless
to the config?
It is a pretty important feature: people who want to run public gateway but don't want to be responsible for phising etc could easily remove the risk by enabling this.
This way, we don't need to deal with migrations / changing default behavior in Kubo (OnlyTrustless being false by default), but allow people to opt-in if they want.
e3f6bf5
to
2613244
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Also tests please ?
@Jorropo I added a very simple test. Don't forget that most of this is tested in Boxo. |
775c593
to
45e72a0
Compare
We still want to check that the 2 lines of code plumbing the config to the boxo field are correct. 🙂 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM ty
3b51534
to
d461b58
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
TrustedMode
→ DeserializedResponses
See ipfs/boxo#252 (review) for details
bd3ada1
to
a446062
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I've switched this PR to the latest version from ipfs/boxo#252 (review).
Good overall, but we need better UX and regression tests for all config variants.
I know this is extra work, would not ask normally for this level of paranoia, but misconfiguration of this flag could expose potential Trustless Gateway operators to risks that come with hosting deserialized data – details below.
Add CAR and Accept header variants as regression tests, just in case things will break during yet another refactor (;
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks!
Switched to boxo main branch, added changelog and some tests, merging.
Pair PR of ipfs/boxo#252.
I simply update Kubo to use the new configuration structure and I keep all the defaults of Kubo, that is, everything is a trusted gateway unless
DeserializedResponses
is set tofalse
in the configuration. Also added a simple test to check ifDeserializedResponses
is honoured. Further tests can be found in Boxo.Steps: