bisq-network / bisq2

GNU Affero General Public License v3.0
156 stars 59 forks source link

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

Open djing-chan opened 9 months ago

alyokaz commented 8 months ago

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.

djing-chan commented 8 months ago

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 commented 8 months ago

@alyokaz Do you want to work on that?

alyokaz commented 8 months ago

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.

rodvar commented 1 month ago

@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

    1. Is there a way of detecting a DDoS already in place in the system?
    2. 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!

djing-chan commented 4 weeks ago

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...

rodvar commented 4 weeks ago

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!