Interface PermissionCheckingService

All Known Implementing Classes:
DefaultPermissionCheckingService

public interface PermissionCheckingService
Provides permission checking operations.

Description

This service is used to check for effective permission assignments. Effective permission assignments is the result of combining actual permission assignments with permission checking rules. Actual permission assignments are basic relations between objects (such as items, types and so on), principals and permissions as defined by PermissionManagementService. Permission checking rules are defined by this service and they govern how should actual permission assignments be interpreted within principal group hierarchy and item type hierarchy with respect to permission target object - item,type,attribute descriptor or global permissions. Possible outcomes of permission checking operations are defined by PermissionCheckValue enumeration.

PermissionManagementService allows to define permission assignments to items, types, attribute descriptors. It also allows to define so called global permission assignments which do not refer to any concrete objects, but just describe the relation of principal, permission and value (GRANTED or DENIED). This gives 4 possible target objects of permission assignments (item, type, attribute, global). Permission checking rules are different depending on the target object. The rule of thumb is that the priority of assignments is (from highest to lowest) is: item/attribute, type, global. See description of each checking algorithm for details. Some of the methods defined here use default Principal. This service defines this principal as current session user.

Permission checking algorithms


Principal Group Hierarchy Inheritance

The following algorithm is used to resolve permission assignments inheritance across group hierarchy of given principal. This algorithm only checks assignments for a single permission and a single principal given as input.

Algorithm input: a permission for which we are checking assignments and a set [P] of principals. Set [P] initially contains only one element: the given principal.

Note that principal groups are also principals, and all members of the group inherit the group's permission assignments as described below.

Definition: Direct super-group of a principal: the group the principal is direct member of (i.e. the super-group contains the principal directly, not through some other group)