2017 © Pedro Peláez
 

library abac

Attribute based access control

image

sam-it/abac

Attribute based access control

  • Tuesday, September 19, 2017
  • by SamMousa
  • Repository
  • 3 Watchers
  • 3 Stars
  • 740 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 2 Forks
  • 0 Open issues
  • 12 Versions
  • 38 % Grown

The README.md

PHP Attribute Based Access Control (ABAC)

A simple framework for implementing ABAC in your application., (*1)

Rules

Rules implement business logic, the input for rule execution consists of: - source: The actor, usually the current user - target: The subject, the entity that the actor wishes to act upon - permission: The action the actor wishes to take - environment: The environment should contain anything else the business rules may need, (*2)

Rules are encouraged to do recursive access check. A typical rule could be WriteImpliesRead, since for most systems when you can write an object you can also read it. Implementation could look like this:, (*3)

public function execute(
    object $source,
    object $target,
    string $permission,
    Environment $environment,
    AccessChecker $accessChecker
): bool {
    return $permission === 'read' && $accessChecker->check($source, $target, 'write');
}

Environment

Consider a rule that allows access only during office hours. The current time should then be set in the environment. Reasoning behind this is that having 1 location for the environment allows for easy testing as well as a single source of truth., (*4)

Infinite loops

Rules can contain infinite loops, we track recursion depth to detect these loops., (*5)

External links

The Versions

19/09 2017

dev-master

9999999-dev

Attribute based access control

  Sources   Download

MIT

The Requires

 

19/09 2017

v1.4.2

1.4.2.0

Attribute based access control

  Sources   Download

MIT

The Requires

 

15/09 2017

v1.4.1

1.4.1.0

Attribute based access control

  Sources   Download

MIT

15/09 2017

v1.4.0

1.4.0.0

Attribute based access control

  Sources   Download

MIT

04/09 2017

v1.3.0

1.3.0.0

Attribute based access control

  Sources   Download

MIT

29/08 2017

v1.2.2

1.2.2.0

Attribute based access control

  Sources   Download

MIT

11/08 2017

v1.2.1

1.2.1.0

Attribute based access control

  Sources   Download

MIT

07/08 2017

v1.2.0

1.2.0.0

Attribute based access control

  Sources   Download

MIT

14/07 2017

v1.1.0

1.1.0.0

Attribute based access control

  Sources   Download

MIT

23/06 2017

v1.0.2

1.0.2.0

Attribute based access control

  Sources   Download

MIT

23/06 2017

v1.0.1

1.0.1.0

Attribute based access control

  Sources   Download

MIT

02/06 2017

v1.0.0

1.0.0.0

Attribute based access control

  Sources   Download

MIT