go-bitswap icon indicating copy to clipboard operation
go-bitswap copied to clipboard

[experiment] authentication tokens

Open aschmahmann opened this issue 3 years ago • 3 comments

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

aschmahmann avatar Nov 21 '21 18:11 aschmahmann

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

marten-seemann avatar Nov 21 '21 18:11 marten-seemann

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:

  • What if I need lots of auth tokens? I lose any efficiencies from bundling up wantlists.
  • What if I want to download a block and could use multiple tokens to do so? Should the client just pick one to use, send duplicate requests, or something else? This might be made easier or more efficient if the requests came together.
  • Could I run into stream limits if I'm a proxy making thousands of requests with different auth tokens for others?

aschmahmann avatar Nov 21 '21 19:11 aschmahmann

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

willscott avatar Aug 16 '22 10:08 willscott

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.

Jorropo avatar Jan 27 '23 22:01 Jorropo