ipfs / go-bitswap

The golang implementation of the bitswap protocol
MIT License
216 stars 112 forks source link

[experiment] authentication tokens #543

Closed aschmahmann closed 1 year ago

aschmahmann commented 2 years ago

Not much to see here, just a stab at what it might look like to have authentication in Bitswap. Very not production ready.

marten-seemann commented 2 years ago

Is this orthogonal or an alternative to the idea to put this into Protocol Select?

aschmahmann commented 2 years ago

Is this orthogonal or an alternative to the idea to put this into Protocol Select?

Perhaps orthogonal, there are lots of ways to do auth. In this case putting auth into Protocol Select means Bitswap mechanics would need to change to have a new stream per auth token/channel which depending on the design may/may not be excessive/problematic.

I suspect if we had a nice design for negotiating per-stream auth that protocols would attempt to use it before designing something more special cased.

Some tricky areas here that might cause necessitate more than stream based auth include:

willscott commented 2 years ago

Does this still match the current spec work? is there an alternative version of auth that's available in the current bitswap?

Jorropo commented 1 year ago

This repository has been moved to https://github.com/ipfs/go-libipfs. There is not an easy way to transfer PRs, so if you would like to continue with this PR then please re-open it in the new repository and link to this PR.