Skip to main content

Securing MarkLogic Server

Prerequisites - Create Databases, Roles, Users, and Privileges

To execute the scenarios discussed in this section, you need to perform the following preparation steps:

  1. Using the Admin Interface, create databases db1 and db2. For details on creating databases, see Creating a New Database in Administering MarkLogic Server.

  2. Using the Admin Interface, create roles role1, role2, and role3. For details on creating roles, see Creating a Role in Administering MarkLogic Server.

  3. Using the Admin Interface, create users user1, user2, and user3 with roles role1, role2, and role3 correspondingly. For details on creating users and assigning roles to them, see Creating a User in Administering MarkLogic Server.

  4. Create and assign granular privileges to roles role1, role2, and role3 as described in Example 1, Example 2, and Example 3 correspondingly of the previous section Configure Granular Privileges via the XQuery API Security Module.

As the result, you will have the users with roles and privileges as described in the following table:

User

Role

Privilege

user1

role1

http://marklogic.com/xdmp/privileges/admin/database/index

user2

role2

http://marklogic.com/xdmp/privileges/admin/database/db1_identifier

user3

role3

http://marklogic.com/xdmp/privileges/admin/database/index/db1_identifier