bisq2 icon indicating copy to clipboard operation
bisq2 copied to clipboard

Use BanList from network module for filtering messages of banned users at network level

Open djing-chan opened this issue 1 year ago • 7 comments

djing-chan avatar Dec 01 '23 06:12 djing-chan

This looks like it was taken care of by this https://github.com/bisq-network/bisq2/blob/3378755ca6280847d5d8ca190405086de7c34cb3/network/network/src/main/java/bisq/network/p2p/node/handshake/ConnectionHandshake.java#L271-L272

Todo at the top BanList asking for this needs removing if this satisfies it also.

alyokaz avatar Dec 28 '23 23:12 alyokaz

I guess the ban list is not filled yet anywhere. We have the moderator which has the power to ban users user profile, but i am not sure if we should extend that power to the network level. I think not. The network level ban should be limited to network level misbehavior (e.g. ddos). I have not looked closer into it but I guess the feature is only in a "prepared state" but not completed.

djing-chan avatar Dec 29 '23 04:12 djing-chan

@alyokaz Do you want to work on that?

djing-chan avatar Dec 29 '23 04:12 djing-chan

I've taken a look at this, I'm not a networking or security specialist, but it looks like it would require implementing some kind of Intrusion Detection System, the scope of which would looks like it could extend to its own project. I'm not sure it would be a good use of effort, that is, unless there's a simpler approach that I'm not seeing.

alyokaz avatar Dec 30 '23 00:12 alyokaz

@HenrikJannsen @alyokaz @djing-chan hey guys! I'm happy to investigate this, a few questions first:

  1. From reading your comments above I understand the implementation would be a matter of filling the already existing ConnectionHandshake#banList by a new component capable of detecting "misbehavior" in the network
  2. Is there a way of detecting a DDoS already in place in the system?
  3. how would the propagation work?

On a first glance - not sure I agree with the good first issue tag on this one but I'm happy to give it a go if you could assist me a bit to get me up to speed. Also it looks like a good opportunity to learn how the core works - Thanks!

rodvar avatar Jul 29 '24 07:07 rodvar

Yes, true, not really a good first issue... I am very busy atm with release testing and would need to look myself closer into it to give any meaningful comment on it. It might be not as trivial as it initially looked like. A misguided ban would cause more harm as benefit...

djing-chan avatar Jul 30 '24 17:07 djing-chan

Yes, true, not really a good first issue... I am very busy atm with release testing and would need to look myself closer into it to give any meaningful comment on it. It might be not as trivial as it initially looked like. A misguided ban would cause more harm as benefit...

Thanks for the response @djing-chan , no rush I'll get my hands on something else in the meantime!

rodvar avatar Jul 31 '24 05:07 rodvar