2021-06-02 01:42:40 +02:00
|
|
|
//! 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.
|
|
|
|
|
2022-09-25 03:21:30 +02:00
|
|
|
#![deny(warnings)]
|
2022-07-07 05:28:36 +02:00
|
|
|
#![recursion_limit = "512"]
|
2019-09-04 03:06:37 +02:00
|
|
|
#![warn(unused_extern_crates)]
|
2021-12-16 01:13:03 +01:00
|
|
|
#![deny(clippy::todo)]
|
|
|
|
#![deny(clippy::unimplemented)]
|
2020-08-01 12:31:05 +02:00
|
|
|
#![deny(clippy::unwrap_used)]
|
|
|
|
#![deny(clippy::expect_used)]
|
2021-12-16 01:13:03 +01:00
|
|
|
#![deny(clippy::panic)]
|
2020-08-01 12:31:05 +02:00
|
|
|
#![deny(clippy::await_holding_lock)]
|
|
|
|
#![deny(clippy::needless_pass_by_value)]
|
|
|
|
#![deny(clippy::trivially_copy_pass_by_ref)]
|
2022-10-29 11:07:54 +02:00
|
|
|
#![allow(clippy::unreachable)]
|
2019-09-04 03:06:37 +02:00
|
|
|
|
2022-05-31 06:13:21 +02:00
|
|
|
#[cfg(all(jemallocator, test, not(target_family = "windows")))]
|
2021-02-10 06:08:22 +01:00
|
|
|
#[global_allocator]
|
|
|
|
static ALLOC: jemallocator::Jemalloc = jemallocator::Jemalloc;
|
|
|
|
|
2021-04-14 01:56:40 +02:00
|
|
|
#[macro_use]
|
|
|
|
extern crate rusqlite;
|
2021-12-17 04:54:13 +01:00
|
|
|
#[macro_use]
|
|
|
|
extern crate tracing;
|
2019-09-04 03:06:37 +02:00
|
|
|
#[macro_use]
|
|
|
|
extern crate lazy_static;
|
|
|
|
|
2022-08-09 05:07:06 +02:00
|
|
|
// #[macro_use]
|
|
|
|
// extern crate sketching;
|
|
|
|
|
2020-01-09 11:07:14 +01:00
|
|
|
// This has to be before 'be' so the import order works
|
2019-09-04 03:06:37 +02:00
|
|
|
#[macro_use]
|
2021-02-23 09:10:59 +01:00
|
|
|
pub mod macros;
|
|
|
|
|
2020-02-29 05:02:14 +01:00
|
|
|
pub mod be;
|
2019-09-04 03:06:37 +02:00
|
|
|
pub mod constants;
|
2020-02-29 05:02:14 +01:00
|
|
|
pub mod credential;
|
2021-02-23 09:10:59 +01:00
|
|
|
pub mod entry;
|
|
|
|
pub mod event;
|
|
|
|
pub mod filter;
|
2022-10-05 01:48:48 +02:00
|
|
|
pub mod modify;
|
|
|
|
pub mod utils;
|
2022-04-27 02:56:18 +02:00
|
|
|
pub mod value;
|
|
|
|
pub mod valueset;
|
2019-09-04 03:06:37 +02:00
|
|
|
#[macro_use]
|
|
|
|
mod plugins;
|
2021-02-23 09:10:59 +01:00
|
|
|
pub mod idm;
|
2020-03-22 02:31:02 +01:00
|
|
|
mod repl;
|
2022-02-20 03:43:38 +01:00
|
|
|
pub mod schema;
|
2021-02-23 09:10:59 +01:00
|
|
|
pub mod server;
|
2022-02-20 03:43:38 +01:00
|
|
|
pub mod status;
|
2022-11-02 10:46:09 +01:00
|
|
|
pub mod testkit;
|
2019-09-04 03:06:37 +02:00
|
|
|
|
2021-08-19 03:04:24 +02:00
|
|
|
/// A prelude of imports that should be imported by all other Kanidm modules to
|
2021-06-02 01:42:40 +02:00
|
|
|
/// help make imports cleaner.
|
2021-04-25 03:35:02 +02:00
|
|
|
pub mod prelude {
|
2022-12-28 08:52:25 +01:00
|
|
|
pub use kanidm_proto::v1::{ConsistencyError, OperationError, SchemaError};
|
2022-10-01 08:08:51 +02:00
|
|
|
pub use sketching::{
|
|
|
|
admin_debug, admin_error, admin_info, admin_warn, filter_error, filter_info, filter_trace,
|
|
|
|
filter_warn, perf_trace, request_error, request_info, request_trace, request_warn,
|
|
|
|
security_access, security_critical, security_error, security_info, tagged_event, EventTag,
|
|
|
|
};
|
2021-04-25 03:35:02 +02:00
|
|
|
pub use smartstring::alias::String as AttrString;
|
2022-12-28 08:52:25 +01:00
|
|
|
pub use std::time::Duration;
|
2021-06-29 06:23:39 +02:00
|
|
|
pub use url::Url;
|
2022-12-18 04:26:20 +01:00
|
|
|
pub use uuid::{uuid, Uuid};
|
2021-04-25 03:35:02 +02:00
|
|
|
|
2022-12-28 08:52:25 +01:00
|
|
|
pub use crate::be::Limits;
|
2021-04-25 03:35:02 +02:00
|
|
|
pub use crate::constants::*;
|
|
|
|
pub use crate::entry::{
|
2023-05-23 05:25:22 +02:00
|
|
|
Entry, EntryCommitted, EntryIncrementalCommitted, EntryIncrementalNew, EntryInit,
|
|
|
|
EntryInitNew, EntryInvalid, EntryInvalidCommitted, EntryInvalidNew, EntryNew, EntryReduced,
|
|
|
|
EntryReducedCommitted, EntryRefresh, EntryRefreshNew, EntrySealed, EntrySealedCommitted,
|
|
|
|
EntrySealedNew, EntryTuple, EntryValid,
|
2021-04-25 03:35:02 +02:00
|
|
|
};
|
2022-12-28 08:52:25 +01:00
|
|
|
pub use crate::event::{CreateEvent, DeleteEvent, ExistsEvent, ModifyEvent, SearchEvent};
|
2022-10-01 08:08:51 +02:00
|
|
|
pub use crate::filter::{
|
|
|
|
f_and, f_andnot, f_eq, f_id, f_inc, f_lt, f_or, f_pres, f_self, f_spn_name, f_sub, Filter,
|
2022-12-28 08:52:25 +01:00
|
|
|
FilterInvalid, FilterValid, FC,
|
2022-10-01 08:08:51 +02:00
|
|
|
};
|
2023-06-08 12:17:46 +02:00
|
|
|
pub use crate::idm::server::{IdmServer, IdmServerAudit, IdmServerDelayed};
|
2022-12-15 07:09:09 +01:00
|
|
|
pub use crate::modify::{
|
|
|
|
m_assert, m_pres, m_purge, m_remove, Modify, ModifyInvalid, ModifyList, ModifyValid,
|
|
|
|
};
|
2022-12-28 08:52:25 +01:00
|
|
|
pub use crate::server::access::AccessControlsTransaction;
|
2022-12-15 07:09:09 +01:00
|
|
|
pub use crate::server::batch_modify::BatchModifyEvent;
|
2023-06-08 12:17:46 +02:00
|
|
|
pub use crate::server::identity::{
|
|
|
|
AccessScope, IdentType, IdentUser, Identity, IdentityId, Source,
|
|
|
|
};
|
2021-04-25 03:35:02 +02:00
|
|
|
pub use crate::server::{
|
|
|
|
QueryServer, QueryServerReadTransaction, QueryServerTransaction,
|
|
|
|
QueryServerWriteTransaction,
|
|
|
|
};
|
2022-10-01 08:08:51 +02:00
|
|
|
pub use crate::utils::duration_from_epoch_now;
|
2023-02-24 04:43:19 +01:00
|
|
|
pub use crate::value::{
|
|
|
|
ApiTokenScope, IndexType, PartialValue, SessionScope, SyntaxType, Value,
|
|
|
|
};
|
2022-05-24 02:49:34 +02:00
|
|
|
pub use crate::valueset::{
|
|
|
|
ValueSet, ValueSetBool, ValueSetCid, ValueSetIndex, ValueSetIutf8, ValueSetRefer,
|
|
|
|
ValueSetSecret, ValueSetSpn, ValueSetSyntax, ValueSetT, ValueSetUint32, ValueSetUtf8,
|
|
|
|
ValueSetUuid,
|
|
|
|
};
|
2022-10-24 01:50:31 +02:00
|
|
|
|
|
|
|
#[cfg(test)]
|
|
|
|
pub use kanidmd_lib_macros::*;
|
2023-05-25 00:25:16 +02:00
|
|
|
|
|
|
|
pub use time::format_description::well_known::Rfc3339;
|
2021-04-25 03:35:02 +02:00
|
|
|
}
|