Download the PHP package pauloamgomes/cockpit-cms-userflood without Composer
On this page you can find all versions of the php package pauloamgomes/cockpit-cms-userflood. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download pauloamgomes/cockpit-cms-userflood
More information about pauloamgomes/cockpit-cms-userflood
Files in pauloamgomes/cockpit-cms-userflood
Package cockpit-cms-userflood
Short Description Cockpit CMS Authentication Flood addon
License MIT
Homepage https://github.com/pauloamgomes/cockpit-cms-kint
Informations about the package cockpit-cms-userflood
Cockpit CMS UserFlood Addon
This addon extends Cockpit CMS (Next) core by providing a very simple feature of locking users after a configurable number of failed login attempts.
Installation
Manual
Download latest release and extract to COCKPIT_PATH/addons/UserFlood directory
Git
Cockpit CLI
Composer
-
Make sure path to cockpit addons is defined in your projects' composer.json file:
- In your project root run:
Configuration
The number of failed attempts can be configured as below:
If no configuration is provided a default of 4 login failures is used.
An user is set to inactive (blocked) after 16 consecutive failed login attempts (tot. 4 lockouts).
The failban option automatically blacklist user's IP related to max number of allowed errors.
Usage
The UserFlood Addon doesn't provide (yet) any user interface, it works on the background during the authentication workflow, using the cockpit.authentication.failed, cockpit.authentication.success and cockpit.accounts.save events.
- A user is set to inactive (blocked) when it fails n login attempts.
- In order to be able to login user needs to be set again to Active via admin interface.
Extensibility
The UserFlood Addon provides the following events that can be handled by other Addons:
flood.insert- on each failure attemptflood.block- when max number of failed attemps is reached and user is lockedflood.reset- when flood user entries are removed
Todo and Improvements
- Block user via ip address
- Define a timeline where the blocking should occur (e.g. block if 10 attemps in last hour)
- Create admin interface with list of all flood events
Copyright and license
Copyright 2018 pauloamgomes under the MIT license.