floriansemm/expose-bundle


License
MIT

Documentation

ExposeBundle

Integrates the expose project into symfony. It allows you to register handlers to respond to reports for the current request. (to block users/ips, send notifications, etc.)

The bundle add a "suspend request" feature. If is the impact for the current request greater than the configured threshold (default is 7), then an IntrusionException will be thrown. All registered handlers will be executed before this check throws the exception.

Installation

composer require floriansemm/expose-bundle

Register the bundle:

<?php
// app/AppKernel.php

public function registerBundles()
{
    $bundles = array(
        // ...
        new FS\ExposeBundle\FSExposeBundle(),
    );
}

Add the configuration to your config.yml

fs_expose: ~

Configuration

If you want to allow all requests no matter what impact occurs, set the impact option to 0:

fs_expose:
    request_suspension:
        impact: 0

Add a intrusion-handler

  1. create a service which implements IntrusionHandlerInterface
  2. tag the service with expose.intrusion_handler