Extension:CrowdSec

Category:Extensions without an imageCategory:Extensions without a compatibility policyCategory:GPL licensed extensions
MediaWiki extensions manual
CrowdSec
Release status: experimentalCategory:Experimental extensions
Implementation Page action Category:Page action extensions
Description Bouncer Integration with CrowdSec for anti-spam.
Author(s) MPThLeetalk
MediaWiki 1.35+Category:Extensions with manual MediaWiki version
License GNU General Public License 2.0 or later
Download Category:Extensions in GitHub version control
  • $wgCrowdSecEnable
  • $wgCrowdSecAPIUrl
  • $wgCrowdSecAPIKey
  • $wgCrowdSecCache
  • $wgCrowdSecCacheTTL
  • $wgCrowdSecFallbackBan
  • $wgCrowdSecRestrictRead
  • $wgCrowdSecTreatTypesAsBan
  • $wgCrowdSecReportOnly
Category:All extensions

This extension adds anti-spam integration with CrowdSec. As it's working as bouncer, It's mandatory to setup CrowdSec Agent too.

Installation

Configuration

Step 1: Setup CrowdSec Agent

Follow this documentation from CrowdSec. You may need to setup the collections, logs and more too.

Then, you need to get a bouncer api token.

sudo cscli bouncers add mediawiki-bouncer

Remember the token key. It need to put on extension configuration.

It's highly recommended to register Central API for pull blocklist from remote.

sudo cscli capi register

Step 2: Setup Extension

wfLoadExtension( 'CrowdSec' );
$wgCrowdSecAPIKey = ""; // put lapi key here.

This is basic configuration. More configuration is documented on README

AbuseFilter Integration

There's AbuseFilter integration. The variable crowdsec_blocked is representing...

  • false: LAPI Request was failed. or failed to get user ip.
  • 'ok': This user is ok to process.
  • 'ban': This user is reported for "ban" from LAPI.
  • ... and various (custom) types via CrowdSec. including 'captcha'

User rights

  • crowdsec-bypass - allows users to bypass crowdsec check.

See also

Category:Spam management extensions
Category:AbuseFilter-builder extensions Category:AbuseFilter-computeVariable extensions Category:AbuseFilter-generateUserVars extensions Category:All extensions Category:Experimental extensions Category:Extensions in GitHub version control Category:Extensions which add rights Category:Extensions with manual MediaWiki version Category:Extensions without a compatibility policy Category:Extensions without an image Category:GPL licensed extensions Category:GetUserPermissionsErrorsExpensive extensions Category:OtherBlockLogLink extensions Category:Page action extensions Category:Spam management extensions