Limiting Access to a Subset of Users
- Last Updated: April 14, 2026
- 2 minute read
- MarkLogic Server
- Version 10.0
- Documentation
This application access control method can be modified or extended to meet the requirements in many application scenarios. It uses more of the available security features and therefore requires a better understanding of the security model.
To limit application access to a subset of the users in the security database, perform the following steps using the Admin Interface:
-
Create an execute privilege named
exe-priv-app1to represent the privilege to access the app server. -
Create a role named
role-app1that hasexe-priv-app1execute privilege. -
Add
role-app1to the roles of all users in the security database who should have access to this app server. -
In the Configuration page for this app server, scroll down to the authentication field and select
digest,basicordigest-basic. If you want to use application-level authentication to achieve the same objective, a custom login page is required. See the next section for details. -
Select
exe-priv-app1for the privilege field. Once this is done, only the users who have theexe-priv-app1by virtue of their role(s) are able to access this app server.
Note:
If you want any user in the security database to be able to access the application, leave the privilege field blank.
At this point, the application access control is configured.
This method of authentication also needs to be accompanied by the appropriate security configuration for both users and documents associated with this app server. For example, functions such as xdmp:document-insert and xdmp:document-load throw exceptions unless the user possesses the appropriate execute privileges. Also, users must have the appropriate default permissions (or specify the appropriate permissions with the API) when creating new documents in a database. Documents created by a user who does not have the admin role must be created with at least one update permission or else the transaction throws an XDMP-MUSTHAVEUPDATE exception. The update permission is required because otherwise once the documents are created no user (except users with the admin role) would be able to access them, including the user who created them.