norsys/security-bundle

Bundle that provides security tools

Installs: 103

Dependents: 0

Suggesters: 0

Security: 0

Stars: 0

Watchers: 9

Forks: 0

Open Issues: 0

Type:symfony-bundle

1.0.0 2018-07-17 11:34 UTC

This package is auto-updated.

Last update: 2024-04-28 08:26:17 UTC


README

Package version Total Downloads Build Status Scrutinizer Coverage Scrutinizer Code Quality License

SensioLabsInsight

Bundle that provides security tools.

Installation

Download the Bundle

Open a command console, enter your project directory and execute the following command to download the latest stable version of this bundle:

$ composer require norsys/security-bundle

This command requires you to have Composer installed globally, as explained in the installation chapter of the Composer documentation.

Enable the Bundle

Then, enable the bundle by adding it to the list of registered bundles in the app/AppKernel.php file of your project:

<?php
// app/AppKernel.php

// ...
class AppKernel extends Kernel
{
    public function registerBundles()
    {
        $bundles = array(
            // ...
            new Norsys\SecurityBundle\NorsysSecurityBundle(),
            // ...
        );
        // ...
    }
    // ...
}

HTTPS

This bundle provide a system to redirect all requests http to https

To enable https redirect system :

norsys_security:
    https_redirect: 
        enabled: true # default false

Proxy

This bundle provides a listener to set trusted proxies from environment variable.

norsys_security:
    proxy:
        enabled: true # default false
        env_variable_name: 'TRUSTED_PROXIES_LIST' # default 'TRUSTED_PROXIES'
        env_variable_separator: ';' # default ','
        trusted_header_set: 'HEADER_FORWARDED' # default 'HEADER_X_FORWARDED_ALL'

Coming Soon

Coming soon system display a 302 redirect page with coming soon message to all requests.

To configure system :

norsys_security:
    coming_soon: 
        enabled: true # default false
        template: ::coming_soon.html.twig # default NorsysSecurityBundle::coming_soon.html.twig
        allowed_ips: ['245.187.56.58', '190.85.134.50'] # default []

Credits

Developped with ❤️ by Norsys

License

This project is licensed under the MIT license.