All Projects → sandstorm → NeosAcl

sandstorm / NeosAcl

Licence: other
No description or website provided.

Programming Languages

javascript
184084 projects - #8 most used programming language
PHP
23972 projects - #3 most used programming language

Projects that are alternatives of or similar to NeosAcl

Wysiwyg.ABTesting
A/B Testing Package for Neos
Stars: ✭ 16 (+23.08%)
Mutual labels:  neoscms, neos
KaufmannDigital.GDPR.CookieConsent
A ready-to-run package, that integrates an advanced cookie consent banner into your Neos CMS site.
Stars: ✭ 21 (+61.54%)
Mutual labels:  neoscms, neos
neos-blog
A simple blog plugin for Neos CMS
Stars: ✭ 17 (+30.77%)
Mutual labels:  neoscms, neos
UserManagement
User Management Package for Neos and Flow
Stars: ✭ 37 (+184.62%)
Mutual labels:  neos
kirby-membership
Simple Membership plugin for Kirby CMS
Stars: ✭ 27 (+107.69%)
Mutual labels:  user-management
thunder
REST API application that manages user databases
Stars: ✭ 22 (+69.23%)
Mutual labels:  user-management
SuluCommunityBundle
Community features like Login, Registration, Password forget/reset for your sulu application.
Stars: ✭ 20 (+53.85%)
Mutual labels:  user-management
neos-debug
Adds a debug panel to your Neos CMS website
Stars: ✭ 31 (+138.46%)
Mutual labels:  neoscms
authing.js
🖥 Authing SDK for JavaScript and Node.js
Stars: ✭ 540 (+4053.85%)
Mutual labels:  user-management
intellij-neos
Support for the Neos CMS in Intellij IDEA / PhpStorm
Stars: ✭ 37 (+184.62%)
Mutual labels:  neoscms
Newsletter
Neos Newsletter Sending Package
Stars: ✭ 19 (+46.15%)
Mutual labels:  neoscms
django-act-as-auth
Django authentication backend that allows one to login as someone else
Stars: ✭ 17 (+30.77%)
Mutual labels:  user-management
attendance-management
Attendance Management System implements the 'punch in / punch out' based concept of attendance management.
Stars: ✭ 28 (+115.38%)
Mutual labels:  user-management
browser-acl
Simple acceess control (ACL) library for the browser inspired by Laravel's guards and policies.
Stars: ✭ 36 (+176.92%)
Mutual labels:  user-management
flow-debugproxy
A Flow Framework Debug proxy for xDebug, written in Go
Stars: ✭ 24 (+84.62%)
Mutual labels:  neoscms
cfwheels-example-app
A CFWheels 2.x App with user management, role based permissions and password resets
Stars: ✭ 17 (+30.77%)
Mutual labels:  user-management
Carbon.Gulp
Carbon/Gulp is a delicious blend of tasks and build tools poured into Gulp to form a full-featured modern asset pipeline for Flow Framework and Neos CMS.
Stars: ✭ 15 (+15.38%)
Mutual labels:  neoscms
Sitegeist.Taxonomy
Manage vocabularies and taxonomies as separate node-hierarchy.
Stars: ✭ 14 (+7.69%)
Mutual labels:  neoscms
devliver
Your private self hosted composer repository with user management
Stars: ✭ 50 (+284.62%)
Mutual labels:  user-management
iOS-Restrictions-Recovery
Can find the Restrictions or Screen Time passcode of any iOS 7.0-12.5.5 device. iOS 13 and 14 should work in theory, but Keychain-Dumper is very hit or miss on those versions
Stars: ✭ 50 (+284.62%)
Mutual labels:  restrictions

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:

  • Switch RestrictedEditor to a whitelist-only permission approach. By installing this package, the RestrictedEditor is not allowed anymore to change any content.
  • Configure dynamic roles through a Neos backend module.
  • Permissions on the node tree, workspaces and dimensions possible.
  • Permissions work predictably with sane defaults and purely-additive logic.

listing

edit

Installation

  1. install the package:
composer require sandstorm/neosacl
  1. run the migrations
./flow doctrine:migrate
  1. login with admin account an visit the new menu entry 'Dynamic Roles'

Development

Initial (Package) Setup

  • clone this package as "Sandstorm.NeosAcl" in the DistributionPackages of a Neos 4.3 or later installation
  • add it to composer.json as "sandstorm/neosacl": "*"
  • run composer update

Initial React Setup

cd Resources/Private/react-acl-editor
yarn
yarn dev

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:

Concept

How do Method Privileges Work

  • Background: An implementation of PointcutFilterInterface can, during compile time of Flow, decide which classes and methods match for a certain aspect.
    • This is used in PolicyEnforcementAspect (which is the central point for enforcing Method Privileges).
    • There, the MethodPrivilegePointcutFilter is referenced.
    • The MethodPrivilegePointcutFilter asks the PolicyService for all configured MethodPrivileges - and ensures AOP proxies are built for these methods.
  • Side Effect: Now, during building up the pointcut filters, the MethodPrivilegePointcutFilter additionally builds up a data structure methodPermissions - which remembers for which method which MethodPrivileges are registered.
    • This data structure is stored persistently in the Flow_Security_Authorization_Privilege_Method cache.
    • At runtime, for a class which is intercepted by PolicyEnforcementAspect, all configured MethodPrivileges are invoked - and they have to quickly decide if they match this particular call-site.
    • This is done using the methodPermissions data structure from the Flow_Security_Authorization_Privilege_Method cache.

What's the problem with dynamically added MethodPrivileges

  • If a MethodPrivilege is defined dynamically at runtime, then the methodPermissions data structure is missing the information that this new privilege should be invoked for certain methods.
  • NOTE: You can only dynamically add MethodPrivileges for call-sites which are already instrumented by AOP; because otherwise the code will never get invoked (because of missing proxies).

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

  • EditNodePrivilege has an internal MethodPrivilege which takes care of the method-call enforcement part; i.e. preventing you to call e.g. NodeInterface::setProperty() if you do not have the permission to do so.

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 a whitelist-only approach

  • making it easier to grasp.

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:

return 'within(' . NodeInterface::class . ') && method(.*->setRemoved(removed == true))';

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.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].