2017 © Pedro Peláez
 

library authorization

Xillion Authorization Policy Framework for PHP

image

xillion/authorization

Xillion Authorization Policy Framework for PHP

  • Friday, January 29, 2016
  • by joostfaassen
  • Repository
  • 1 Watchers
  • 2 Stars
  • 3 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 0 Forks
  • 0 Open issues
  • 2 Versions
  • 0 % Grown

The README.md

Xillion Authorization Policy Framework

, (*1)

What is Xillion Authorization?

Xillion Authorization is an Authorization Policy Framework based on Amazon's IAM and Resource policies., (*2)

It allows for decentralized, highly flexible security access control., (*3)

This is work in progress. See test/ for examples of usage., (*4)

Example usage:

use Xillion\Core\Resource;
use Xillion\Authorization\Action;
use Xillion\Authorization\PolicySerializer\JsonPolicySerializer;
use Xillion\Authorization\PolicyLoader\JsonPolicyLoader;


// The authorization context keeps track of policies, and can perform authorization checks
$context = new Context();

// What action is going to be performed?
$action = new Action('s3', 'ListBucket');

// Who is going to perform the action?
$identity = new Identity('AWS', 'xrn:aws:iam::AWS-account-ID:user/bob');

// What resource is the action going to be performed on?
$resource = new Resource('xrn:aws:s3:eu-west-1:12345:some-bucket');


// Load policies from a file
$loader = new JsonPolicyLoader();
$policy = $loader->load(__DIR__ . '/resource-policy1.json');

// Add the loaded policy to the context
$context->addResourcePolicy($resource, $policy);

// Check if the identity is allowed to perform the action on the resource
if ($context->isAllowed($identity, $resource, $action))) {
    echo "Action is allowed on this resource by this identity";
} else {
    echo "Action is denied on this resource by this identity";
}

License

MIT (see LICENSE), (*5)

Brought to you by the LinkORB Engineering team


Check out our other projects at linkorb.com/engineering., (*6)

Btw, we're hiring!, (*7)

The Versions

29/01 2016

dev-master

9999999-dev https://github.com/xillion-project/authorization

Xillion Authorization Policy Framework for PHP

  Sources   Download

MIT

The Requires

 

The Development Requires

authorization security policy xrn arn

29/01 2016

v1.0.0

1.0.0.0 https://github.com/xillion-project/authorization

Xillion Authorization Policy Framework for PHP

  Sources   Download

MIT

The Requires

 

The Development Requires

authorization security policy xrn arn