Example—Compartment Security
This section describes a scenario that uses compartment security. The scenario is not meant to demonstrate the correct way to set up compartment security, as your situation is likely to be unique. However, it demonstrates how compartment security works and may give you ideas for how to implement your own security model:
For a MarkLogic Server application used by a government department, documents are classified with a security classification that dictates who may access the document. The department also restricts access to some documents based on the citizenship of the user. Additionally, some documents can only be accessed by employees with certain job functions.
To set up the compartment security for this scenario, you create the necessary roles, users, and documents with the example permissions. You will need access to both the MarkLogic Server Admin Interface and Query Console.
To run through the example, perform the steps in each of the sections.