kanidm_ldap_sync/
opt.rs

1use kanidm_proto::constants::DEFAULT_CLIENT_CONFIG_PATH;
2pub const DEFAULT_LDAP_CONFIG_PATH: &str = "/etc/kanidm/ldap-sync";
3
4#[derive(Debug, clap::Parser, Clone)]
5#[clap(about = "Kanidm LDAP Sync Driver")]
6pub struct Opt {
7    /// Enable debugging of the sync driver
8    #[clap(short, long, env = "KANIDM_DEBUG")]
9    pub debug: bool,
10    /// Path to the client config file.
11    #[clap(short, long, value_parser, default_value_os_t = DEFAULT_CLIENT_CONFIG_PATH.into())]
12    pub client_config: PathBuf,
13
14    /// Path to the ldap-sync config file.
15    #[clap(short, long, value_parser, default_value_os_t = DEFAULT_LDAP_CONFIG_PATH.into())]
16    pub ldap_sync_config: PathBuf,
17
18    /// Dump the ldap protocol inputs, as well as the scim outputs. This can be used
19    /// to create test cases for testing the parser.
20    ///
21    /// No actions are taken on the kanidm instance, this is purely a dump of the
22    /// state in/out.
23    #[clap(short, long, hide = true)]
24    pub proto_dump: bool,
25
26    /// Read entries from ldap, and check the connection to kanidm, but take no actions against
27    /// kanidm that would change state.
28    #[clap(short = 'n')]
29    pub dry_run: bool,
30
31    /// Run in scheduled mode, where the sync tool will periodically attempt to sync between
32    /// LDAP and Kanidm.
33    #[clap(long = "schedule")]
34    pub schedule: bool,
35
36    /// Skip the root user permission check.
37    #[clap(short, long, hide = true)]
38    pub skip_root_check: bool,
39}