Skip to main content

Applications and rights

Access rights are modeled in the graph: an application provides actions, a role authorizes actions, and a group is granted roles.

Applications​

An Application node is an application available on the platform. Its properties include id, name, displayName, icon and appType.

An application carries the extra label External when it is not a module of the platform but an outside web application offered to members next to the built-in ones. In Open ENT v3 an external application is also declared as a client in Keycloak.

Actions​

An Action node is something a member can do. Actions are what security checks rely on to know what a member is allowed to do.

PropertyContent
nameThe server-side controller and method, for example `org.entcore.conversation.controllers.ConversationController
typeThe kind of action, below
TypeMeaning
SECURED_ACTION_WORKFLOWA right granted through a role: access to the application or to one of its functions
SECURED_ACTION_RESOURCEA right on a resource, granted by sharing
SECURED_ACTION_AUTHENTICATEDAvailable to any authenticated member

Each action is linked to its application by PROVIDE.

Roles​

A Role node is a named set of actions, with the properties id, name and distributions. A role authorizes actions (AUTHORIZE) and is granted to groups (AUTHORIZED).

A role or an application can be limited to one organization with its structureId property.

Queries​

Actions of an application:

MATCH (n:Application)-[:PROVIDE]->(a)
WHERE n.name = $name
RETURN a.name AS name, a.displayName AS displayName, a.type AS type

Applications available to an organization:

MATCH (n:Application) WHERE NOT(HAS(n.structureId)) OR n.structureId = $structureId RETURN n.id as id, n.displayName as displayName, n.name as name, n.icon as icon, 'External' IN labels(n) as isExternal, n.levelsOfEducation as levelsOfEducation, n.appType as appType

Roles available to an organization:

MATCH (n:Role) WHERE NOT(HAS(n.structureId)) OR n.structureId = $structureId RETURN n.id as id, n.name as name ORDER BY name ASC