Download the PHP package sandstorm/neosacl without Composer

On this page you can find all versions of the php package sandstorm/neosacl. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.

FAQ

After the download, you have to make one include require_once('vendor/autoload.php');. After that you have to import the classes with use statements.

Example:
If you use only one package a project is not needed. But if you use more then one package, without a project it is not possible to import the classes with use statements.

In general, it is recommended to use always a project to download your libraries. In an application normally there is more than one library needed.
Some PHP packages are not free to download and because of that hosted in private repositories. In this case some credentials are needed to access such packages. Please use the auth.json textarea to insert credentials, if a package is coming from a private repository. You can look here for more information.

  • Some hosting areas are not accessible by a terminal or SSH. Then it is not possible to use Composer.
  • To use Composer is sometimes complicated. Especially for beginners.
  • Composer needs much resources. Sometimes they are not available on a simple webspace.
  • If you are using private repositories you don't need to share your credentials. You can set up everything on our site and then you provide a simple download link to your team member.
  • Simplify your Composer build process. Use our own command line tool to download the vendor folder as binary. This makes your build process faster and you don't need to expose your credentials for private repositories.
Please rate this library. Is it a good library?

Informations about the package neosacl

Sandstorm Neos ACL

This package implements dynamic Access Control Lists for Neos Roles.

The development of this package was sponsored by ujamii and queo.

Main features:

Installation

  1. Install the package:

  2. Run the migrations

  3. Log in with an admin account and visit the new menu entry 'Dynamic Roles'

Development

Initial (Package) Setup

Initial React Setup

Then, log into the backend of Neos, and visit the module "Dynamic Roles".

Internal Implementation Details

Implementing Dynamic Node Privileges and MethodPrivileges

The basic idea was the following: Hook into PolicyService::emitConfigurationLoaded, and modify the $configuration array (introduce new roles and privilegeTargets). This basically works at runtime - however there is a problem with dynamic MethodPrivilege enforcement, which is explained below and by the following diagram:

How do Method Privileges work

What's the problem with dynamically added MethodPrivileges

We are mostly working with EditNodePrivilege etc. - so why does this apply there?

Furthermore, to make this idea work, the Policy.yaml of this package defines a catch-all Sandstorm.NeosAcl:EditAllNodes PrivilegeTarget - so AOP will instrument the corresponding methods of NodeInterface. This catch-all makes sense in any case, because this switches the security framework to an allowlist-only approach

The goal

In order to make the dynamic policy enforcement work, we need to add custom stuff to the methodPermissions - for the dynamically added roles.

Implementation

The post-processing of the methodPermissions is done using a custom cache frontend (SecurityAuthorizationPrivilegeMethodCacheFrontend).

Implementing dynamic AOP Runtime Expressions

Method privileges internally can use dynamic AOP Runtime Expressions (in case you check for method parameters). Especially the MethodPrivilege - which is attached to the RemoveNodePrivilege - uses the following expression code:

The removed == true part is a so-called AOP Runtime Expression.

This is internally implemented using the Flow_Aop_RuntimeExpressions "cache", which is pre-filled again during the compile time (which is a nasty side-effect).

Thus, in our case we need to again implement a custom cache frontend (AopRuntimeExpressionsCacheFrontend), using the runtime expressions of the base configuration, which exists properly.


All versions of neosacl with dependencies

PHP Build Version
Package Version
Requires neos/flow Version ^7.0 || ^8.0 || dev-master
neos/fusion-afx Version *
Composer command for our command line client (download client) This client runs in each environment. You don't need a specific PHP version etc. The first 20 API calls are free. Standard composer command

The package sandstorm/neosacl contains the following files

Loading the files please wait ....