2017 © Pedro Peláez
 

library securilex

Securilex is a simplified security provider for Silex.

image

mlukman/securilex

Securilex is a simplified security provider for Silex.

  • Friday, November 24, 2017
  • by MLukman
  • Repository
  • 1 Watchers
  • 0 Stars
  • 43 Installations
  • PHP
  • 2 Dependents
  • 0 Suggesters
  • 1 Forks
  • 0 Open issues
  • 20 Versions
  • 2 % Grown

The README.md

Securilex

Packagist Version Build Status, (*1)

Securilex is a simplified security provider for Silex., (*2)

The main class for Securilex is \Securilex\SecurityServiceProvider., (*3)

Usage:, (*4)

// $app is instance of \Silex\Application
$app->register(new \Securilex\ServiceProvider());

// securilex is now a service
$app['securilex']-> ...

Authentication

Authentication deals with identifying user identity via login mechanism. The main class for authentication is \Securilex\Firewall., (*5)

To define a firewall, you need to define four items:, (*6)

  1. The path(s) to secure: whether the whole site (/) or just specific area (/admin/).
  2. The path to login page = optional, if none specific it will use browser login popup (i.e. Basic HTTP Authentication).
  3. The authentication factory = method of authentication, e.g. plaintext password validation, encoded password validation, LDAP, OAuth etc.
  4. The user provider = source to get the list of users, e.g. hard-coded, database etc.

The first two items are required when constructing a Firewall:, (*7)

$firewall = new \Securilex\Firewall('/secure/', '/login/');

You can define multiple secure paths to be under the same firewall:, (*8)

$firewall = new \Securilex\Firewall(array('/secure/', '/admin/'), '/login/');

The next two items are to be passed to addAuthenticationFactory method:, (*9)

$firewall->addAuthenticationFactory($authFactory, $userProvider);

Register the firewall to securilex using addFirewall() method:, (*10)

$app['securilex']->addFirewall($firewall);

Authentication Factory

Authentication Factory defines the method of authentication of user credentials. Securilex comes with a few ready-to-use authentication factories:, (*11)

  • PlaintextPasswordAuthenticationFactory - simply compares the entered password with the stored plaintext password.
  • LdapBindAuthenticationFactory - authenticates login using external LDAP service.
  • InitializableAuthenticationFactory - provides authentication mechanism that remembers the first password that users enter after registration/resetting the password. Requires a user provider that implements MutableUserProviderInterface (will be further explained in the next section).
  • SimpleAuthenticationFactory - delegates authentication to another class that implements SimpleAuthenticatorInterface.

You can create additional factories by: 1. implementing AuthenticationFactoryInterface (LdapBindAuthenticationFactory does this), or 2. extending SimpleAuthenticationFactory while implementing SimpleAuthenticatorInterface (PlaintextPasswordAuthenticationFactory and InitializableAuthenticationFactory do this)., (*12)

User Provider

User Provider provides the list of users who have access to the corresponding firewall. Securilex supports all Symfony's existing user providers while it also provides additional ones:, (*13)

  • NoPasswordUserProvider - when the application cannot know the passwords of the users, for example when using LdapBindAuthenticationFactory.
  • UserProviderSegmentalizer - when a list of users needs to be segmentalized to be authenticated by different authentication factories. Instead of defining two user providers with slightly different parameters and potentially causing redundant calls to database or external source, using segmentalizer will cache the user data while it is being authenticated by multiple authentication factories.

Authorization

Authorization deals with allowing or denying access to page or resource., (*14)

// TODO: Work In Progress, (*15)

The Versions

24/11 2017

dev-master

9999999-dev https://github.com/MLukman/Securilex

Securilex is a simplified security provider for Silex.

  Sources   Download

GPL

The Requires

 

The Development Requires

by Muhammad Lukman Nasaruddin

silex security securilex

24/11 2017

1.2.7

1.2.7.0 https://github.com/MLukman/Securilex

Securilex is a simplified security provider for Silex.

  Sources   Download

GPL

The Requires

 

The Development Requires

by Muhammad Lukman Nasaruddin

silex security securilex

18/09 2017

1.2.6

1.2.6.0 https://github.com/MLukman/Securilex

Securilex is a simplified security provider for Silex.

  Sources   Download

GPL

The Requires

 

The Development Requires

by Muhammad Lukman Nasaruddin

silex security securilex

10/08 2017

1.2.5

1.2.5.0 https://github.com/MLukman/Securilex

Securilex is a simplified security provider for Silex.

  Sources   Download

GPL

The Requires

 

The Development Requires

by Muhammad Lukman Nasaruddin

silex security securilex

31/07 2017

1.2.4

1.2.4.0 https://github.com/MLukman/Securilex

Securilex is a simplified security provider for Silex.

  Sources   Download

GPL

The Requires

 

The Development Requires

by Muhammad Lukman Nasaruddin

silex security securilex

27/07 2017

1.2.3

1.2.3.0 https://github.com/MLukman/Securilex

Securilex is a simplified security provider for Silex.

  Sources   Download

GPL

The Requires

 

The Development Requires

by Muhammad Lukman Nasaruddin

silex security securilex

22/07 2017

1.2.2

1.2.2.0 https://github.com/MLukman/Securilex

Securilex is a simplified security provider for Silex.

  Sources   Download

GPL

The Requires

 

The Development Requires

by Muhammad Lukman Nasaruddin

silex security securilex

11/04 2017

1.2.1

1.2.1.0 https://github.com/MLukman/Securilex

Securilex is a simplified security provider for Silex.

  Sources   Download

GPL

The Requires

 

The Development Requires

by Muhammad Lukman Nasaruddin

silex security securilex

11/04 2017

dev-release/1.2.0

dev-release/1.2.0 https://github.com/MLukman/Securilex

Securilex is a simplified security provider for Silex.

  Sources   Download

GPL

The Requires

 

The Development Requires

by Muhammad Lukman Nasaruddin

silex security securilex

31/03 2017

1.2.0

1.2.0.0 https://github.com/MLukman/Securilex

Securilex is a simplified security provider for Silex.

  Sources   Download

GPL

The Requires

 

The Development Requires

by Muhammad Lukman Nasaruddin

silex security securilex

29/07 2016

1.1.3

1.1.3.0 https://github.com/MLukman/Securilex

Securilex is a simplified security provider for Silex.

  Sources   Download

GPL

The Requires

 

by Muhammad Lukman Nasaruddin

silex security securilex

13/07 2016

1.1.2

1.1.2.0 https://github.com/MLukman/Securilex

Securilex is a simplified security provider for Silex.

  Sources   Download

GPL

The Requires

 

by Muhammad Lukman Nasaruddin

silex security securilex

09/07 2016

1.1.1

1.1.1.0 https://github.com/MLukman/Securilex

Securilex is a simplified security provider for Silex.

  Sources   Download

GPL

The Requires

 

by Muhammad Lukman Nasaruddin

silex security securilex

08/06 2016

1.1.0

1.1.0.0 https://github.com/MLukman/Securilex

Securilex is a simplified security provider for Silex.

  Sources   Download

GPL

The Requires

 

by Muhammad Lukman Nasaruddin

silex security securilex

06/06 2016

1.0.1

1.0.1.0 https://github.com/MLukman/Securilex

Securilex is a simplified security provider for Silex.

  Sources   Download

GPL

The Requires

 

by Muhammad Lukman Nasaruddin

silex security securilex

06/06 2016

1.0.0

1.0.0.0 https://github.com/MLukman/Securilex

Securilex is a simplified security provider for Silex.

  Sources   Download

GPL

The Requires

 

by Muhammad Lukman Nasaruddin

silex security securilex

01/06 2016

0.3.0

0.3.0.0 https://github.com/MLukman/Securilex

Securilex is a simplified security provider for Silex.

  Sources   Download

GPL

The Requires

 

by Muhammad Lukman Nasaruddin

silex security

31/05 2016

0.2.1

0.2.1.0 https://github.com/MLukman/Securilex

Securilex is a simplified security provider for Silex.

  Sources   Download

GPL

The Requires

 

by Muhammad Lukman Nasaruddin

silex security

31/05 2016

0.2.0

0.2.0.0 https://github.com/MLukman/Securilex

Securilex is a simplified security provider for Silex.

  Sources   Download

GPL

The Requires

 

by Muhammad Lukman Nasaruddin

silex security

31/05 2016

0.1.0

0.1.0.0 https://github.com/MLukman/Securilex

Securilex is a simplified security provider for Silex.

  Sources   Download

GPL

The Requires

 

by Muhammad Lukman Nasaruddin

silex security