<!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="../static.files/SourceSerif4-Regular-1f7d512b176f0f72.ttf.woff2"><linkrel="preload"as="font"type="font/woff2"crossoriginhref="../static.files/FiraSans-Regular-018c141bf0843ffd.woff2"><linkrel="preload"as="font"type="font/woff2"crossoriginhref="../static.files/FiraSans-Medium-8f9a781e4970d388.woff2"><linkrel="preload"as="font"type="font/woff2"crossoriginhref="../static.files/SourceCodePro-Regular-562dcc5011b6de7d.ttf.woff2"><linkrel="preload"as="font"type="font/woff2"crossoriginhref="../static.files/SourceSerif4-Bold-124a1ca42af929b6.ttf.woff2"><linkrel="preload"as="font"type="font/woff2"crossoriginhref="../static.files/SourceCodePro-Semibold-d899c5a5c4aeb14a.ttf.woff2"><linkrel="stylesheet"href="../static.files/normalize-76eba96aa4d2e634.css"><linkrel="stylesheet"href="../static.files/rustdoc-6827029ac823cab7.css"id="mainThemeStyle"><linkrel="stylesheet"id="themeStyle"href="../static.files/light-ebce58d0a40c3431.css"><linkrel="stylesheet"disabledhref="../static.files/dark-f23faae4a2daf9a6.css"><linkrel="stylesheet"disabledhref="../static.files/ayu-8af5e100b21cd173.css"><scriptid="default-settings"></script><scriptsrc="../static.files/storage-d43fa987303ecbbb.js"></script><scriptdefersrc="../crates.js"></script><scriptdefersrc="../static.files/main-c55e1eb52e1886b4.js"></script><noscript><linkrel="stylesheet"href="../static.files/noscript-13285aec31fa243e.css"></noscript><linkrel="alternate icon"type="image/png"href="../static.files/favicon-16x16-8b506e7a72182f1c.png"><linkrel="alternate icon"type="image/png"href="../static.files/favicon-32x32-422f7d1d52889060.png"><linkrel="icon"type="image/svg+xml"href="../static.files/favicon-2c020d218678b618.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="../static.files/rust-logo-151179464ae7ed46.svg"alt="logo"></div></a><h2></h2></nav><navclass="sidebar"><aclass="sidebar-logo"href="../kanidmd_lib/index.html"><divclass="logo-container"><imgclass="rust-logo"src="../static.files/rust-logo-151179464ae7ed46.svg"alt="logo"></div></a><h2class="location"><ahref="#">Crate kanidmd_lib</a></h2><divclass="sidebar-elems"><ulclass="block"><liclass="version">Version 1.1.0-alpha.12-dev</li><li><aid="all-types"href="all.html">All Items</a></li></ul><section><ulclass="block"><li><ahref="#modules">Modules</a></li><li><ahref="#macros">Macros</a></li></ul></section></div></nav><main><divclass="width-limiter"><navclass="sub"><formclass="search-form"><span></span><inputclass="search-input"name="search"aria-label="Run search in the documentation"autocomplete="off"spellcheck="false"placeholder="Click or press ‘S’ to search, ‘?’ for more options…"type="search"><divid="help-button"title="help"tabindex="-1"><ahref="../help.html">?</a></div><divid="settings-menu"tabindex="-1"><ahref="../settings.html"title="settings"><imgwidth="22"height="22"alt="Change settings"src="../static.files/wheel-5ec35bf9ca753509.svg"></a></div></form></nav><sectionid="main-content"class="content"><divclass="main-heading"><h1class="fqn">Crate <aclass="mod"href="#">kanidmd_lib</a><buttonid="copy-path"onclick="copy_path(this)"title="Copy item path to clipboard"><imgsr
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">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.</div></div><divclass="item-row"><divclass="item-left module-item"><aclass="mod"href="constants/index.html"title="kanidmd_lib::constants mod">constants</a></div></div><divclass="item-row"><divclass="item-left module-item"><aclass="mod"href="credential/index.html"title="kanidmd_lib::credential mod">credential</a></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">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.</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">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:</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"><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.</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">The Identity Management components that are layered on top 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.</div></div><divclass="item-row"><divclass="item-left module-item"><aclass="mod"href="macros/index.html"title="kanidmd_lib::macros mod">macros</a></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">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></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">A prelude of imports that should be imported by all other Kanidm modules to
help make imports cleaner.</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"><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.</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"><code>server</code> contains the query server, which is the main high level construction
to coordinate queries and operations in the server.</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">An actor that shows the servers current status and statistics. (TODO).</div></div><divclass="item-row"><divclass="item-left module-item"><aclass="mod"href="testkit/index.html"title="kanidmd_lib::testkit mod">testkit</a></div></div><divclass="item-row"><divclass="item-left module-item"><aclass="mod"href="utils/index.html"title="kanidmd_lib::utils mod">utils</a></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">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
the <ahref="value/enum.Value.html"title="Value"><code>Value</code></a> module allow storage and transformation of various types of input into strongly
typed values, allows their comparison, filtering and more. It also has the code for serialising
these into a form for the backend that can be persistent into the <ahref="be/struct.Backend.html"><code>Backend</code></a>.</div></div><divclass="item-row"><divclass="item-left module-item"><aclass="mod"href="valueset/index.html"title="kanidmd_lib::valueset mod">valueset</a></div></div></div><h2id="macros"class="small-section-header"><ahref="#macros">Macros</a></h2><divclass="item-table"><divclass="item-row"><divclass="item-left module-item"><aclass="macro"href="macro.btreemap.html"title="kanidmd_lib::btreemap macro">btreemap</a></div></div><divclass="item-row"><divclass="item-left module-item"><aclass="macro"href="macro.btreeset.html"title="kanidmd_lib::btreeset macro">btreeset</a></div></div><divclass="item-row"><divclass="item-left module-item"><aclass="macro"href="macro.entry_init.html"title="kanidmd_lib::entry_init macro">entry_init</a></div></div><divclass="item-row"><divclass="item-left module-item"><aclass="macro"href="macro.f_and.html"title="kanidmd_lib::f_and macro">f_and</a></div></div><divclass="item-row"><divclass="item-left module-item"><aclass="macro"href="macro.f_inc.html"title="kanidmd_lib::f_inc macro">f_inc</a></div></div><divclass="item-row"><divclass="item-left module-item"><aclass="macro"href="macro.f_or.html"title="kanidmd_lib::f_or macro">f_or</a></div></div><divclass="item-row"><divclass="item-left module-item"><aclass="macro"href="macro.filter.html"title="kanidmd_lib::filter macro">filter</a></div></div><divclass="item-row"><divclass="item-left module-item"><aclass="macro"href="macro.filter_all.html"title="kanidmd_lib::filter_all macro">filter_all</a></div></div><divclass="item-row"><divclass="item-left module-item"><aclass="macro"href="macro.filter_rec.html"title="kanidmd_lib::filter_rec macro">filter_rec</a></div></div><divclass="item-row"><divclass="item-left module-item"><aclass="macro"href="macro.mergemaps.html"title="kanidmd_lib::mergemaps macro">mergemaps</a></div></div><divclass="item-row"><divclass="item-left module-item"><aclass="macro"href="macro.mergesets.html"title="kanidmd_lib::mergesets macro">mergesets</a></div></div><divclass="item-row"><divclass="item-left module-item"><aclass="macro"href="macro.modlist.html"title="kanidmd_lib::modlist macro">modlist</a></div></div><divclass="item-row"><divclass="item-left module-item"><aclass="macro"href="macro.smolset.html"title="kanidmd_lib::smolset macro">smolset</a></div></div><divclass="item-row"><divclass="item-left module-item"><aclass="macro"href="macro.vs_bool.html"title="kanidmd_lib::vs_bool macro">vs_bool</a></div></div><divclass="item-row"><divclass="item-left module-item"><aclass="macro"href="macro.vs_cid.html"title="kanidmd_lib::vs_cid macro">vs_cid</a></div></div><divclass="item-row"><divclass="item-left module-item"><aclass="macro"href="macro.vs_iname.html"title="kanidmd_lib::vs_iname macro">vs_iname</a></div></div><divclass="item-row"><divclass="item-left module-item"><aclass="macro"href="macro.vs_index.html"title="kanidmd_lib::vs_index macro">vs_index</a></div></div><divclass="item-row"><divclass="item-left module-item"><aclass="macro"href="macro.vs_iutf8.html"title="kanidmd_lib::vs_iutf8 macro">vs_iutf8</a></div></div><divclass="item-row"><divclass="item-left module-item"><aclass="macro"href="macro.vs_refer.html"title="kanidmd_lib::vs_refer macro">vs_refer</a></div></div><divclass="item-row"><divclass="item-left module-item"><aclass="macro"href="macro.vs_syntax.html"title="kanidmd_lib::vs_syntax macro">vs_syntax</a></div></div><divclass="item-row"><divclass="item-left module-item"><aclass="macro"href="macro.vs_utf8.html"title="kanidmd_lib::vs_utf8 macro">vs_utf8</a></div></div><divclass="item-row"><divclass="item-left module-item"><aclass="macro"href="macro.vs_uuid.html"title="kanidmd_lib::vs_uuid macro">vs_uuid</a></div></div></div></section></div></main><divid="rustdoc-vars"data-root-path="../"data-static-root-path="../static.files/"data-current-crate="kanidmd_lib"data-themes=""data-resource-suffix