RBAC for CMS
This sample shows how to enable the Role Based Access Management for the Content Management System in Eclipse Dirigible.
Steps
-
Set the environment variable:
export DIRIGIBLE_CMS_ROLES_ENABLED=true
before staring the Dirigible instance
Note: for SAP Cloud Platform Neo use the deploy parameter:
-DDIRIGIBLE_CMS_ROLES_ENABLED=true
- Open Dirigible WebIDE and go to Documents perspective
- Create sub-folder "private" under the "root" folder
- Create sub-folder "shared" under the "root" folder
- Upload a text file named "secret.txt" under the "private" folder with the following content
This is a top secret information accessible only by users with the role Operator!
- Upload a text file named "billboard.txt" under the "shared" folder with the following content
This is a public notice accessible by Everyone.
-
Click on Preview icon next to the files. You should be able to see the content of both of them.
-
Open the Workspace perspective in the WebIDE
- Create a project named "cms_permissions"
- Create an *.access file via the popup menu New->Access Constraints
- Open the file with editor
- Delete the sample record
- Click New button
- Fill the form as follows:
Path: /private
Method: READ
Scope: CMIS
Roles: Operator
- Click Save button
- The content of the file should look like:
{
"constraints": [
{
"path": "/private",
"method": "READ",
"scope": "CMIS",
"roles": [
"Operator"
]
}
]
}
Note: You can inspect that be closing the editor and then use Open With from the popup menu on the same file, but choosing Orion editor option
- Publish the project manually via the popup menu on the project level (in case the Auto-Publish is disabled)
- After a while open the Operations perspective and select the Access view
-
You should be able to identify a line similar like this:
/cms_permissions/private.access CMIS /private READ Operator Aug 17, 2018 3:33:00 PM guest
-
Open the Preview of the file secret:
http://localhost:8080/services/v3/js/ide-documents/api/read/document/preview?path=/private/secret.txt
-
Only the users who has the role Operator should be able to see the content of the file