kanidm_ipa_sync/
config.rs

1use serde::Deserialize;
2use std::collections::BTreeMap;
3use url::Url;
4use uuid::Uuid;
5
6#[derive(Debug, Deserialize)]
7pub struct Config {
8    pub sync_token: String,
9    pub schedule: Option<String>,
10    pub status_bind: Option<String>,
11    pub ipa_uri: Url,
12    pub ipa_ca: String,
13    pub ipa_sync_dn: String,
14    pub ipa_sync_pw: String,
15    pub ipa_sync_base_dn: String,
16
17    pub sync_password_as_unix_password: Option<bool>,
18
19    /// Maximum LDAP message size (in kilobytes)
20    pub max_ber_size: Option<usize>,
21
22    // pub entry: Option<Vec<EntryConfig>>,
23    #[serde(flatten)]
24    pub entry_map: BTreeMap<Uuid, EntryConfig>,
25}
26
27#[derive(Debug, Deserialize, Default, Clone)]
28pub struct EntryConfig {
29    // Default false
30    #[serde(default)]
31    pub exclude: bool,
32
33    pub map_uuid: Option<Uuid>,
34    pub map_name: Option<String>,
35    pub map_gidnumber: Option<u32>,
36}