Module kanidmd_lib::schema

source ·
Expand description

Schema is one of the foundational concepts of the server. It provides a set of rules to enforce that Entries 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 Entry must have and may contain which enables many other parts to function.

To define this structure we define Attributes that provide rules for how and ava should be structured. We also define Classes that define the rules of which Attributes may or must exist on an Entry for it to be considered valid. An Entry must have at least 1 to infinite Classes. [`Classes’] are additive.

Structs§

  • Schema stores the set of Classes and Attributes that the server will use to validate Entries, Filters and Modifications. Additionally the schema stores an extracted copy of the current attribute indexing metadata that is used by the backend during queries.
  • An item representing an attribute and the rules that enforce it. These rules enforce if an attribute on an Entry may be single or multi value, must be unique amongst all other types of this attribute, if the attribute should be indexed, and what type of data syntax it may hold.
  • An item representing a class and the rules for that class. These rules enforce that an Entry’s avas conform to a set of requirements, giving structure to an entry about what avas must or may exist. The kanidm project provides attributes in systemmust and systemmay, which can not be altered. An administrator may extend these in the must and may attributes.
  • A readonly transaction of the working schema set.
  • A writable transaction of the working schema set. You should not change this directly, the writability is for the server internally to allow reloading of the schema. Changes you make will be lost when the server re-reads the schema from disk.

Traits§