<!DOCTYPE html><htmllang="en"><head><metacharset="utf-8"><metaname="viewport"content="width=device-width, initial-scale=1.0"><metaname="generator"content="rustdoc"><metaname="description"content="The Kanidmd server library. This implements all of the internal components of the server which is used to process authentication, store identities and enforce access controls."><metaname="keywords"content="rust, rustlang, rust-lang, kanidmd_lib"><title>kanidmd_lib - Rust</title><linkrel="preload"as="font"type="font/woff2"crossoriginhref="../SourceSerif4-Regular.ttf.woff2"><linkrel="preload"as="font"type="font/woff2"crossoriginhref="../FiraSans-Regular.woff2"><linkrel="preload"as="font"type="font/woff2"crossoriginhref="../FiraSans-Medium.woff2"><linkrel="preload"as="font"type="font/woff2"crossoriginhref="../SourceCodePro-Regular.ttf.woff2"><linkrel="preload"as="font"type="font/woff2"crossoriginhref="../SourceSerif4-Bold.ttf.woff2"><linkrel="preload"as="font"type="font/woff2"crossoriginhref="../SourceCodePro-Semibold.ttf.woff2"><linkrel="stylesheet"type="text/css"href="../normalize.css"><linkrel="stylesheet"type="text/css"href="../rustdoc.css"id="mainThemeStyle"><linkrel="stylesheet"type="text/css"href="../ayu.css"disabled><linkrel="stylesheet"type="text/css"href="../dark.css"disabled><linkrel="stylesheet"type="text/css"href="../light.css"id="themeStyle"><scriptid="default-settings"></script><scriptsrc="../storage.js"></script><scriptdefersrc="../crates.js"></script><scriptdefersrc="../main.js"></script><noscript><linkrel="stylesheet"href="../noscript.css"></noscript><linkrel="alternate icon"type="image/png"href="../favicon-16x16.png"><linkrel="alternate icon"type="image/png"href="../favicon-32x32.png"><linkrel="icon"type="image/svg+xml"href="../favicon.svg"></head><bodyclass="rustdoc mod crate"><!--[if lte IE 11]><div class="warning">This old browser is unsupported and will most likely display funky things.</div><![endif]--><navclass="mobile-topbar"><buttonclass="sidebar-menu-toggle">☰</button><aclass="sidebar-logo"href="../kanidmd_lib/index.html"><divclass="logo-container"><imgclass="rust-logo"src="../rust-logo.svg"alt="logo"></div></a><h2class="location"></h2></nav><navclass="sidebar"><aclass="sidebar-logo"href="../kanidmd_lib/index.html"><divclass="logo-container"><imgclass="rust-logo"src="../rust-logo.svg"alt="logo"></div></a><h2class="location"><ahref="#">Crate kanidmd_lib</a></h2><divclass="sidebar-elems"><divclass="block"><ul><liclass="version">Version 1.1.0-alpha.11-dev</li><li><aid="all-types"href="all.html">All Items</a></li></ul></div><section><divclass="block"><ul><li><ahref="#modules">Modules</a></li><li><ahref="#macros">Macros</a></li></ul></div></section></div></nav><main><divclass="width-limiter"><divclass="sub-container"><aclass="sub-logo-container"href="../kanidmd_lib/index.html"><imgclass="rust-logo"src="../rust-logo.svg"alt="logo"></a><navclass="sub"><formclass="search-form"><divclass="search-container"><span></span><inputclass="search-input"name="search"autocomplete="off"spellcheck="false"placeholder="Click or press ‘S’ to search, ‘?’ for more options…"type="search"><divid="help-button"title="help"tabindex="-1"><buttontype="button">?</button></div><divid="settings-menu"tabindex="-1"><ahref="../settings.html"title="settings"><imgwidth="22"height="22"alt="Change settings"src="../wheel.svg"></a></div></div></form></nav></div><sectionid="main-content"class="content"><divclass="main-heading"><h1class="fqn"><spanclass="in-band">Crate <aclass="mod"href="#">kanidmd_lib</a><buttonid="copy-path"onclick="copy_path(this)"title="Copy item path to clipboard"><imgsrc="../clipboard.svg"width="19"height="18"alt="Copy item path"></button></span></h1><spanclass="out-of-band"><aclass="srclink"href="../src/kanidmd_lib/lib.rs.html#1-97">source</a> · <aid="toggle-all-docs"href="javascript:void(0)"title="collapse all docs">[<spanclass="inner">−</span>]</a></
which is used to process authentication, store identities and enforce access controls.</p>
</div></details><h2id="modules"class="small-section-header"><ahref="#modules">Modules</a></h2><divclass="item-table"><divclass="item-row"><divclass="item-left module-item"><aclass="mod"href="be/index.html"title="kanidmd_lib::be mod">be</a></div><divclass="item-right docblock-short"><p>The backend. This contains the “low level” storage and query code, which is
implemented as a json-like kv document database. This has no rules about content
of the server, which are all enforced at higher levels. The role of the backend
is to persist content safely to disk, load that content, and execute queries
utilising indexes in the most effective way possible.</p>
</div></div><divclass="item-row"><divclass="item-left module-item"><aclass="mod"href="constants/index.html"title="kanidmd_lib::constants mod">constants</a></div><divclass="item-right docblock-short"></div></div><divclass="item-row"><divclass="item-left module-item"><aclass="mod"href="credential/index.html"title="kanidmd_lib::credential mod">credential</a></div><divclass="item-right docblock-short"></div></div><divclass="item-row"><divclass="item-left module-item"><aclass="mod"href="entry/index.html"title="kanidmd_lib::entry mod">entry</a></div><divclass="item-right docblock-short"><p>Entries are the base unit of object storage in the server. This is one of the three foundational
concepts along with <ahref="../filter/index.html"><code>filter</code></a>s and <ahref="../schema/index.html"><code>schema</code></a> that everything else builds upon.</p>
</div></div><divclass="item-row"><divclass="item-left module-item"><aclass="mod"href="event/index.html"title="kanidmd_lib::event mod">event</a></div><divclass="item-right docblock-short"><p>An <code>event</code> is a self contained module of data, that contains all of the
required information for any operation to proceed. While there are many
types of potential events, they all eventually lower to one of:</p>
</div></div><divclass="item-row"><divclass="item-left module-item"><aclass="mod"href="filter/index.html"title="kanidmd_lib::filter mod">filter</a></div><divclass="item-right docblock-short"><p><ahref="struct.Filter.html"><code>Filter</code></a>s are one of the three foundational concepts of the design in kanidm.
They are used in nearly every aspect of the server to provide searching of
datasets and assertion of entry properties.</p>
</div></div><divclass="item-row"><divclass="item-left module-item"><aclass="mod"href="identity/index.html"title="kanidmd_lib::identity mod">identity</a></div><divclass="item-right docblock-short"><p>Contains structures related to the Identity that initiated an <code>Event</code> in the
server. Generally this Identity is what will have access controls applied to
and this provides the set of <code>Limits</code> to confine how many resources that the
identity may consume during operations to prevent denial-of-service.</p>
</div></div><divclass="item-row"><divclass="item-left module-item"><aclass="mod"href="idm/index.html"title="kanidmd_lib::idm mod">idm</a></div><divclass="item-right docblock-short"><p>The Identity Management components that are layered ontop of the <ahref="server/struct.QueryServer.html">QueryServer</a>. These allow
rich and expressive events and transformations that are lowered into the correct/relevant
actions in the <ahref="server/struct.QueryServer.html">QueryServer</a>. Generally this is where “Identity Management” policy and code
is implemented.</p>
</div></div><divclass="item-row"><divclass="item-left module-item"><aclass="mod"href="ldap/index.html"title="kanidmd_lib::ldap mod">ldap</a></div><divclass="item-right docblock-short"><p>LDAP specific operations handling components. This is where LDAP operations
are sent to for processing.</p>
</div></div><divclass="item-row"><divclass="item-left module-item"><aclass="mod"href="macros/index.html"title="kanidmd_lib::macros mod">macros</a></div><divclass="item-right docblock-short"></div></div><divclass="item-row"><divclass="item-left module-item"><aclass="mod"href="modify/index.html"title="kanidmd_lib::modify mod">modify</a></div><divclass="item-right docblock-short"><p>Modification expressions and validation. This is how <code>ModifyEvents</code> store and
express the series of Modifications that should be applied. These are expressed
as “states” on what attribute-values should appear as within the <code>Entry</code></p>
</div></div><divclass="item-row"><divclass="item-left module-item"><aclass="mod"href="prelude/index.html"title="kanidmd_lib::prelude mod">prelude</a></div><divclass="item-right docblock-short"><p>A prelude of imports that should be imported by all other Kanidm modules to
help make imports cleaner.</p>
</div></div><divclass="item-row"><divclass="item-left module-item"><aclass="mod"href="schema/index.html"title="kanidmd_lib::schema mod">schema</a></div><divclass="item-right docblock-short"><p><ahref="struct.Schema.html"><code>Schema</code></a> is one of the foundational concepts of the server. It provides a
set of rules to enforce that <ahref="../entry/index.html"><code>Entries</code></a> ava’s must be compliant to, to be
considered valid for commit to the database. This allows us to provide
requirements and structure as to what an <ahref="../entry/index.html"><code>Entry</code></a> must have and may contain
which enables many other parts to function.</p>
</div></div><divclass="item-row"><divclass="item-left module-item"><aclass="mod"href="server/index.html"title="kanidmd_lib::server mod">server</a></div><divclass="item-right docblock-short"><p><code>server</code> contains the query server, which is the main high level construction
to coordinate queries and operations in the server.</p>
</div></div><divclass="item-row"><divclass="item-left module-item"><aclass="mod"href="status/index.html"title="kanidmd_lib::status mod">status</a></div><divclass="item-right docblock-short"><p>An actor that shows the servers current status and statistics. (TODO).</p>
</div></div><divclass="item-row"><divclass="item-left module-item"><aclass="mod"href="testkit/index.html"title="kanidmd_lib::testkit mod">testkit</a></div><divclass="item-right docblock-short"></div></div><divclass="item-row"><divclass="item-left module-item"><aclass="mod"href="utils/index.html"title="kanidmd_lib::utils mod">utils</a></div><divclass="item-right docblock-short"></div></div><divclass="item-row"><divclass="item-left module-item"><aclass="mod"href="value/index.html"title="kanidmd_lib::value mod">value</a></div><divclass="item-right docblock-short"><p>Inside an entry, the key-value pairs are stored in these <ahref="value/enum.Value.html"title="Value"><code>Value</code></a> types. The components of