Skip to content

Latest commit

 

History

History
68 lines (45 loc) · 4.11 KB

extendedPermissionService.md

File metadata and controls

68 lines (45 loc) · 4.11 KB

Alfresco Governance Services' Extended Permission Service

Completeness Badge

Version Badge

Purpose

When working on the Records Management module, we needed additional functionality around permissions, and therefore introduced the ExtendedPermissionService.

Overview

The ExtendedPermissionService is wired in, via Spring config, to extend Alfresco's core PermissionService, and adds support for:

  • the RMPermissionModel, which defines the available permissions capabilities.
  • the PermissionProcessorRegistry, which introduces pre- and post- processors.
  • other minor method extensions (e.g. to setInheritParentPermissions)

Permission Processor Registry

This was added in RM 2.4 to support the requirements around the additional security classifications and markings.

The registry is simply two array lists, one for pre-processors and one for post-processors, which are iterated around before / after (respectively) the wrapped call PermissionService.hasPermission

Out of the box, a system with the RM module installed will have the following permissions processors defined:

Community:

Pre-processors:
  • None.
Post-processors:

Enterprise:

(links only work in clones of Enterprise repos)

Pre-processors:
Post-processors:
  • None.

Configuration and Extension points

Additional processors can be defined by extending either PermissionPreProcessorBaseImpl or PermissionPostProcessorBaseImpl which call the add method on the appropriate list during init.

Performance Implications

There is certainly a performance overhead when adding additional processing to permission checks. This is most noticeable in the SecurityMarksPermissionPreProcessor where we need to call out to an external service. This has been profiled heavily and optimised during 2.5 and 2.6 development.

###TODO: Not yet documented (in related areas of the code) are:

  • Capabilities (see rm-capabilities-*.xml, declarativeCapability.java and DeclarativeCompositeCapability.java)
  • RM's permission system has an any allow allows policy unlike alfresco which policy is any deny denies