You also want an ePaper? Increase the reach of your titles
YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.
DIRECTORY INDEXES<br />
MarkLogic includes the notion of database "directories." They're similar to collections<br />
but are hierarchical and non-overlapping and based on the unique document names,<br />
which are technically URIs (Uniform Resource Identifiers). Directories inside<br />
MarkLogic behave a lot like filesystem directories: each contains an arbitrary number<br />
of documents as well as subdirectories. Queries often impose directory constraints,<br />
limiting a view to a specific directory or its subdirectories.<br />
MarkLogic indexes directories a lot like collections. There's a term list for each<br />
directory listing the documents in that directory. There's also a term list for each<br />
directory listing the documents held in that directory or lower. That makes it a simple<br />
matter of term list intersection to limit a view based on directory paths.<br />
SECURITY INDEXES<br />
MarkLogic's security model also leverages the intersecting term list system. MarkLogic<br />
employs a role-based security model where each user is assigned any number of roles,<br />
and these roles have associated permissions and privileges. The permissions control<br />
what documents the user can read, insert, and update, and the privileges control what<br />
actions the user can perform (e.g., restarting the server). The implementation of most<br />
security checks is simple: just make sure that the user has the necessary credentials<br />
before granting the requested action. So where does the intersecting term list<br />
system come in?<br />
MarkLogic uses term lists to manage document reads, because reads support queries and<br />
queries have to operate at scale. You don't want to check document read permissions one<br />
at a time. Each role has a term list for what documents that role is allowed to see. As part<br />
of each query that's issued, MarkLogic combines the user's explicit constraints with the<br />
implicit visibility constraints of the invoking user's roles. If the user account has three<br />
roles, MarkLogic gathers the term lists for each role, and unions those together to create<br />
that user's universe of documents. It intersects this list with any ad hoc query the user<br />
runs, to make sure the results only display documents in that user's visibility domain.<br />
Implicitly and highly efficiently, every user's worldview is shaped based on their security<br />
settings, all using term lists.<br />
MarkLogic can also provide "compartment security." In this system it's not enough<br />
that a user have a role that can view a document the user needs to have all necessary<br />
roles to view a document. Imagine a document that involves several top-secret projects.<br />
You can't read it unless you have visibility to all the top-secret projects. Internally, with<br />
security, the term lists for role visibility are intersected (ANDed) instead of<br />
unioned (ORed). 2<br />
2 MarkLogic security has been evaluated and validated in accordance with the provisions of the National<br />
Information Assurance Partnership (NIAP) Common Criteria Evaluation and Validation Scheme (CCEVS) for<br />
IT Security. It's the only NoSQL database to have done so.<br />
23