Description
Some good practice on sending signals : https://doc.crowdsec.net/docs/next/getting_started/install_softagent#you...
- The module should allow to push/addSignals easily
- Signal should come from security modules or plugins listening to security events and generating signals form them
- A helper is available in CrowdSec's SDK to generate signals
- The Module could already embed signal generation from existing core security modules like "flood"
- When Pushing a new kind of signal we should add it to the list of subscribed ones
- Signals should be buffered before pushed for an optimal usage of the API: every 10 secondes for example by batches of 1 to 250signals
It's important to validate with CrowdSec the scenario names for those signals in order for them to be validated by CrowdSec's expert system
Comments
Comment #2
jurgenhaasCreated a separate task at #3329780: Signal buffering to implement the buffering of signals.
The signals we can implement into a first release of this module should be these:
All of the above scenarios will already lead to a block of the IP by local measures. But we make it configurable, which of those scenarios should send signals upstream.
Also, all 3 scenarios will be added to the list for subscription.
@rr404 could you please review the proposed scenario names so that we can start implementing them?
Comment #6
jurgenhaasAll 3 scenarios are now fully implemented and can be reviewed.
Comment #7
rr404 commentedI'll add those scenarios tomorrow.
We might rename them to be more explicite
* flood : if i'm not mistaken this is authentication flood, and this would trigger when attempts threshold is reached
** If so we could call it drupal/auth-bruteforce
* ban : Could be named drupal/manual-ban
* whisper : could be split in 4xx signal and 5xx signals. drupal/4xx-error drupal/5xx-error
I'll confirm the names tomorrow once added
Comment #8
jurgenhaasGood call.
That's correct by default. But I just discovered the Perimeter module as @madclu pointed out in #3330098: Integration with Perimeter module which automatically bans IP addresses if they detect suspicious behaviour. Their banning will be recognized by this module as well, although it's then not manual banning anymore.
I'm fine with
drupal/4xx-errorbut I'm not sure we should deal with any 5xx errors here. The 4xx errors are clearly bad behaviour by a client, but 5xx is bad server behaviour and should not lead to a potential ban.Comment #9
rr404 commentedif the ban event can be triggered by other security modules we could call it drupal/generic-ban
If a security plugin want a specific signal trigger mechanics they'll have to to their own implementation.
Writting this I'm wondering if we should skip listening to the ban and contact Perimeter developer to create specific signals in order to better identify the various bad behavior in different signals.
What do you think ?
Comment #10
jurgenhaasThat wouldn't help much because the Ban module is part of Drupal core and their API doesn't allow more than "just" ban or unban of an IP address. So, while any module (e.g. Perimeter or others) use that Ban API, that's all we can get - and I think that's OK as it falls under the
drupal/generic-banscenario.If modules later wanted to become more sophisticated, that's fine. But then it needs integration without using the Ban API from Drupal core. I'm sure, we'll see a lot of requests for that once the community recognizes the CrowdSec integration. For our first release, I don't think we need to encourage that.
Please let me know when the scenario names got finalized, because then it is time for the first beta release, I guess.
Comment #11
rr404 commentedWe can go with drupal/generic-ban or core-ban
I think this would be the most transparent way to name it.
Comment #12
jurgenhaasShall we go for these 3 then?
Do you have to create them at your end before we can use them, or can we just use these, and they will then be present automatically?
Comment #13
rr404 commentedWe can go with those scenario names they are fine.
You can use them directly they'll be accepted
Comment #16
jurgenhaasUpdated the scenario names and marked the issue as fixed.