BjyAuthorize - Acl security for ZF2

Overview

BjyAuthorize - Acl security for ZF2

Deprecated

This package is now officially deprecated and will not receive any future updates or bug fixes.

As long-term support for Zend Framework 2 ended on 2018-03-31, any users who currently rely on this package are heavily encouraged to migrate to Zend Framework 3 or another framework.


Build Status Coverage Status Total Downloads Latest Stable Version Latest Unstable Version Dependency Status

This module is designed to provide a facade for Zend\Permissions\Acl that will ease its usage with modules and applications. By default, it provides simple setup via config files or by using Zend\Db or Doctrine ORM/ODM (via ZfcUserDoctrineORM).

What does BjyAuthorize do?

BjyAuthorize adds event listeners to your application so that you have a "security" or "firewall" that disallows unauthorized access to your controllers or routes.

This is what a normal Zend\Mvc application workflow would look like:

Zend Mvc Application workflow

And here's how it would look like with BjyAuthorize enabled:

Zend Mvc Application workflow with BjyAuthorize

Requirements

Installation

Composer

The suggested installation method is via composer:

php composer.phar require bjyoungblood/bjy-authorize:1.4.*
php composer.phar require zf-commons/zfc-user:0.1.*

Configuration

Following steps apply if you want to use ZfcUser with Zend\Db. If you want to use Doctrine ORM/ODM, you should also check the doctrine documentation.

  1. Ensure that following modules are enabled in your application.config.php file in the this order:
    • ZfcBase
    • ZfcUser
    • BjyAuthorize
  2. Import the SQL schema located in ./vendor/BjyAuthorize/data/schema.sql.
  3. Create a ./config/autoload/bjyauthorize.global.php file and fill it with configuration variable values as described in the following annotated example.

Here is an annotated sample configuration file:

\BjyAuthorize\Provider\Identity\ZfcUserZendDb::class, /* If you only have a default role and an authenticated role, you can * use the 'AuthenticationIdentityProvider' to allow/restrict access * with the guards based on the state 'logged in' and 'not logged in'. * * 'default_role' => 'guest', // not authenticated * 'authenticated_role' => 'user', // authenticated * 'identity_provider' => \BjyAuthorize\Provider\Identity\AuthenticationIdentityProvider::class, */ /* role providers simply provide a list of roles that should be inserted * into the Zend\Acl instance. the module comes with two providers, one * to specify roles in a config file and one to load roles using a * Zend\Db adapter. */ 'role_providers' => [ /* here, 'guest' and 'user are defined as top-level roles, with * 'admin' inheriting from user */ \BjyAuthorize\Provider\Role\Config::class => [ 'guest' => [], 'user' => ['children' => [ 'admin' => [], ]], ], // this will load roles from the user_role table in a database // format: user_role(role_id(varchar], parent(varchar)) \BjyAuthorize\Provider\Role\ZendDb::class => [ 'table' => 'user_role', 'identifier_field_name' => 'id', 'role_id_field' => 'role_id', 'parent_role_field' => 'parent_id', ], // this will load roles from // the 'BjyAuthorize\Provider\Role\ObjectRepositoryProvider' service \BjyAuthorize\Provider\Role\ObjectRepositoryProvider::class => [ // class name of the entity representing the role 'role_entity_class' => 'My\Role\Entity', // service name of the object manager 'object_manager' => 'My\Doctrine\Common\Persistence\ObjectManager', ], ], // resource providers provide a list of resources that will be tracked // in the ACL. like roles, they can be hierarchical 'resource_providers' => [ \BjyAuthorize\Provider\Resource\Config::class => [ 'pants' => [], ], ], /* rules can be specified here with the format: * [roles (array], resource, [privilege (array|string], assertion]) * assertions will be loaded using the service manager and must implement * Zend\Acl\Assertion\AssertionInterface. * *if you use assertions, define them using the service manager!* */ 'rule_providers' => [ \BjyAuthorize\Provider\Rule\Config::class => [ 'allow' => [ // allow guests and users (and admins, through inheritance) // the "wear" privilege on the resource "pants" [['guest', 'user'], 'pants', 'wear'], ], // Don't mix allow/deny rules if you are using role inheritance. // There are some weird bugs. 'deny' => [ // ... ], ], ], /* Currently, only controller and route guards exist * * Consider enabling either the controller or the route guard depending on your needs. */ 'guards' => [ /* If this guard is specified here (i.e. it is enabled], it will block * access to all controllers and actions unless they are specified here. * You may omit the 'action' index to allow access to the entire controller */ \BjyAuthorize\Guard\Controller::class => [ ['controller' => 'index', 'action' => 'index', 'roles' => ['guest','user']], ['controller' => 'index', 'action' => 'stuff', 'roles' => ['user']], // You can also specify an array of actions or an array of controllers (or both) // allow "guest" and "admin" to access actions "list" and "manage" on these "index", // "static" and "console" controllers [ 'controller' => ['index', 'static', 'console'], 'action' => ['list', 'manage'], 'roles' => ['guest', 'admin'], ], [ 'controller' => ['search', 'administration'], 'roles' => ['staffer', 'admin'], ], ['controller' => 'zfcuser', 'roles' => []], // Below is the default index action used by the ZendSkeletonApplication // ['controller' => 'Application\Controller\Index', 'roles' => ['guest', 'user']], ], /* If this guard is specified here (i.e. it is enabled], it will block * access to all routes unless they are specified here. */ \BjyAuthorize\Guard\Route::class => [ ['route' => 'zfcuser', 'roles' => ['user']], ['route' => 'zfcuser/logout', 'roles' => ['user']], ['route' => 'zfcuser/login', 'roles' => ['guest']], ['route' => 'zfcuser/register', 'roles' => ['guest']], // Below is the default index action used by the ZendSkeletonApplication ['route' => 'home', 'roles' => ['guest', 'user']], ], ], ], ];">


// For PHP <= 5.4, you should replace any ::class references with strings
// remove the first \ and the ::class part and encase in single quotes

return [
    'bjyauthorize' => [

        // set the 'guest' role as default (must be defined in a role provider)
        'default_role' => 'guest',

        /* this module uses a meta-role that inherits from any roles that should
         * be applied to the active user. the identity provider tells us which
         * roles the "identity role" should inherit from.
         * for ZfcUser, this will be your default identity provider
        */
        'identity_provider' => \BjyAuthorize\Provider\Identity\ZfcUserZendDb::class,

        /* If you only have a default role and an authenticated role, you can
         * use the 'AuthenticationIdentityProvider' to allow/restrict access
         * with the guards based on the state 'logged in' and 'not logged in'.
         *
         * 'default_role'       => 'guest',         // not authenticated
         * 'authenticated_role' => 'user',          // authenticated
         * 'identity_provider'  => \BjyAuthorize\Provider\Identity\AuthenticationIdentityProvider::class,
         */

        /* role providers simply provide a list of roles that should be inserted
         * into the Zend\Acl instance. the module comes with two providers, one
         * to specify roles in a config file and one to load roles using a
         * Zend\Db adapter.
         */
        'role_providers' => [

            /* here, 'guest' and 'user are defined as top-level roles, with
             * 'admin' inheriting from user
             */
            \BjyAuthorize\Provider\Role\Config::class => [
                'guest' => [],
                'user'  => ['children' => [
                    'admin' => [],
                ]],
            ],

            // this will load roles from the user_role table in a database
            // format: user_role(role_id(varchar], parent(varchar))
            \BjyAuthorize\Provider\Role\ZendDb::class => [
                'table'                 => 'user_role',
                'identifier_field_name' => 'id',
                'role_id_field'         => 'role_id',
                'parent_role_field'     => 'parent_id',
            ],

            // this will load roles from
            // the 'BjyAuthorize\Provider\Role\ObjectRepositoryProvider' service
            \BjyAuthorize\Provider\Role\ObjectRepositoryProvider::class => [
                // class name of the entity representing the role
                'role_entity_class' => 'My\Role\Entity',
                // service name of the object manager
                'object_manager'    => 'My\Doctrine\Common\Persistence\ObjectManager',
            ],
        ],

        // resource providers provide a list of resources that will be tracked
        // in the ACL. like roles, they can be hierarchical
        'resource_providers' => [
            \BjyAuthorize\Provider\Resource\Config::class => [
                'pants' => [],
            ],
        ],

        /* rules can be specified here with the format:
         * [roles (array], resource, [privilege (array|string], assertion])
         * assertions will be loaded using the service manager and must implement
         * Zend\Acl\Assertion\AssertionInterface.
         * *if you use assertions, define them using the service manager!*
         */
        'rule_providers' => [
            \BjyAuthorize\Provider\Rule\Config::class => [
                'allow' => [
                    // allow guests and users (and admins, through inheritance)
                    // the "wear" privilege on the resource "pants"
                    [['guest', 'user'], 'pants', 'wear'],
                ],

                // Don't mix allow/deny rules if you are using role inheritance.
                // There are some weird bugs.
                'deny' => [
                    // ...
                ],
            ],
        ],

        /* Currently, only controller and route guards exist
         *
         * Consider enabling either the controller or the route guard depending on your needs.
         */
        'guards' => [
            /* If this guard is specified here (i.e. it is enabled], it will block
             * access to all controllers and actions unless they are specified here.
             * You may omit the 'action' index to allow access to the entire controller
             */
            \BjyAuthorize\Guard\Controller::class => [
                ['controller' => 'index', 'action' => 'index', 'roles' => ['guest','user']],
                ['controller' => 'index', 'action' => 'stuff', 'roles' => ['user']],
                // You can also specify an array of actions or an array of controllers (or both)
                // allow "guest" and "admin" to access actions "list" and "manage" on these "index",
                // "static" and "console" controllers
                [
                    'controller' => ['index', 'static', 'console'],
                    'action' => ['list', 'manage'],
                    'roles' => ['guest', 'admin'],
                ],
                [
                    'controller' => ['search', 'administration'],
                    'roles' => ['staffer', 'admin'],
                ],
                ['controller' => 'zfcuser', 'roles' => []],
                // Below is the default index action used by the ZendSkeletonApplication
                // ['controller' => 'Application\Controller\Index', 'roles' => ['guest', 'user']],
            ],

            /* If this guard is specified here (i.e. it is enabled], it will block
             * access to all routes unless they are specified here.
             */
            \BjyAuthorize\Guard\Route::class => [
                ['route' => 'zfcuser', 'roles' => ['user']],
                ['route' => 'zfcuser/logout', 'roles' => ['user']],
                ['route' => 'zfcuser/login', 'roles' => ['guest']],
                ['route' => 'zfcuser/register', 'roles' => ['guest']],
                // Below is the default index action used by the ZendSkeletonApplication
                ['route' => 'home', 'roles' => ['guest', 'user']],
            ],
        ],
    ],
];

Helpers and Plugins

There are view helpers and controller plugins registered for this module. In either a controller or a view script, you can call $this->isAllowed($resource[, $privilege]), which will query the ACL using the currently authenticated (or default) user's roles.

Whenever you need to stop processing your action you can throw an UnAuthorizedException and users will see you message on a 403 page.

function cafeAction() {
    if (!$this->isAllowed('alcohol', 'consume')) {
        throw new \BjyAuthorize\Exception\UnAuthorizedException('Grow a beard first!');
    }

    // party on ...
}

License

Released under the MIT License. See file LICENSE included with the source code for this project for a copy of the licensing terms.

Comments
  • 2.0.0 RFC

    2.0.0 RFC

    BjyAuthorize 2.0.0 RFC

    The current major plan for 2.0.0 is an overhaul of the module with a focus on abstraction, with the goal of supporting both Zend\Permissions\Acl and Zend\Permissions\Rbac.

    This issue is aimed at determining the overarching goals, features, and other major changes or refactorings that will involve a major release.

    This RFC is open to the public. If there is something you would like to see (or specifically not see) in BjyAuthorize 2.0.0, please comment here.

    We will create new issues for items that are accepted or require more discussion.

    Interface

    The authorization service could be abstracted into following interface:

    interface AuthorizationServiceInterface
    {
        public function hasResource($resource);
        public function isAuthorized($resource);
    }
    

    Which basically means that each authorization service is aware of its own identity roles

    Concept

    Given following config:

    return array(
        'bjyauthorize' => array(
            'authorization_services' => array(
                // ze number is ze priority
                'BjyAuthorize\Service\AclAuthorize' => 1000,
                'BjyAuthorize\Service\RbacAuthorize' => 2000,
            ),
    
            'BjyAuthorize\Service\AclAuthorize' => array(
                // previous bjyauthorize config
            ),
    
            'BjyAuthorize\Service\RbacAuthorize' => array(
                // new rbac config
            ),
        ),
    );
    

    Two authorization services will be spawned within an AggregateAuthorizationService that is composed of an RbacAuthorize and an AclAuthorize. These two services are put into a priority queue (maybe as event listeners?) and are checked in sequence each time hasResource or isAuthorized are called on the aggregate authorization service.

    enhancement question archive 
    opened by bjyoungblood 32
  • ZF3 compatibility

    ZF3 compatibility

    hi,

    added full ZF3 support, dropped ZF2-eventmanager and set min PHP5.6

    changed autoloader to PSR-4 added php-nightly in travis

    i stuck atm @ hhvm UnitTests, mabye someone can help.

    for testing you can add following in your composer.json "kokspflanze/bjy-authorize": "~1.6"

    archive 
    opened by kokspflanze 30
  • Added a Role Doctrine entity class

    Added a Role Doctrine entity class

    This is my first ever pull request so I hope I've done this right!

    Description

    I recently started using BjyAuthorize with Doctrine and didn't like the fact that I had to import the schema.sql and then write a layer above that to make it possible to manage the permissions so I decided to make a Roles entity which linked to a User entity. After a bit of thought I thought others might like this too so I wrote it into the module.

    Usage

    The usage is very simple:

    Firstly you need to be using ZfcUserDoctrineORM

    Creating the entities

    Next you will need to create your User & Role entity classes in your project entity folder.

    Your User entity class must implement BjyAuthorize\Provider\Role\ProviderInterface and ZfcUser\Entity\UserInterface

    Your Role entity class must implement BjyAuthorize\Acl\HierarchicalRoleInterface

    Examples are provided as BjyAuthorize/data/User.php.dist and BjyAuthorized/data/Role.php.dist

    Once you have created your entities you can set up the database with the following command

    ./vendor/bin/doctrine-module orm:schema-tool:create
    

    Configuring ZfcUser and BjyAuthorize

    Next in your ZfcUser configuration specify your user entity class for the user_entity_class setting

    Then in you bjyauthorize settings include the following 2 options:

    // Set to use the DoctrineEntity identity provider
    'identity_provider'     => 'BjyAuthorize\Provider\Identity\ZfcUserDoctrineEntity',
    
    // Set to use the DoctrineEntity role provider
    'role_providers'        => array(
        'BjyAuthorize\Provider\Role\DoctrineEntity' => array(
            'role_entity_class' => 'FQCN TO YOUR ROLE ENTITY CLASS',
         ),
    ),
    

    And you're configured and ready to go. All you need to do is make sure your default role is added to the database.

    I hope you find this a useful addition, if it is not something you want to accept maybe I should offer it as a separate module?

    enhancement 
    opened by tomphp 27
  • Can't use BjyAuthorize with ScnSocialAuth

    Can't use BjyAuthorize with ScnSocialAuth

    I am struggling to get BjyAuthorize working with ScnSocialAuth. Both libraries work by themselves fine. But when they are put together, social authentication does not work.

    I have been testing this on my ZF2 project and initially I thought it was something I have done wrong in my project. But then I have created a fork of ZendSkeletonApplication and applied the default config to see if it works. But it is the same result.

    ZendDb authentication works fine, but Social Auth via facebook fails with "Authentication failed. Please try again."

    Here is my forked ZendSkeletonApplication project https://github.com/jeffery/ZendSkeletonApplication (test-scnsocialauth-bjyauthorize branch)

    And some additional local configuration files I used to test against ZendDb + facebook: https://gist.github.com/anonymous/7701797 Please update with your own config.

    If someone has these modules working together, I would like to know how.

    The following is my composer config:

    {
        "name": "zendframework/skeleton-application",
        "description": "Skeleton Application for ZF2",
        "license": "BSD-3-Clause",
        "keywords": [
            "framework",
            "zf2"
        ],
        "homepage": "http://framework.zend.com/",
        "minimum-stability": "dev",
        "require": {
            "php": ">=5.3.3",
            "zendframework/zendframework": "2.2.*",
            "bjyoungblood/bjy-authorize": "1.4.*",
            "zf-commons/zfc-user": "0.1.*",
            "socalnick/scn-social-auth": "1.11.*"
        }
    }
    
    bug question wontfix 
    opened by jeffery 25
  • BjyAuthorize\Service\Authorize::isAllowed()

    BjyAuthorize\Service\Authorize::isAllowed()

    Hello! The method isAllowed of class BjyAuthorize\Service\Authorize catches the exception (Zend\Permissions\Acl\Exception\InvalidArgumentException) if the role was not found. It's good. If one of the role providers are not able to get a list of roles (for example, the database is not available), it will provide an acceptable behavior. It is very good. The problem is that the previous line ($this->loaded && $this->loaded->__invoke();) is not included in the try / catch. And if the role is not found, it generates the same exception (Zend\Permissions\Acl\Exception\InvalidArgumentException).

    Would you move the previous line ($this->loaded && $this->loaded->__invoke();) in the try / catch block ?

    P.S: isAllowed ==> load() ==> loadAcl() ==> loadRule()

    in loadRule() : (If the role specified in the rules, but the roles provider could not get it) $this->acl->allow() (or $this->acl->deny()) throw Zend\Permissions\Acl\Exception\InvalidArgumentException

    enhancement invalid 
    opened by dphn 20
  • Can't use BjyAuthorize with ScnSocialAuth

    Can't use BjyAuthorize with ScnSocialAuth

    I couldn't decide where to open this issue as it concerns both modules, but i finally chose to create it here, sorry :)

    Before i explain a bit more what the problem is, here are the different BjyAuthorize configurations i've been using. They all led to the same error. Following @Ocramius advice on IRC, i also commented out both event manager attachments in the Module onBootstrap method (#1 and #2) but it didn't remove the error either.

    The error i'm getting is thrown as soon as i have both modules in the modules list in application.config.php (BjyAuthorize or ScnSocialAuth alone works) it says : Request URI has not been set. Please set your correct home route key in the scn-social-auth.local.php config file. It's thrown here in ScnSocialAuth module. It seems that the ZF2 router can't find the home route key anymore.

    It's getting to this part of ScnSocialAuth because AuthenticationDoctrineEntityFactory calls zfcuser_auth_service wich starts up the whole authentication chain, including ScnSocialAuth's.

    Thanks for your help.

    Pinging @SocalNick in case he has any idea.

    opened by jhuet 20
  • Rule Providers not being added

    Rule Providers not being added

    I'm trying to implement ACL on our site and have been hitting a wall in regards to the guards working perfectly, but even the example rule providers not working correctly.

    The issue stems from the following piece of code in Authorize.php

    private function getOrCreateService($class, $options)
        {
            if ($this->serviceLocator->has($class)) {
                return $this->serviceLocator->get($class);
            }
    
            return new $class($options, $this->serviceLocator);
        }
    

    Because the section within the if statement is returning true, it's returning an empty instance of the configuration class. This then causes the load() function to not be able to add the rule.

    Now, as a newbie as ZF2, it's entirely possible I'm doing something wrong, but having followed your example and that of others to the letter, I'm thinking it may be a documentation issue (if not an actual bug).

    Here's the relevant section from my config file

    // Resource providers to be used to load all available resources into Zend\Permissions\Acl\Acl
            // Keys are the provider service names, values are the options to be passed to the provider
            'resource_providers' => array(
                'BjyAuthorize\Provider\Resource\Config' => array(
                    'faq' => array(),
                ),
            ),
    
            // Rule providers to be used to load all available rules into Zend\Permissions\Acl\Acl
            // Keys are the provider service names, values are the options to be passed to the provider
            'rule_providers' => array(
                'BjyAuthorize\Provider\Rule\Config' => array(
                    'allow' => array(
                        // allow guests and users (and admins, through inheritance)
                        // the "wear" privilege on the resource "pants"
                        array(array('guest', 'customer'), 'faq', 'add')
                    ),
    
                ),
            ),
    
            // Guard listeners to be attached to the application event manager
            'guards'                => array(
                'BjyAuthorize\Guard\Controller' => array(
                    array('controller' => 'zfcuser', 'roles' => array()),
                    array('controller' => 'Application\Controller\Index', 'roles' => array()),
    
                    // Default Action (Grant access to all to be able to use rule_providers
                    array('controller' => 'Faq\Controller\Faq', 'roles' => array('guest', 'customer')),
                    array('controller' => 'Pages\Controller\Index', 'roles' => array('guest', 'customer')),
                    array('controller' => 'Project\Controller\Project', 'roles' => array('guest', 'customer')),
                ),
            ),
    

    In terms of fixing it, I've commented out the if statement and all seems to work as intended (though I assume it has broken other more advanced functionality).

    Any ideas?

    bug duplicate 
    opened by aaronweatherall 16
  • Catchable fatal error: Argument 2 passed to BjyAuthorize\Provider\Role\Doctrine::__construct() must be an instance of Doctrine\ORM\EntityManager, instance of Zend\ServiceManager\ServiceManager given

    Catchable fatal error: Argument 2 passed to BjyAuthorize\Provider\Role\Doctrine::__construct() must be an instance of Doctrine\ORM\EntityManager, instance of Zend\ServiceManager\ServiceManager given

    called in vendor\bjyoungblood\bjy-authorize\src\BjyAuthorize\Service\Authorize.php on line 82 and defined in vendor\bjyoungblood\bjy-authorize\src\BjyAuthorize\Provider\Role\Doctrine.php on line 45

    opened by ghost 16
  • How to set Controller Guard outside of module.config.php

    How to set Controller Guard outside of module.config.php

    I want to change actions and roles for Controller Guards from my website's admin area. Is there a way to set these guards dynamically via code?

    Currently there is a static way to set controller guards in module.config.php file, but I don't see a way to manipulate them from code.

    Poking around in BjyAuthorize\Module.php I see $app->getEventManager()->attach($guard). Not sure if this is is, but I presume that what I want to do is possible. But how, what is the syntax for it, and how can I detach guards as well?

    question 
    opened by dennis-fedco 15
  • SQL schema update cause some troubles.

    SQL schema update cause some troubles.

    @Danielss89 has done a pull request (164) in order to update the schema.sql Now, the documentation isn't up to date and some files haven't been updated accordingly..

    My main issue is with the Provider/Identity/ZfcUserZendDb.php in the method getIdentityRoles This method should return a string corresponding of the roleId but now, it returns an int and ZF doesn't know this role (as it receive an id like: 7 instead of a name like 'admin'). My workaround for now is to use this id (i.e. 7) and query the user_role table in order to get the corresponding string (i.e. admin)

    bug duplicate 
    opened by cyrilf 15
  • how to debug current role, ZendDeveloperTools doesn't work

    how to debug current role, ZendDeveloperTools doesn't work

    how to show current role without ZendDeveloperTools?

    ZendDeveloperTools doesn't work for me, and there is close to no information about debugging anything.

    my application.config.php

    'modules' => array(
            'ZendDeveloperTools',
            'Application',
            'ZfcBase',
            'ZfcUser',
            'BjyAuthorize',
            'ZfcAdmin',
        ),
    

    my zenddevelopertools config:

    'enabled' => true,
    

    my bjyauthorize.global.php:

    'default_role'          => 'guest',
    'guards' => array(
      'BjyAuthorize\Guard\Controller' => array(
         array('controller' => 'Application\Controller\Index', 'roles' => array('guest', 'user', 'admin')),
      ),
    ),
    

    composer.json

        "require": {
            "php": ">=5.3.3",
            "zendframework/zendframework": "2.2.0",
            "zf-commons/zfc-admin": "dev-master",
            "bjyoungblood/bjy-authorize": "1.3.0",
            "zf-commons/zfc-user": "0.1.2",
            "zendframework/zend-developer-tools": "dev-master"
        }
    
    opened by gondo 15
Owner
Ben Youngblood
Staff Engineer at @smartrent
Ben Youngblood
Exploiting and fixing security vulnerabilities of an old version of E-Class. Project implemented as part of the class YS13 Cyber-Security.

Open eClass 2.3 Development of XSS, CSRF, SQLi, RFI attacks/defences of an older,vulnerable version of eclass. Project implemented as part of the clas

Aristi_Papastavrou 11 Apr 23, 2022
[READ-ONLY] CakePHP Utility classes such as Inflector, Text, Hash, Security and Xml. This repo is a split of the main code that can be found in https://github.com/cakephp/cakephp

CakePHP Utility Classes This library provides a range of utility classes that are used throughout the CakePHP framework What's in the toolbox? Hash A

CakePHP 112 Feb 15, 2022
Here are few exercises to practice how to implement API Security with NGINX App-Protect WAF.

api-security-lab This repo contains files for customers and partners to practice an API Security with NGINX App-Protect WAF. To demonstrate the capabi

null 4 Mar 30, 2022
A PHP dependency vulnerabilities scanner based on the Security Advisories Database.

Enlightn Security Checker The Enlightn Security Checker is a command line tool that checks if your application uses dependencies with known security v

Enlightn 242 Dec 26, 2022
Your performance & security consultant, an artisan command away.

Enlightn A Laravel Tool To Boost Your App's Performance & Security Introduction Think of Enlightn as your performance and security consultant. Enlight

Enlightn 726 Jan 1, 2023
A curated list of resources for learning about application security

Awesome AppSec A curated list of resources for learning about application security. Contains books, websites, blog posts, and self-assessment quizzes.

Paragon Initiative Enterprises 5.4k Jan 7, 2023
Harden request headers, login interface and passwords to increase backend security.

JvMTECH.NeosHardening Package for Neos CMS Harden request headers, login interface and passwords to increase backend security. Installation composer r

Jung von Matt TECH 3 May 4, 2022
A htaccess boilerplate for all Magento Community installations. Features focus on speed, SEO and security.

magento-htaccess A htaccess boilerplate for all Magento Community installations. Features focus on speed, SEO and security. The file should be placed

Creare 114 Sep 18, 2022
A Magento community sourced security pre-flight checklist.

Magento Security Checklist This is a community sourced checklist of security measures to take before launching your store. Think of it as a pre-flight

Talesh Seeparsan 119 Oct 27, 2022
List of Magento extensions with known security issues.

Magento Vulnerability Database List of Magento 1 and 2 integrations with known security issues. Objective: easily identify insecure 3rd party software

Sansec 184 Dec 7, 2022
A simple way to know if you are on the list of major security breaches like "HIBP", but it is specific for Iran.

Leakfa.com A simple way to know if you are on the list of major security breaches like "HIBP", but it is specific for Iran. Service content This produ

Leakfa 100 Nov 20, 2022
This package is considered feature-complete, and is now in security-only maintenance mode

laminas-soap This package is considered feature-complete, and is now in security-only maintenance mode, following a decision by the Technical Steering

Laminas Project 46 Dec 18, 2022
Regexp Security Cheatsheet

Regexp Security Cheatsheet Research was done to find "weak places" in regular expressions of Web Application Firewalls (WAFs). Repository contains SAS

Vlad I 610 Dec 25, 2022
Major Security Vulnerability on PrestaShop Websites - CVE-2022-31101

Fix Major Security Vulnerability on PrestaShop Websites ?? CVE-2022-31101 detector and fixer! A newly found exploit could allow remote attackers to ta

Mathias Reker ⚡️ 25 Nov 22, 2022
A Laravel 9 package that allows you enforce security of your artisan commands by authenticating users before running.

Introduction This package allows you as a developer to restrict who can and cannot run artisan commands, especially in a production environment. For e

YOo Slim 2 Sep 15, 2022
Dobren Dragojević 6 Jun 11, 2023
A flexible, driver based Acl package for PHP 5.4+

Lock - Acl for PHP 5.4+ I'm sad to say that Lock is currently not maintained. I won't be able to offer support or accept new contributions for the cur

Beatswitch 892 Dec 30, 2022
An authorization library that supports access control models like ACL, RBAC, ABAC in PHP .

PHP-Casbin Documentation | Tutorials | Extensions Breaking News: Laravel-authz is now available, an authorization library for the Laravel framework. P

PHP-Casbin 1.1k Dec 14, 2022
Dynamic ACL is a package that handles Access Control Level on your Laravel Application.

Dynamic ACL Dynamic ACL is a package that handles Access Control Level on your Laravel Application. It's fast to running and simple to use. Install an

yasin 8 Jul 31, 2022
This is a plugin based on Vokuro ACL idea

IMPORATNT! You should switch to branch v3.0.0 We have switched to facebook/graph-sdk 5.4 ! $ composer require crada/phalcon-user-plugin:^3.0 Phalcon U

Calin Rada 186 Dec 27, 2022