Skip to main content

Securing MarkLogic Server

Examples of Protected Paths

This table shows some examples of protected paths.

Protected Path

Permissions

Result

/foo/bar

(role1, read)

Element “bar” is readable by “role1” but concealed for all other roles. No mention of other permissions means that others can update or insert content for this element.

/foo/bar

(role1, read)

(role2, read)

Element “bar” is readable by “role1” or “role2” but concealed for all other roles. No mention of other permissions means that others can update or insert content for this element.

/foo/bar

(role1, read)

(role1, update)

Element “bar” is readable by “role1” but concealed for all other roles. “Role1” can update the element. No mention of insert permissions means that others can insert content for this element.

/foo/bar[@attr= “test”]

(role1, read)

(role1, update)

Same as above except that it only applies to a bar element if the element has an attribute “attr” with the value “test”. No mention of insert permissions means that others can insert content for this element.

bar

(role1, read)

This is the simplest path. Element “bar” is readable by “role 1” but concealed for all other roles. This applies to all “bar” elements. No mention of other permissions means that others can update or insert content for this element.

/root/reg[fn:matches(@expr, 'is')]

(role1, read)

(role1, update)

Elements that match the regular express for ‘is” will be readable by “role 1” but concealed for all other roles. “Role 1” can update the element. No mention of insert permissions means that others can insert content for this element.

For more about update permissions with element level security, see the table in the section Document and Element Level Permissions Summary.

Warning

Defining element level security protection (protected paths) on “reserved” elements or properties (for example, alerting, thesaurus, and so on) may cause undefined behavior.

The path is an XPath expression, not a field.