From f1e4a4c7e2f1e9d48ef344052d08badc546f4985 Mon Sep 17 00:00:00 2001 From: Quinn <57224050+QnnOkabayashi@users.noreply.github.com> Date: Mon, 11 Oct 2021 00:49:32 -0400 Subject: [PATCH] Integrated `compiled-uuid` into `kanidmd/src/lib/constants/uuids.rs` (#593) --- Cargo.lock | 22 +- kanidmd/Cargo.toml | 1 + kanidmd/src/lib/constants/uuids.rs | 483 +++++++++++------------------ kanidmd/src/lib/idm/account.rs | 4 +- kanidmd/src/lib/idm/oauth2.rs | 2 +- kanidmd/src/lib/idm/server.rs | 4 +- kanidmd/src/lib/idm/unix.rs | 2 +- kanidmd/src/lib/ldap.rs | 6 +- kanidmd/src/lib/plugins/base.rs | 5 +- kanidmd/src/lib/plugins/refint.rs | 2 +- kanidmd/src/lib/schema.rs | 114 +++---- kanidmd/src/lib/server.rs | 10 +- 12 files changed, 279 insertions(+), 376 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index a4dd3baa8..84a365a57 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -638,6 +638,19 @@ dependencies = [ "unicode-width", ] +[[package]] +name = "compiled-uuid" +version = "0.1.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "18c9f404cbbb38aeaaa6a0cfe4039df817377926183d278098cdfe96dd015610" +dependencies = [ + "proc-macro2", + "quote", + "syn", + "thiserror", + "uuid", +] + [[package]] name = "concread" version = "0.2.19" @@ -1785,6 +1798,7 @@ dependencies = [ "bundy", "cargo-husky", "chrono", + "compiled-uuid", "concread", "criterion", "either", @@ -2644,9 +2658,9 @@ checksum = "a993555f31e5a609f617c12db6250dedcac1b0a85076912c436e6fc9b2c8e6a3" [[package]] name = "quote" -version = "1.0.9" +version = "1.0.10" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c3d0b9745dc2debf507c8422de05d7226cc1f0644216dfdfead988f9b1ab32a7" +checksum = "38bc8cc6a5f2e3655e0899c1b848643b2562f853f114bfec7be120678e3ace05" dependencies = [ "proc-macro2", ] @@ -3359,9 +3373,9 @@ checksum = "45f6ee7c7b87caf59549e9fe45d6a69c75c8019e79e212a835c5da0e92f0ba08" [[package]] name = "syn" -version = "1.0.77" +version = "1.0.80" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5239bc68e0fef57495900cfea4e8dc75596d9a319d7e16b1e0a440d24e6fe0a0" +checksum = "d010a1623fbd906d51d650a9916aaefc05ffa0e4053ff7fe601167f3e715d194" dependencies = [ "proc-macro2", "quote", diff --git a/kanidmd/Cargo.toml b/kanidmd/Cargo.toml index cf6344f82..cde603886 100644 --- a/kanidmd/Cargo.toml +++ b/kanidmd/Cargo.toml @@ -51,6 +51,7 @@ tokio-openssl = "0.6" openssl = "0.10" uuid = { version = "0.8", features = ["serde", "v4" ] } +compiled-uuid = "0.1.2" serde = "1.0" serde_cbor = "0.11" serde_json = "1.0" diff --git a/kanidmd/src/lib/constants/uuids.rs b/kanidmd/src/lib/constants/uuids.rs index cad1000de..76077f274 100644 --- a/kanidmd/src/lib/constants/uuids.rs +++ b/kanidmd/src/lib/constants/uuids.rs @@ -1,327 +1,214 @@ #![allow(clippy::unwrap_used)] +use compiled_uuid::uuid; use uuid::Uuid; // Built in group and account ranges. pub const STR_UUID_ADMIN: &str = "00000000-0000-0000-0000-000000000000"; -pub const _STR_UUID_IDM_ADMINS: &str = "00000000-0000-0000-0000-000000000001"; -pub const _STR_UUID_IDM_PEOPLE_READ_PRIV: &str = "00000000-0000-0000-0000-000000000002"; -pub const _STR_UUID_IDM_PEOPLE_WRITE_PRIV: &str = "00000000-0000-0000-0000-000000000003"; -pub const _STR_UUID_IDM_GROUP_WRITE_PRIV: &str = "00000000-0000-0000-0000-000000000004"; -pub const _STR_UUID_IDM_ACCOUNT_READ_PRIV: &str = "00000000-0000-0000-0000-000000000005"; -pub const _STR_UUID_IDM_ACCOUNT_WRITE_PRIV: &str = "00000000-0000-0000-0000-000000000006"; -pub const _STR_UUID_IDM_RADIUS_SERVERS: &str = "00000000-0000-0000-0000-000000000007"; -pub const _STR_UUID_IDM_HP_ACCOUNT_READ_PRIV: &str = "00000000-0000-0000-0000-000000000008"; -pub const _STR_UUID_IDM_HP_ACCOUNT_WRITE_PRIV: &str = "00000000-0000-0000-0000-000000000009"; -pub const _STR_UUID_IDM_SCHEMA_MANAGE_PRIV: &str = "00000000-0000-0000-0000-000000000010"; -pub const _STR_UUID_IDM_ACP_MANAGE_PRIV: &str = "00000000-0000-0000-0000-000000000011"; -pub const _STR_UUID_IDM_HP_GROUP_WRITE_PRIV: &str = "00000000-0000-0000-0000-000000000012"; -pub const _STR_UUID_IDM_PEOPLE_MANAGE_PRIV: &str = "00000000-0000-0000-0000-000000000013"; -pub const _STR_UUID_IDM_ACCOUNT_MANAGE_PRIV: &str = "00000000-0000-0000-0000-000000000014"; -pub const _STR_UUID_IDM_GROUP_MANAGE_PRIV: &str = "00000000-0000-0000-0000-000000000015"; -pub const _STR_UUID_IDM_HP_ACCOUNT_MANAGE_PRIV: &str = "00000000-0000-0000-0000-000000000016"; -pub const _STR_UUID_IDM_HP_GROUP_MANAGE_PRIV: &str = "00000000-0000-0000-0000-000000000017"; -pub const STR_UUID_IDM_ADMIN_V1: &str = "00000000-0000-0000-0000-000000000018"; -pub const STR_UUID_SYSTEM_ADMINS: &str = "00000000-0000-0000-0000-000000000019"; -pub const STR_UUID_DOMAIN_ADMINS: &str = "00000000-0000-0000-0000-000000000020"; -pub const _STR_UUID_IDM_ACCOUNT_UNIX_EXTEND_PRIV: &str = "00000000-0000-0000-0000-000000000021"; -pub const _STR_UUID_IDM_GROUP_UNIX_EXTEND_PRIV: &str = "00000000-0000-0000-0000-000000000022"; -pub const _STR_UUID_IDM_PEOPLE_ACCOUNT_PASSWORD_IMPORT_PRIV: &str = - "00000000-0000-0000-0000-000000000023"; -pub const _STR_UUID_IDM_PEOPLE_EXTEND_PRIV: &str = "00000000-0000-0000-0000-000000000024"; +pub const _UUID_IDM_ADMINS: Uuid = uuid!("00000000-0000-0000-0000-000000000001"); +pub const _UUID_IDM_PEOPLE_READ_PRIV: Uuid = uuid!("00000000-0000-0000-0000-000000000002"); +pub const _UUID_IDM_PEOPLE_WRITE_PRIV: Uuid = uuid!("00000000-0000-0000-0000-000000000003"); +pub const _UUID_IDM_GROUP_WRITE_PRIV: Uuid = uuid!("00000000-0000-0000-0000-000000000004"); +pub const _UUID_IDM_ACCOUNT_READ_PRIV: Uuid = uuid!("00000000-0000-0000-0000-000000000005"); +pub const _UUID_IDM_ACCOUNT_WRITE_PRIV: Uuid = uuid!("00000000-0000-0000-0000-000000000006"); +pub const _UUID_IDM_RADIUS_SERVERS: Uuid = uuid!("00000000-0000-0000-0000-000000000007"); +pub const _UUID_IDM_HP_ACCOUNT_READ_PRIV: Uuid = uuid!("00000000-0000-0000-0000-000000000008"); +pub const _UUID_IDM_HP_ACCOUNT_WRITE_PRIV: Uuid = uuid!("00000000-0000-0000-0000-000000000009"); +pub const _UUID_IDM_SCHEMA_MANAGE_PRIV: Uuid = uuid!("00000000-0000-0000-0000-000000000010"); +pub const _UUID_IDM_ACP_MANAGE_PRIV: Uuid = uuid!("00000000-0000-0000-0000-000000000011"); +pub const _UUID_IDM_HP_GROUP_WRITE_PRIV: Uuid = uuid!("00000000-0000-0000-0000-000000000012"); +pub const _UUID_IDM_PEOPLE_MANAGE_PRIV: Uuid = uuid!("00000000-0000-0000-0000-000000000013"); +pub const _UUID_IDM_ACCOUNT_MANAGE_PRIV: Uuid = uuid!("00000000-0000-0000-0000-000000000014"); +pub const _UUID_IDM_GROUP_MANAGE_PRIV: Uuid = uuid!("00000000-0000-0000-0000-000000000015"); +pub const _UUID_IDM_HP_ACCOUNT_MANAGE_PRIV: Uuid = uuid!("00000000-0000-0000-0000-000000000016"); +pub const _UUID_IDM_HP_GROUP_MANAGE_PRIV: Uuid = uuid!("00000000-0000-0000-0000-000000000017"); +pub const UUID_IDM_ADMIN: Uuid = uuid!("00000000-0000-0000-0000-000000000018"); +pub const UUID_SYSTEM_ADMINS: Uuid = uuid!("00000000-0000-0000-0000-000000000019"); +pub const UUID_DOMAIN_ADMINS: Uuid = uuid!("00000000-0000-0000-0000-000000000020"); +pub const _UUID_IDM_ACCOUNT_UNIX_EXTEND_PRIV: Uuid = uuid!("00000000-0000-0000-0000-000000000021"); +pub const _UUID_IDM_GROUP_UNIX_EXTEND_PRIV: Uuid = uuid!("00000000-0000-0000-0000-000000000022"); +pub const _UUID_IDM_PEOPLE_ACCOUNT_PASSWORD_IMPORT_PRIV: Uuid = + uuid!("00000000-0000-0000-0000-000000000023"); +pub const _UUID_IDM_PEOPLE_EXTEND_PRIV: Uuid = uuid!("00000000-0000-0000-0000-000000000024"); -pub const _STR_UUID_IDM_HP_ACCOUNT_UNIX_EXTEND_PRIV: &str = "00000000-0000-0000-0000-000000000025"; -pub const _STR_UUID_IDM_HP_GROUP_UNIX_EXTEND_PRIV: &str = "00000000-0000-0000-0000-000000000026"; +pub const _UUID_IDM_HP_ACCOUNT_UNIX_EXTEND_PRIV: Uuid = + uuid!("00000000-0000-0000-0000-000000000025"); +pub const _UUID_IDM_HP_GROUP_UNIX_EXTEND_PRIV: Uuid = uuid!("00000000-0000-0000-0000-000000000026"); -pub const _STR_UUID_IDM_HP_OAUTH2_MANAGE_PRIV: &str = "00000000-0000-0000-0000-000000000027"; +pub const _UUID_IDM_HP_OAUTH2_MANAGE_PRIV: Uuid = uuid!("00000000-0000-0000-0000-000000000027"); // -pub const _STR_UUID_IDM_HIGH_PRIVILEGE: &str = "00000000-0000-0000-0000-000000001000"; +pub const _UUID_IDM_HIGH_PRIVILEGE: Uuid = uuid!("00000000-0000-0000-0000-000000001000"); // Builtin schema -pub const STR_UUID_SCHEMA_ATTR_CLASS: &str = "00000000-0000-0000-0000-ffff00000000"; -pub const STR_UUID_SCHEMA_ATTR_UUID: &str = "00000000-0000-0000-0000-ffff00000001"; -pub const STR_UUID_SCHEMA_ATTR_NAME: &str = "00000000-0000-0000-0000-ffff00000002"; -pub const STR_UUID_SCHEMA_ATTR_SPN: &str = "00000000-0000-0000-0000-ffff00000003"; -pub const STR_UUID_SCHEMA_ATTR_DESCRIPTION: &str = "00000000-0000-0000-0000-ffff00000004"; -pub const STR_UUID_SCHEMA_ATTR_MULTIVALUE: &str = "00000000-0000-0000-0000-ffff00000005"; -pub const STR_UUID_SCHEMA_ATTR_UNIQUE: &str = "00000000-0000-0000-0000-ffff00000047"; -pub const STR_UUID_SCHEMA_ATTR_INDEX: &str = "00000000-0000-0000-0000-ffff00000006"; -pub const STR_UUID_SCHEMA_ATTR_SYNTAX: &str = "00000000-0000-0000-0000-ffff00000007"; -pub const STR_UUID_SCHEMA_ATTR_SYSTEMMAY: &str = "00000000-0000-0000-0000-ffff00000008"; -pub const STR_UUID_SCHEMA_ATTR_MAY: &str = "00000000-0000-0000-0000-ffff00000009"; -pub const STR_UUID_SCHEMA_ATTR_SYSTEMMUST: &str = "00000000-0000-0000-0000-ffff00000010"; -pub const STR_UUID_SCHEMA_ATTR_MUST: &str = "00000000-0000-0000-0000-ffff00000011"; -pub const STR_UUID_SCHEMA_ATTR_MEMBEROF: &str = "00000000-0000-0000-0000-ffff00000012"; -pub const STR_UUID_SCHEMA_ATTR_MEMBER: &str = "00000000-0000-0000-0000-ffff00000013"; -pub const STR_UUID_SCHEMA_ATTR_DIRECTMEMBEROF: &str = "00000000-0000-0000-0000-ffff00000014"; -pub const STR_UUID_SCHEMA_ATTR_VERSION: &str = "00000000-0000-0000-0000-ffff00000015"; -pub const STR_UUID_SCHEMA_ATTR_DOMAIN: &str = "00000000-0000-0000-0000-ffff00000016"; -pub const STR_UUID_SCHEMA_ATTR_ACP_ENABLE: &str = "00000000-0000-0000-0000-ffff00000017"; -pub const STR_UUID_SCHEMA_ATTR_ACP_RECEIVER: &str = "00000000-0000-0000-0000-ffff00000018"; -pub const STR_UUID_SCHEMA_ATTR_ACP_TARGETSCOPE: &str = "00000000-0000-0000-0000-ffff00000019"; -pub const STR_UUID_SCHEMA_ATTR_ACP_SEARCH_ATTR: &str = "00000000-0000-0000-0000-ffff00000020"; -pub const STR_UUID_SCHEMA_ATTR_ACP_CREATE_CLASS: &str = "00000000-0000-0000-0000-ffff00000021"; -pub const STR_UUID_SCHEMA_ATTR_ACP_CREATE_ATTR: &str = "00000000-0000-0000-0000-ffff00000022"; -pub const STR_UUID_SCHEMA_ATTR_ACP_MODIFY_REMOVEDATTR: &str = - "00000000-0000-0000-0000-ffff00000023"; -pub const STR_UUID_SCHEMA_ATTR_ACP_MODIFY_PRESENTATTR: &str = - "00000000-0000-0000-0000-ffff00000024"; -pub const STR_UUID_SCHEMA_ATTR_ACP_MODIFY_CLASS: &str = "00000000-0000-0000-0000-ffff00000025"; -pub const STR_UUID_SCHEMA_CLASS_ATTRIBUTETYPE: &str = "00000000-0000-0000-0000-ffff00000026"; -pub const STR_UUID_SCHEMA_CLASS_CLASSTYPE: &str = "00000000-0000-0000-0000-ffff00000027"; -pub const STR_UUID_SCHEMA_CLASS_OBJECT: &str = "00000000-0000-0000-0000-ffff00000028"; -pub const STR_UUID_SCHEMA_CLASS_EXTENSIBLEOBJECT: &str = "00000000-0000-0000-0000-ffff00000029"; -pub const STR_UUID_SCHEMA_CLASS_MEMBEROF: &str = "00000000-0000-0000-0000-ffff00000030"; -pub const STR_UUID_SCHEMA_CLASS_RECYCLED: &str = "00000000-0000-0000-0000-ffff00000031"; -pub const STR_UUID_SCHEMA_CLASS_TOMBSTONE: &str = "00000000-0000-0000-0000-ffff00000032"; -pub const STR_UUID_SCHEMA_CLASS_SYSTEM_INFO: &str = "00000000-0000-0000-0000-ffff00000033"; -pub const STR_UUID_SCHEMA_CLASS_ACCESS_CONTROL_PROFILE: &str = - "00000000-0000-0000-0000-ffff00000034"; -pub const STR_UUID_SCHEMA_CLASS_ACCESS_CONTROL_SEARCH: &str = - "00000000-0000-0000-0000-ffff00000035"; -pub const STR_UUID_SCHEMA_CLASS_ACCESS_CONTROL_DELETE: &str = - "00000000-0000-0000-0000-ffff00000036"; -pub const STR_UUID_SCHEMA_CLASS_ACCESS_CONTROL_MODIFY: &str = - "00000000-0000-0000-0000-ffff00000037"; -pub const STR_UUID_SCHEMA_CLASS_ACCESS_CONTROL_CREATE: &str = - "00000000-0000-0000-0000-ffff00000038"; -pub const STR_UUID_SCHEMA_CLASS_SYSTEM: &str = "00000000-0000-0000-0000-ffff00000039"; -pub const STR_UUID_SCHEMA_ATTR_DISPLAYNAME: &str = "00000000-0000-0000-0000-ffff00000040"; -pub const STR_UUID_SCHEMA_ATTR_MAIL: &str = "00000000-0000-0000-0000-ffff00000041"; -pub const STR_UUID_SCHEMA_ATTR_SSH_PUBLICKEY: &str = "00000000-0000-0000-0000-ffff00000042"; -pub const STR_UUID_SCHEMA_ATTR_PRIMARY_CREDENTIAL: &str = "00000000-0000-0000-0000-ffff00000043"; -pub const STR_UUID_SCHEMA_CLASS_PERSON: &str = "00000000-0000-0000-0000-ffff00000044"; -pub const STR_UUID_SCHEMA_CLASS_GROUP: &str = "00000000-0000-0000-0000-ffff00000045"; -pub const STR_UUID_SCHEMA_CLASS_ACCOUNT: &str = "00000000-0000-0000-0000-ffff00000046"; +pub const UUID_SCHEMA_ATTR_CLASS: Uuid = uuid!("00000000-0000-0000-0000-ffff00000000"); +pub const UUID_SCHEMA_ATTR_UUID: Uuid = uuid!("00000000-0000-0000-0000-ffff00000001"); +pub const UUID_SCHEMA_ATTR_NAME: Uuid = uuid!("00000000-0000-0000-0000-ffff00000002"); +pub const UUID_SCHEMA_ATTR_SPN: Uuid = uuid!("00000000-0000-0000-0000-ffff00000003"); +pub const UUID_SCHEMA_ATTR_DESCRIPTION: Uuid = uuid!("00000000-0000-0000-0000-ffff00000004"); +pub const UUID_SCHEMA_ATTR_MULTIVALUE: Uuid = uuid!("00000000-0000-0000-0000-ffff00000005"); +pub const UUID_SCHEMA_ATTR_UNIQUE: Uuid = uuid!("00000000-0000-0000-0000-ffff00000047"); +pub const UUID_SCHEMA_ATTR_INDEX: Uuid = uuid!("00000000-0000-0000-0000-ffff00000006"); +pub const UUID_SCHEMA_ATTR_SYNTAX: Uuid = uuid!("00000000-0000-0000-0000-ffff00000007"); +pub const UUID_SCHEMA_ATTR_SYSTEMMAY: Uuid = uuid!("00000000-0000-0000-0000-ffff00000008"); +pub const UUID_SCHEMA_ATTR_MAY: Uuid = uuid!("00000000-0000-0000-0000-ffff00000009"); +pub const UUID_SCHEMA_ATTR_SYSTEMMUST: Uuid = uuid!("00000000-0000-0000-0000-ffff00000010"); +pub const UUID_SCHEMA_ATTR_MUST: Uuid = uuid!("00000000-0000-0000-0000-ffff00000011"); +pub const UUID_SCHEMA_ATTR_MEMBEROF: Uuid = uuid!("00000000-0000-0000-0000-ffff00000012"); +pub const UUID_SCHEMA_ATTR_MEMBER: Uuid = uuid!("00000000-0000-0000-0000-ffff00000013"); +pub const UUID_SCHEMA_ATTR_DIRECTMEMBEROF: Uuid = uuid!("00000000-0000-0000-0000-ffff00000014"); +pub const UUID_SCHEMA_ATTR_VERSION: Uuid = uuid!("00000000-0000-0000-0000-ffff00000015"); +pub const UUID_SCHEMA_ATTR_DOMAIN: Uuid = uuid!("00000000-0000-0000-0000-ffff00000016"); +pub const UUID_SCHEMA_ATTR_ACP_ENABLE: Uuid = uuid!("00000000-0000-0000-0000-ffff00000017"); +pub const UUID_SCHEMA_ATTR_ACP_RECEIVER: Uuid = uuid!("00000000-0000-0000-0000-ffff00000018"); +pub const UUID_SCHEMA_ATTR_ACP_TARGETSCOPE: Uuid = uuid!("00000000-0000-0000-0000-ffff00000019"); +pub const UUID_SCHEMA_ATTR_ACP_SEARCH_ATTR: Uuid = uuid!("00000000-0000-0000-0000-ffff00000020"); +pub const UUID_SCHEMA_ATTR_ACP_CREATE_CLASS: Uuid = uuid!("00000000-0000-0000-0000-ffff00000021"); +pub const UUID_SCHEMA_ATTR_ACP_CREATE_ATTR: Uuid = uuid!("00000000-0000-0000-0000-ffff00000022"); +pub const UUID_SCHEMA_ATTR_ACP_MODIFY_REMOVEDATTR: Uuid = + uuid!("00000000-0000-0000-0000-ffff00000023"); +pub const UUID_SCHEMA_ATTR_ACP_MODIFY_PRESENTATTR: Uuid = + uuid!("00000000-0000-0000-0000-ffff00000024"); +pub const UUID_SCHEMA_ATTR_ACP_MODIFY_CLASS: Uuid = uuid!("00000000-0000-0000-0000-ffff00000025"); +pub const UUID_SCHEMA_CLASS_ATTRIBUTETYPE: Uuid = uuid!("00000000-0000-0000-0000-ffff00000026"); +pub const UUID_SCHEMA_CLASS_CLASSTYPE: Uuid = uuid!("00000000-0000-0000-0000-ffff00000027"); +pub const UUID_SCHEMA_CLASS_OBJECT: Uuid = uuid!("00000000-0000-0000-0000-ffff00000028"); +pub const UUID_SCHEMA_CLASS_EXTENSIBLEOBJECT: Uuid = uuid!("00000000-0000-0000-0000-ffff00000029"); +pub const UUID_SCHEMA_CLASS_MEMBEROF: Uuid = uuid!("00000000-0000-0000-0000-ffff00000030"); +pub const UUID_SCHEMA_CLASS_RECYCLED: Uuid = uuid!("00000000-0000-0000-0000-ffff00000031"); +pub const UUID_SCHEMA_CLASS_TOMBSTONE: Uuid = uuid!("00000000-0000-0000-0000-ffff00000032"); +pub const UUID_SCHEMA_CLASS_SYSTEM_INFO: Uuid = uuid!("00000000-0000-0000-0000-ffff00000033"); +pub const UUID_SCHEMA_CLASS_ACCESS_CONTROL_PROFILE: Uuid = + uuid!("00000000-0000-0000-0000-ffff00000034"); +pub const UUID_SCHEMA_CLASS_ACCESS_CONTROL_SEARCH: Uuid = + uuid!("00000000-0000-0000-0000-ffff00000035"); +pub const UUID_SCHEMA_CLASS_ACCESS_CONTROL_DELETE: Uuid = + uuid!("00000000-0000-0000-0000-ffff00000036"); +pub const UUID_SCHEMA_CLASS_ACCESS_CONTROL_MODIFY: Uuid = + uuid!("00000000-0000-0000-0000-ffff00000037"); +pub const UUID_SCHEMA_CLASS_ACCESS_CONTROL_CREATE: Uuid = + uuid!("00000000-0000-0000-0000-ffff00000038"); +pub const UUID_SCHEMA_CLASS_SYSTEM: Uuid = uuid!("00000000-0000-0000-0000-ffff00000039"); +pub const _UUID_SCHEMA_ATTR_DISPLAYNAME: Uuid = uuid!("00000000-0000-0000-0000-ffff00000040"); +pub const _UUID_SCHEMA_ATTR_MAIL: Uuid = uuid!("00000000-0000-0000-0000-ffff00000041"); +pub const _UUID_SCHEMA_ATTR_SSH_PUBLICKEY: Uuid = uuid!("00000000-0000-0000-0000-ffff00000042"); +pub const _UUID_SCHEMA_ATTR_PRIMARY_CREDENTIAL: Uuid = + uuid!("00000000-0000-0000-0000-ffff00000043"); +pub const _UUID_SCHEMA_CLASS_PERSON: Uuid = uuid!("00000000-0000-0000-0000-ffff00000044"); +pub const _UUID_SCHEMA_CLASS_GROUP: Uuid = uuid!("00000000-0000-0000-0000-ffff00000045"); +pub const _UUID_SCHEMA_CLASS_ACCOUNT: Uuid = uuid!("00000000-0000-0000-0000-ffff00000046"); // GAP - 47 -pub const STR_UUID_SCHEMA_ATTR_ATTRIBUTENAME: &str = "00000000-0000-0000-0000-ffff00000048"; -pub const STR_UUID_SCHEMA_ATTR_CLASSNAME: &str = "00000000-0000-0000-0000-ffff00000049"; -pub const STR_UUID_SCHEMA_ATTR_LEGALNAME: &str = "00000000-0000-0000-0000-ffff00000050"; -pub const STR_UUID_SCHEMA_ATTR_RADIUS_SECRET: &str = "00000000-0000-0000-0000-ffff00000051"; -pub const STR_UUID_SCHEMA_CLASS_DOMAIN_INFO: &str = "00000000-0000-0000-0000-ffff00000052"; -pub const STR_UUID_SCHEMA_ATTR_DOMAIN_NAME: &str = "00000000-0000-0000-0000-ffff00000053"; -pub const STR_UUID_SCHEMA_ATTR_DOMAIN_UUID: &str = "00000000-0000-0000-0000-ffff00000054"; -pub const STR_UUID_SCHEMA_ATTR_DOMAIN_SSID: &str = "00000000-0000-0000-0000-ffff00000055"; - -pub const STR_UUID_SCHEMA_ATTR_GIDNUMBER: &str = "00000000-0000-0000-0000-ffff00000056"; -pub const STR_UUID_SCHEMA_CLASS_POSIXACCOUNT: &str = "00000000-0000-0000-0000-ffff00000057"; -pub const STR_UUID_SCHEMA_CLASS_POSIXGROUP: &str = "00000000-0000-0000-0000-ffff00000058"; -pub const STR_UUID_SCHEMA_ATTR_BADLIST_PASSWORD: &str = "00000000-0000-0000-0000-ffff00000059"; -pub const STR_UUID_SCHEMA_CLASS_SYSTEM_CONFIG: &str = "00000000-0000-0000-0000-ffff00000060"; -pub const STR_UUID_SCHEMA_ATTR_LOGINSHELL: &str = "00000000-0000-0000-0000-ffff00000061"; -pub const STR_UUID_SCHEMA_ATTR_UNIX_PASSWORD: &str = "00000000-0000-0000-0000-ffff00000062"; -pub const STR_UUID_SCHEMA_ATTR_LAST_MOD_CID: &str = "00000000-0000-0000-0000-ffff00000063"; -pub const STR_UUID_SCHEMA_ATTR_PHANTOM: &str = "00000000-0000-0000-0000-ffff00000064"; -pub const STR_UUID_SCHEMA_ATTR_CLAIM: &str = "00000000-0000-0000-0000-ffff00000065"; -pub const STR_UUID_SCHEMA_ATTR_PASSWORD_IMPORT: &str = "00000000-0000-0000-0000-ffff00000066"; -pub const STR_UUID_SCHEMA_ATTR_NSUNIQUEID: &str = "00000000-0000-0000-0000-ffff00000067"; - -pub const STR_UUID_SCHEMA_ATTR_DN: &str = "00000000-0000-0000-0000-ffff00000068"; -pub const STR_UUID_SCHEMA_ATTR_NICE: &str = "00000000-0000-0000-0000-ffff00000069"; -pub const STR_UUID_SCHEMA_ATTR_ENTRYUUID: &str = "00000000-0000-0000-0000-ffff00000070"; -pub const STR_UUID_SCHEMA_ATTR_OBJECTCLASS: &str = "00000000-0000-0000-0000-ffff00000071"; - -pub const _STR_UUID_SCHEMA_ATTR_ACCOUNT_EXPIRE: &str = "00000000-0000-0000-0000-ffff00000072"; -pub const _STR_UUID_SCHEMA_ATTR_ACCOUNT_VALID_FROM: &str = "00000000-0000-0000-0000-ffff00000073"; - -pub const STR_UUID_SCHEMA_ATTR_ENTRYDN: &str = "00000000-0000-0000-0000-ffff00000074"; -pub const STR_UUID_SCHEMA_ATTR_EMAIL: &str = "00000000-0000-0000-0000-ffff00000075"; -pub const STR_UUID_SCHEMA_ATTR_EMAILADDRESS: &str = "00000000-0000-0000-0000-ffff00000076"; -pub const STR_UUID_SCHEMA_ATTR_KEYS: &str = "00000000-0000-0000-0000-ffff00000077"; -pub const STR_UUID_SCHEMA_ATTR_SSHPUBLICKEY: &str = "00000000-0000-0000-0000-ffff00000078"; -pub const STR_UUID_SCHEMA_ATTR_UIDNUMBER: &str = "00000000-0000-0000-0000-ffff00000079"; - -pub const _STR_UUID_SCHEMA_ATTR_OAUTH2_RS_NAME: &str = "00000000-0000-0000-0000-ffff00000080"; -pub const _STR_UUID_SCHEMA_ATTR_OAUTH2_RS_ORIGIN: &str = "00000000-0000-0000-0000-ffff00000081"; -pub const _STR_UUID_SCHEMA_ATTR_OAUTH2_RS_SCOPE_MAP: &str = "00000000-0000-0000-0000-ffff00000082"; -pub const _STR_UUID_SCHEMA_ATTR_OAUTH2_RS_BASIC_SECRET: &str = - "00000000-0000-0000-0000-ffff00000083"; -pub const _STR_UUID_SCHEMA_ATTR_OAUTH2_RS_TOKEN_KEY: &str = "00000000-0000-0000-0000-ffff00000084"; -pub const STR_UUID_SCHEMA_CLASS_OAUTH2_RS: &str = "00000000-0000-0000-0000-ffff00000085"; -pub const STR_UUID_SCHEMA_CLASS_OAUTH2_RS_BASIC: &str = "00000000-0000-0000-0000-ffff00000086"; -pub const STR_UUID_SCHEMA_ATTR_CN: &str = "00000000-0000-0000-0000-ffff00000087"; -pub const STR_UUID_SCHEMA_ATTR_DOMAIN_TOKEN_KEY: &str = "00000000-0000-0000-0000-ffff00000088"; -pub const _STR_UUID_SCHEMA_ATTR_OAUTH2_RS_IMPLICIT_SCOPES: &str = - "00000000-0000-0000-0000-ffff00000089"; +pub const UUID_SCHEMA_ATTR_ATTRIBUTENAME: Uuid = uuid!("00000000-0000-0000-0000-ffff00000048"); +pub const UUID_SCHEMA_ATTR_CLASSNAME: Uuid = uuid!("00000000-0000-0000-0000-ffff00000049"); +pub const _UUID_SCHEMA_ATTR_LEGALNAME: Uuid = uuid!("00000000-0000-0000-0000-ffff00000050"); +pub const _UUID_SCHEMA_ATTR_RADIUS_SECRET: Uuid = uuid!("00000000-0000-0000-0000-ffff00000051"); +pub const _UUID_SCHEMA_CLASS_DOMAIN_INFO: Uuid = uuid!("00000000-0000-0000-0000-ffff00000052"); +pub const _UUID_SCHEMA_ATTR_DOMAIN_NAME: Uuid = uuid!("00000000-0000-0000-0000-ffff00000053"); +pub const _UUID_SCHEMA_ATTR_DOMAIN_UUID: Uuid = uuid!("00000000-0000-0000-0000-ffff00000054"); +pub const _UUID_SCHEMA_ATTR_DOMAIN_SSID: Uuid = uuid!("00000000-0000-0000-0000-ffff00000055"); +pub const _UUID_SCHEMA_ATTR_GIDNUMBER: Uuid = uuid!("00000000-0000-0000-0000-ffff00000056"); +pub const _UUID_SCHEMA_CLASS_POSIXACCOUNT: Uuid = uuid!("00000000-0000-0000-0000-ffff00000057"); +pub const _UUID_SCHEMA_CLASS_POSIXGROUP: Uuid = uuid!("00000000-0000-0000-0000-ffff00000058"); +pub const _UUID_SCHEMA_ATTR_BADLIST_PASSWORD: Uuid = uuid!("00000000-0000-0000-0000-ffff00000059"); +pub const _UUID_SCHEMA_CLASS_SYSTEM_CONFIG: Uuid = uuid!("00000000-0000-0000-0000-ffff00000060"); +pub const _UUID_SCHEMA_ATTR_LOGINSHELL: Uuid = uuid!("00000000-0000-0000-0000-ffff00000061"); +pub const _UUID_SCHEMA_ATTR_UNIX_PASSWORD: Uuid = uuid!("00000000-0000-0000-0000-ffff00000062"); +pub const UUID_SCHEMA_ATTR_LAST_MOD_CID: Uuid = uuid!("00000000-0000-0000-0000-ffff00000063"); +pub const UUID_SCHEMA_ATTR_PHANTOM: Uuid = uuid!("00000000-0000-0000-0000-ffff00000064"); +pub const UUID_SCHEMA_ATTR_CLAIM: Uuid = uuid!("00000000-0000-0000-0000-ffff00000065"); +pub const UUID_SCHEMA_ATTR_PASSWORD_IMPORT: Uuid = uuid!("00000000-0000-0000-0000-ffff00000066"); +pub const _UUID_SCHEMA_ATTR_NSUNIQUEID: Uuid = uuid!("00000000-0000-0000-0000-ffff00000067"); +pub const UUID_SCHEMA_ATTR_DN: Uuid = uuid!("00000000-0000-0000-0000-ffff00000068"); +pub const _UUID_SCHEMA_ATTR_NICE: Uuid = uuid!("00000000-0000-0000-0000-ffff00000069"); +pub const UUID_SCHEMA_ATTR_ENTRYUUID: Uuid = uuid!("00000000-0000-0000-0000-ffff00000070"); +pub const UUID_SCHEMA_ATTR_OBJECTCLASS: Uuid = uuid!("00000000-0000-0000-0000-ffff00000071"); +pub const _UUID_SCHEMA_ATTR_ACCOUNT_EXPIRE: Uuid = uuid!("00000000-0000-0000-0000-ffff00000072"); +pub const _UUID_SCHEMA_ATTR_ACCOUNT_VALID_FROM: Uuid = + uuid!("00000000-0000-0000-0000-ffff00000073"); +pub const UUID_SCHEMA_ATTR_ENTRYDN: Uuid = uuid!("00000000-0000-0000-0000-ffff00000074"); +pub const UUID_SCHEMA_ATTR_EMAIL: Uuid = uuid!("00000000-0000-0000-0000-ffff00000075"); +pub const UUID_SCHEMA_ATTR_EMAILADDRESS: Uuid = uuid!("00000000-0000-0000-0000-ffff00000076"); +pub const UUID_SCHEMA_ATTR_KEYS: Uuid = uuid!("00000000-0000-0000-0000-ffff00000077"); +pub const UUID_SCHEMA_ATTR_SSHPUBLICKEY: Uuid = uuid!("00000000-0000-0000-0000-ffff00000078"); +pub const UUID_SCHEMA_ATTR_UIDNUMBER: Uuid = uuid!("00000000-0000-0000-0000-ffff00000079"); +pub const _UUID_SCHEMA_ATTR_OAUTH2_RS_NAME: Uuid = uuid!("00000000-0000-0000-0000-ffff00000080"); +pub const _UUID_SCHEMA_ATTR_OAUTH2_RS_ORIGIN: Uuid = uuid!("00000000-0000-0000-0000-ffff00000081"); +pub const _UUID_SCHEMA_ATTR_OAUTH2_RS_SCOPE_MAP: Uuid = + uuid!("00000000-0000-0000-0000-ffff00000082"); +pub const _UUID_SCHEMA_ATTR_OAUTH2_RS_BASIC_SECRET: Uuid = + uuid!("00000000-0000-0000-0000-ffff00000083"); +pub const _UUID_SCHEMA_ATTR_OAUTH2_RS_TOKEN_KEY: Uuid = + uuid!("00000000-0000-0000-0000-ffff00000084"); +pub const UUID_SCHEMA_CLASS_OAUTH2_RS: Uuid = uuid!("00000000-0000-0000-0000-ffff00000085"); +pub const UUID_SCHEMA_CLASS_OAUTH2_RS_BASIC: Uuid = uuid!("00000000-0000-0000-0000-ffff00000086"); +pub const UUID_SCHEMA_ATTR_CN: Uuid = uuid!("00000000-0000-0000-0000-ffff00000087"); +pub const UUID_SCHEMA_ATTR_DOMAIN_TOKEN_KEY: Uuid = uuid!("00000000-0000-0000-0000-ffff00000088"); +pub const _UUID_SCHEMA_ATTR_OAUTH2_RS_IMPLICIT_SCOPES: Uuid = + uuid!("00000000-0000-0000-0000-ffff00000089"); // System and domain infos // I'd like to strongly criticise william of the past for making poor choices about these allocations. -pub const STR_UUID_SYSTEM_INFO: &str = "00000000-0000-0000-0000-ffffff000001"; +pub const UUID_SYSTEM_INFO: Uuid = uuid!("00000000-0000-0000-0000-ffffff000001"); pub const STR_UUID_DOMAIN_INFO: &str = "00000000-0000-0000-0000-ffffff000025"; + // DO NOT allocate here, allocate below. // Access controls // skip 00 / 01 - see system info -pub const _STR_UUID_IDM_ADMINS_ACP_RECYCLE_SEARCH_V1: &str = "00000000-0000-0000-0000-ffffff000002"; -pub const _STR_UUID_IDM_ADMINS_ACP_REVIVE_V1: &str = "00000000-0000-0000-0000-ffffff000003"; -pub const _STR_UUID_IDM_SELF_ACP_READ_V1: &str = "00000000-0000-0000-0000-ffffff000004"; -pub const _STR_UUID_IDM_ALL_ACP_READ_V1: &str = "00000000-0000-0000-0000-ffffff000006"; -pub const _STR_UUID_IDM_ACP_PEOPLE_READ_PRIV_V1: &str = "00000000-0000-0000-0000-ffffff000007"; -pub const _STR_UUID_IDM_ACP_PEOPLE_WRITE_PRIV_V1: &str = "00000000-0000-0000-0000-ffffff000008"; -pub const _STR_UUID_IDM_ACP_GROUP_WRITE_PRIV_V1: &str = "00000000-0000-0000-0000-ffffff000009"; -pub const _STR_UUID_IDM_ACP_ACCOUNT_READ_PRIV_V1: &str = "00000000-0000-0000-0000-ffffff000010"; -pub const _STR_UUID_IDM_ACP_ACCOUNT_WRITE_PRIV_V1: &str = "00000000-0000-0000-0000-ffffff000011"; -pub const _STR_UUID_IDM_ACP_ACCOUNT_MANAGE_PRIV_V1: &str = "00000000-0000-0000-0000-ffffff000012"; -pub const _STR_UUID_IDM_ACP_PEOPLE_MANAGE_PRIV_V1: &str = "00000000-0000-0000-0000-ffffff000013"; -pub const _STR_UUID_IDM_ACP_RADIUS_SERVERS_V1: &str = "00000000-0000-0000-0000-ffffff000014"; -pub const _STR_UUID_IDM_ACP_HP_ACCOUNT_READ_PRIV_V1: &str = "00000000-0000-0000-0000-ffffff000015"; -pub const _STR_UUID_IDM_ACP_HP_ACCOUNT_WRITE_PRIV_V1: &str = "00000000-0000-0000-0000-ffffff000016"; -pub const _STR_UUID_IDM_ACP_HP_GROUP_WRITE_PRIV_V1: &str = "00000000-0000-0000-0000-ffffff000017"; -pub const _STR_UUID_IDM_ACP_SCHEMA_WRITE_ATTRS_PRIV_V1: &str = - "00000000-0000-0000-0000-ffffff000018"; -pub const _STR_UUID_IDM_ACP_ACP_MANAGE_PRIV_V1: &str = "00000000-0000-0000-0000-ffffff000019"; -pub const _STR_UUID_IDM_ACP_SCHEMA_WRITE_CLASSES_PRIV_V1: &str = - "00000000-0000-0000-0000-ffffff000020"; -pub const _STR_UUID_IDM_SELF_ACP_WRITE_V1: &str = "00000000-0000-0000-0000-ffffff000021"; -pub const _STR_UUID_IDM_ACP_GROUP_MANAGE_PRIV_V1: &str = "00000000-0000-0000-0000-ffffff000022"; -pub const _STR_UUID_IDM_ACP_HP_ACCOUNT_MANAGE_PRIV_V1: &str = - "00000000-0000-0000-0000-ffffff000023"; -pub const _STR_UUID_IDM_ACP_HP_GROUP_MANAGE_PRIV_V1: &str = "00000000-0000-0000-0000-ffffff000024"; +pub const _UUID_IDM_ADMINS_ACP_RECYCLE_SEARCH_V1: Uuid = + uuid!("00000000-0000-0000-0000-ffffff000002"); +pub const _UUID_IDM_ADMINS_ACP_REVIVE_V1: Uuid = uuid!("00000000-0000-0000-0000-ffffff000003"); +pub const _UUID_IDM_SELF_ACP_READ_V1: Uuid = uuid!("00000000-0000-0000-0000-ffffff000004"); +pub const _UUID_IDM_ALL_ACP_READ_V1: Uuid = uuid!("00000000-0000-0000-0000-ffffff000006"); +pub const _UUID_IDM_ACP_PEOPLE_READ_PRIV_V1: Uuid = uuid!("00000000-0000-0000-0000-ffffff000007"); +pub const _UUID_IDM_ACP_PEOPLE_WRITE_PRIV_V1: Uuid = uuid!("00000000-0000-0000-0000-ffffff000008"); +pub const _UUID_IDM_ACP_GROUP_WRITE_PRIV_V1: Uuid = uuid!("00000000-0000-0000-0000-ffffff000009"); +pub const _UUID_IDM_ACP_ACCOUNT_READ_PRIV_V1: Uuid = uuid!("00000000-0000-0000-0000-ffffff000010"); +pub const _UUID_IDM_ACP_ACCOUNT_WRITE_PRIV_V1: Uuid = uuid!("00000000-0000-0000-0000-ffffff000011"); +pub const _UUID_IDM_ACP_ACCOUNT_MANAGE_PRIV_V1: Uuid = + uuid!("00000000-0000-0000-0000-ffffff000012"); +pub const _UUID_IDM_ACP_PEOPLE_MANAGE_PRIV_V1: Uuid = uuid!("00000000-0000-0000-0000-ffffff000013"); +pub const _UUID_IDM_ACP_RADIUS_SERVERS_V1: Uuid = uuid!("00000000-0000-0000-0000-ffffff000014"); +pub const _UUID_IDM_ACP_HP_ACCOUNT_READ_PRIV_V1: Uuid = + uuid!("00000000-0000-0000-0000-ffffff000015"); +pub const _UUID_IDM_ACP_HP_ACCOUNT_WRITE_PRIV_V1: Uuid = + uuid!("00000000-0000-0000-0000-ffffff000016"); +pub const _UUID_IDM_ACP_HP_GROUP_WRITE_PRIV_V1: Uuid = + uuid!("00000000-0000-0000-0000-ffffff000017"); +pub const _UUID_IDM_ACP_SCHEMA_WRITE_ATTRS_PRIV_V1: Uuid = + uuid!("00000000-0000-0000-0000-ffffff000018"); +pub const _UUID_IDM_ACP_ACP_MANAGE_PRIV_V1: Uuid = uuid!("00000000-0000-0000-0000-ffffff000019"); +pub const _UUID_IDM_ACP_SCHEMA_WRITE_CLASSES_PRIV_V1: Uuid = + uuid!("00000000-0000-0000-0000-ffffff000020"); +pub const _UUID_IDM_SELF_ACP_WRITE_V1: Uuid = uuid!("00000000-0000-0000-0000-ffffff000021"); +pub const _UUID_IDM_ACP_GROUP_MANAGE_PRIV_V1: Uuid = uuid!("00000000-0000-0000-0000-ffffff000022"); +pub const _UUID_IDM_ACP_HP_ACCOUNT_MANAGE_PRIV_V1: Uuid = + uuid!("00000000-0000-0000-0000-ffffff000023"); +pub const _UUID_IDM_ACP_HP_GROUP_MANAGE_PRIV_V1: Uuid = + uuid!("00000000-0000-0000-0000-ffffff000024"); // Skip 25 - see domain info. -pub const STR_UUID_IDM_ACP_DOMAIN_ADMIN_PRIV_V1: &str = "00000000-0000-0000-0000-ffffff000026"; -pub const STR_UUID_SYSTEM_CONFIG: &str = "00000000-0000-0000-0000-ffffff000027"; -pub const STR_UUID_IDM_ACP_SYSTEM_CONFIG_PRIV_V1: &str = "00000000-0000-0000-0000-ffffff000028"; -pub const _STR_UUID_IDM_ACP_ACCOUNT_UNIX_EXTEND_PRIV_V1: &str = - "00000000-0000-0000-0000-ffffff000029"; -pub const _STR_UUID_IDM_ACP_GROUP_UNIX_EXTEND_PRIV_V1: &str = - "00000000-0000-0000-0000-ffffff000030"; -pub const _STR_UUID_IDM_ACP_PEOPLE_ACCOUNT_PASSWORD_IMPORT_PRIV_V1: &str = - "00000000-0000-0000-0000-ffffff000031"; -pub const _STR_UUID_IDM_ACP_PEOPLE_EXTEND_PRIV_V1: &str = "00000000-0000-0000-0000-ffffff000032"; -pub const _STR_UUID_IDM_HP_ACP_ACCOUNT_UNIX_EXTEND_PRIV_V1: &str = - "00000000-0000-0000-0000-ffffff000033"; -pub const _STR_UUID_IDM_HP_ACP_GROUP_UNIX_EXTEND_PRIV_V1: &str = - "00000000-0000-0000-0000-ffffff000034"; -pub const _STR_UUID_IDM_HP_ACP_OAUTH2_MANAGE_PRIV_V1: &str = "00000000-0000-0000-0000-ffffff000035"; +pub const _UUID_IDM_ACP_DOMAIN_ADMIN_PRIV_V1: Uuid = uuid!("00000000-0000-0000-0000-ffffff000026"); +pub const UUID_SYSTEM_CONFIG: Uuid = uuid!("00000000-0000-0000-0000-ffffff000027"); +pub const _UUID_IDM_ACP_SYSTEM_CONFIG_PRIV_V1: Uuid = uuid!("00000000-0000-0000-0000-ffffff000028"); +pub const _UUID_IDM_ACP_ACCOUNT_UNIX_EXTEND_PRIV_V1: Uuid = + uuid!("00000000-0000-0000-0000-ffffff000029"); +pub const _UUID_IDM_ACP_GROUP_UNIX_EXTEND_PRIV_V1: Uuid = + uuid!("00000000-0000-0000-0000-ffffff000030"); +pub const _UUID_IDM_ACP_PEOPLE_ACCOUNT_PASSWORD_IMPORT_PRIV_V1: Uuid = + uuid!("00000000-0000-0000-0000-ffffff000031"); +pub const _UUID_IDM_ACP_PEOPLE_EXTEND_PRIV_V1: Uuid = uuid!("00000000-0000-0000-0000-ffffff000032"); +pub const _UUID_IDM_HP_ACP_ACCOUNT_UNIX_EXTEND_PRIV_V1: Uuid = + uuid!("00000000-0000-0000-0000-ffffff000033"); +pub const _UUID_IDM_HP_ACP_GROUP_UNIX_EXTEND_PRIV_V1: Uuid = + uuid!("00000000-0000-0000-0000-ffffff000034"); +pub const _UUID_IDM_HP_ACP_OAUTH2_MANAGE_PRIV_V1: Uuid = + uuid!("00000000-0000-0000-0000-ffffff000035"); // End of system ranges -pub const STR_UUID_DOES_NOT_EXIST: &str = "00000000-0000-0000-0000-fffffffffffe"; -pub const STR_UUID_ANONYMOUS: &str = "00000000-0000-0000-0000-ffffffffffff"; +pub const UUID_DOES_NOT_EXIST: Uuid = uuid!("00000000-0000-0000-0000-fffffffffffe"); +pub const UUID_ANONYMOUS: Uuid = uuid!("00000000-0000-0000-0000-ffffffffffff"); lazy_static! { pub static ref UUID_ADMIN: Uuid = Uuid::parse_str(STR_UUID_ADMIN).unwrap(); - pub static ref UUID_SYSTEM_ADMINS: Uuid = Uuid::parse_str(STR_UUID_SYSTEM_ADMINS).unwrap(); - pub static ref UUID_IDM_ADMIN: Uuid = Uuid::parse_str(STR_UUID_IDM_ADMIN_V1).unwrap(); - pub static ref UUID_DOES_NOT_EXIST: Uuid = Uuid::parse_str(STR_UUID_DOES_NOT_EXIST).unwrap(); - pub static ref UUID_ANONYMOUS: Uuid = Uuid::parse_str(STR_UUID_ANONYMOUS).unwrap(); - pub static ref UUID_SYSTEM_CONFIG: Uuid = Uuid::parse_str(STR_UUID_SYSTEM_CONFIG).unwrap(); - pub static ref UUID_SYSTEM_INFO: Uuid = Uuid::parse_str(STR_UUID_SYSTEM_INFO).unwrap(); pub static ref UUID_DOMAIN_INFO: Uuid = Uuid::parse_str(STR_UUID_DOMAIN_INFO).unwrap(); - pub static ref UUID_SCHEMA_ATTR_CLASS: Uuid = - Uuid::parse_str(STR_UUID_SCHEMA_ATTR_CLASS).unwrap(); - pub static ref UUID_SCHEMA_ATTR_UUID: Uuid = - Uuid::parse_str(STR_UUID_SCHEMA_ATTR_UUID).unwrap(); - pub static ref UUID_SCHEMA_ATTR_LAST_MOD_CID: Uuid = - Uuid::parse_str(STR_UUID_SCHEMA_ATTR_LAST_MOD_CID).unwrap(); - pub static ref UUID_SCHEMA_ATTR_NAME: Uuid = - Uuid::parse_str(STR_UUID_SCHEMA_ATTR_NAME).unwrap(); - pub static ref UUID_SCHEMA_ATTR_SPN: Uuid = Uuid::parse_str(STR_UUID_SCHEMA_ATTR_SPN).unwrap(); - pub static ref UUID_SCHEMA_ATTR_ATTRIBUTENAME: Uuid = - Uuid::parse_str(STR_UUID_SCHEMA_ATTR_ATTRIBUTENAME).unwrap(); - pub static ref UUID_SCHEMA_ATTR_CLASSNAME: Uuid = - Uuid::parse_str(STR_UUID_SCHEMA_ATTR_CLASSNAME).unwrap(); - pub static ref UUID_SCHEMA_ATTR_DESCRIPTION: Uuid = - Uuid::parse_str(STR_UUID_SCHEMA_ATTR_DESCRIPTION).unwrap(); - pub static ref UUID_SCHEMA_ATTR_MULTIVALUE: Uuid = - Uuid::parse_str(STR_UUID_SCHEMA_ATTR_MULTIVALUE).unwrap(); - pub static ref UUID_SCHEMA_ATTR_PHANTOM: Uuid = - Uuid::parse_str(STR_UUID_SCHEMA_ATTR_PHANTOM).unwrap(); - pub static ref UUID_SCHEMA_ATTR_UNIQUE: Uuid = - Uuid::parse_str(STR_UUID_SCHEMA_ATTR_UNIQUE).unwrap(); - pub static ref UUID_SCHEMA_ATTR_INDEX: Uuid = - Uuid::parse_str(STR_UUID_SCHEMA_ATTR_INDEX).unwrap(); - pub static ref UUID_SCHEMA_ATTR_SYNTAX: Uuid = - Uuid::parse_str(STR_UUID_SCHEMA_ATTR_SYNTAX).unwrap(); - pub static ref UUID_SCHEMA_ATTR_SYSTEMMAY: Uuid = - Uuid::parse_str(STR_UUID_SCHEMA_ATTR_SYSTEMMAY).unwrap(); - pub static ref UUID_SCHEMA_ATTR_MAY: Uuid = Uuid::parse_str(STR_UUID_SCHEMA_ATTR_MAY).unwrap(); - pub static ref UUID_SCHEMA_ATTR_SYSTEMMUST: Uuid = - Uuid::parse_str(STR_UUID_SCHEMA_ATTR_SYSTEMMUST).unwrap(); - pub static ref UUID_SCHEMA_ATTR_MUST: Uuid = - Uuid::parse_str(STR_UUID_SCHEMA_ATTR_MUST).unwrap(); - pub static ref UUID_SCHEMA_ATTR_ACP_ENABLE: Uuid = - Uuid::parse_str(STR_UUID_SCHEMA_ATTR_ACP_ENABLE).unwrap(); - pub static ref UUID_SCHEMA_ATTR_ACP_RECEIVER: Uuid = - Uuid::parse_str(STR_UUID_SCHEMA_ATTR_ACP_RECEIVER).unwrap(); - pub static ref UUID_SCHEMA_ATTR_ACP_TARGETSCOPE: Uuid = - Uuid::parse_str(STR_UUID_SCHEMA_ATTR_ACP_TARGETSCOPE).unwrap(); - pub static ref UUID_SCHEMA_ATTR_ACP_SEARCH_ATTR: Uuid = - Uuid::parse_str(STR_UUID_SCHEMA_ATTR_ACP_SEARCH_ATTR).unwrap(); - pub static ref UUID_SCHEMA_ATTR_ACP_CREATE_CLASS: Uuid = - Uuid::parse_str(STR_UUID_SCHEMA_ATTR_ACP_CREATE_CLASS).unwrap(); - pub static ref UUID_SCHEMA_ATTR_ACP_CREATE_ATTR: Uuid = - Uuid::parse_str(STR_UUID_SCHEMA_ATTR_ACP_CREATE_ATTR).unwrap(); - pub static ref UUID_SCHEMA_ATTR_ACP_MODIFY_REMOVEDATTR: Uuid = - Uuid::parse_str(STR_UUID_SCHEMA_ATTR_ACP_MODIFY_REMOVEDATTR).unwrap(); - pub static ref UUID_SCHEMA_ATTR_ACP_MODIFY_PRESENTATTR: Uuid = - Uuid::parse_str(STR_UUID_SCHEMA_ATTR_ACP_MODIFY_PRESENTATTR).unwrap(); - pub static ref UUID_SCHEMA_ATTR_ACP_MODIFY_CLASS: Uuid = - Uuid::parse_str(STR_UUID_SCHEMA_ATTR_ACP_MODIFY_CLASS).unwrap(); - pub static ref UUID_SCHEMA_ATTR_MEMBEROF: Uuid = - Uuid::parse_str(STR_UUID_SCHEMA_ATTR_MEMBEROF).unwrap(); - pub static ref UUID_SCHEMA_ATTR_DIRECTMEMBEROF: Uuid = - Uuid::parse_str(STR_UUID_SCHEMA_ATTR_DIRECTMEMBEROF).unwrap(); - pub static ref UUID_SCHEMA_ATTR_MEMBER: Uuid = - Uuid::parse_str(STR_UUID_SCHEMA_ATTR_MEMBER).unwrap(); - pub static ref UUID_SCHEMA_ATTR_VERSION: Uuid = - Uuid::parse_str(STR_UUID_SCHEMA_ATTR_VERSION).unwrap(); - pub static ref UUID_SCHEMA_ATTR_DOMAIN: Uuid = - Uuid::parse_str(STR_UUID_SCHEMA_ATTR_DOMAIN).unwrap(); - pub static ref UUID_SCHEMA_ATTR_CLAIM: Uuid = - Uuid::parse_str(STR_UUID_SCHEMA_ATTR_CLAIM).unwrap(); - pub static ref UUID_SCHEMA_ATTR_PASSWORD_IMPORT: Uuid = - Uuid::parse_str(STR_UUID_SCHEMA_ATTR_PASSWORD_IMPORT).unwrap(); - pub static ref UUID_SCHEMA_ATTR_DN: Uuid = Uuid::parse_str(STR_UUID_SCHEMA_ATTR_DN).unwrap(); - pub static ref UUID_SCHEMA_ATTR_ENTRYUUID: Uuid = - Uuid::parse_str(STR_UUID_SCHEMA_ATTR_ENTRYUUID).unwrap(); - pub static ref UUID_SCHEMA_ATTR_OBJECTCLASS: Uuid = - Uuid::parse_str(STR_UUID_SCHEMA_ATTR_OBJECTCLASS).unwrap(); - pub static ref UUID_SCHEMA_CLASS_ATTRIBUTETYPE: Uuid = - Uuid::parse_str(STR_UUID_SCHEMA_CLASS_ATTRIBUTETYPE).unwrap(); - pub static ref UUID_SCHEMA_CLASS_CLASSTYPE: Uuid = - Uuid::parse_str(STR_UUID_SCHEMA_CLASS_CLASSTYPE).unwrap(); - pub static ref UUID_SCHEMA_CLASS_OBJECT: Uuid = - Uuid::parse_str(STR_UUID_SCHEMA_CLASS_OBJECT).unwrap(); - pub static ref UUID_SCHEMA_CLASS_MEMBEROF: Uuid = - Uuid::parse_str(STR_UUID_SCHEMA_CLASS_MEMBEROF).unwrap(); - pub static ref UUID_SCHEMA_CLASS_EXTENSIBLEOBJECT: Uuid = - Uuid::parse_str(STR_UUID_SCHEMA_CLASS_EXTENSIBLEOBJECT).unwrap(); - pub static ref UUID_SCHEMA_CLASS_RECYCLED: Uuid = - Uuid::parse_str(STR_UUID_SCHEMA_CLASS_RECYCLED).unwrap(); - pub static ref UUID_SCHEMA_CLASS_TOMBSTONE: Uuid = - Uuid::parse_str(STR_UUID_SCHEMA_CLASS_TOMBSTONE).unwrap(); - pub static ref UUID_SCHEMA_CLASS_SYSTEM_INFO: Uuid = - Uuid::parse_str(STR_UUID_SCHEMA_CLASS_SYSTEM_INFO).unwrap(); - pub static ref UUID_SCHEMA_CLASS_ACCESS_CONTROL_PROFILE: Uuid = - Uuid::parse_str(STR_UUID_SCHEMA_CLASS_ACCESS_CONTROL_PROFILE).unwrap(); - pub static ref UUID_SCHEMA_CLASS_ACCESS_CONTROL_SEARCH: Uuid = - Uuid::parse_str(STR_UUID_SCHEMA_CLASS_ACCESS_CONTROL_SEARCH).unwrap(); - pub static ref UUID_SCHEMA_CLASS_ACCESS_CONTROL_DELETE: Uuid = - Uuid::parse_str(STR_UUID_SCHEMA_CLASS_ACCESS_CONTROL_DELETE).unwrap(); - pub static ref UUID_SCHEMA_CLASS_ACCESS_CONTROL_MODIFY: Uuid = - Uuid::parse_str(STR_UUID_SCHEMA_CLASS_ACCESS_CONTROL_MODIFY).unwrap(); - pub static ref UUID_SCHEMA_CLASS_ACCESS_CONTROL_CREATE: Uuid = - Uuid::parse_str(STR_UUID_SCHEMA_CLASS_ACCESS_CONTROL_CREATE).unwrap(); - pub static ref UUID_SCHEMA_CLASS_SYSTEM: Uuid = - Uuid::parse_str(STR_UUID_SCHEMA_CLASS_SYSTEM).unwrap(); - pub static ref UUID_SCHEMA_ATTR_ENTRYDN: Uuid = - Uuid::parse_str(STR_UUID_SCHEMA_ATTR_ENTRYDN).unwrap(); - pub static ref UUID_SCHEMA_ATTR_EMAIL: Uuid = - Uuid::parse_str(STR_UUID_SCHEMA_ATTR_EMAIL).unwrap(); - pub static ref UUID_SCHEMA_ATTR_EMAILADDRESS: Uuid = - Uuid::parse_str(STR_UUID_SCHEMA_ATTR_EMAILADDRESS).unwrap(); - pub static ref UUID_SCHEMA_ATTR_KEYS: Uuid = - Uuid::parse_str(STR_UUID_SCHEMA_ATTR_KEYS).unwrap(); - pub static ref UUID_SCHEMA_ATTR_SSHPUBLICKEY: Uuid = - Uuid::parse_str(STR_UUID_SCHEMA_ATTR_SSHPUBLICKEY).unwrap(); - pub static ref UUID_SCHEMA_ATTR_CN: Uuid = Uuid::parse_str(STR_UUID_SCHEMA_ATTR_CN).unwrap(); - pub static ref UUID_SCHEMA_ATTR_UIDNUMBER: Uuid = - Uuid::parse_str(STR_UUID_SCHEMA_ATTR_UIDNUMBER).unwrap(); - pub static ref UUID_SCHEMA_CLASS_OAUTH2_RS: Uuid = - Uuid::parse_str(STR_UUID_SCHEMA_CLASS_OAUTH2_RS).unwrap(); - pub static ref UUID_SCHEMA_CLASS_OAUTH2_RS_BASIC: Uuid = - Uuid::parse_str(STR_UUID_SCHEMA_CLASS_OAUTH2_RS_BASIC).unwrap(); - pub static ref UUID_SCHEMA_ATTR_DOMAIN_TOKEN_KEY: Uuid = - Uuid::parse_str(STR_UUID_SCHEMA_ATTR_DOMAIN_TOKEN_KEY).unwrap(); } diff --git a/kanidmd/src/lib/idm/account.rs b/kanidmd/src/lib/idm/account.rs index e8e11b208..838b7f0d1 100644 --- a/kanidmd/src/lib/idm/account.rs +++ b/kanidmd/src/lib/idm/account.rs @@ -225,7 +225,7 @@ impl Account { pub fn primary_cred_uuid(&self) -> Uuid { match &self.primary { Some(cred) => cred.uuid, - None => *UUID_ANONYMOUS, + None => UUID_ANONYMOUS, } } @@ -236,7 +236,7 @@ impl Account { } pub fn is_anonymous(&self) -> bool { - self.uuid == *UUID_ANONYMOUS + self.uuid == UUID_ANONYMOUS } pub(crate) fn gen_generatedpassword_recover_mod( diff --git a/kanidmd/src/lib/idm/oauth2.rs b/kanidmd/src/lib/idm/oauth2.rs index 91a562634..44b882879 100644 --- a/kanidmd/src/lib/idm/oauth2.rs +++ b/kanidmd/src/lib/idm/oauth2.rs @@ -667,7 +667,7 @@ mod tests { // System admins ( "oauth2_rs_scope_map", - Value::new_oauthscopemap(*UUID_SYSTEM_ADMINS, btreeset!["read".to_string()]) + Value::new_oauthscopemap(UUID_SYSTEM_ADMINS, btreeset!["read".to_string()]) ) ); let ce = CreateEvent::new_internal(vec![e]); diff --git a/kanidmd/src/lib/idm/server.rs b/kanidmd/src/lib/idm/server.rs index 86674f0e6..4587f2846 100644 --- a/kanidmd/src/lib/idm/server.rs +++ b/kanidmd/src/lib/idm/server.rs @@ -813,7 +813,7 @@ impl<'a> IdmServerAuthTransaction<'a> { })?; // if anonymous - if lae.target == *UUID_ANONYMOUS { + if lae.target == UUID_ANONYMOUS { let account = Account::try_from_entry_ro(account_entry.as_ref(), &mut self.qs_read)?; // Check if the anon account has been locked. if !account.is_within_valid_time(ct) { @@ -828,7 +828,7 @@ impl<'a> IdmServerAuthTransaction<'a> { // Account must be anon, so we can gen the uat. Ok(Some(LdapBoundToken { - uuid: *UUID_ANONYMOUS, + uuid: UUID_ANONYMOUS, effective_uat: account .to_userauthtoken(tracing_id, ct, AuthType::Anonymous) .ok_or(OperationError::InvalidState) diff --git a/kanidmd/src/lib/idm/unix.rs b/kanidmd/src/lib/idm/unix.rs index df79af921..fcdca0db9 100644 --- a/kanidmd/src/lib/idm/unix.rs +++ b/kanidmd/src/lib/idm/unix.rs @@ -172,7 +172,7 @@ impl UnixUserAccount { } pub fn is_anonymous(&self) -> bool { - self.uuid == *UUID_ANONYMOUS + self.uuid == UUID_ANONYMOUS } pub(crate) fn gen_password_mod( diff --git a/kanidmd/src/lib/ldap.rs b/kanidmd/src/lib/ldap.rs index 91a2cc8ea..e75d854fd 100644 --- a/kanidmd/src/lib/ldap.rs +++ b/kanidmd/src/lib/ldap.rs @@ -344,7 +344,7 @@ impl LdapServer { let target_uuid: Uuid = if dn.is_empty() { if pw.is_empty() { security_info!("✅ LDAP Bind success anonymous"); - *UUID_ANONYMOUS + UUID_ANONYMOUS } else { security_info!("❌ LDAP Bind failure anonymous"); // Yeah-nahhhhh @@ -567,7 +567,7 @@ mod tests { let anon_t = task::block_on(ldaps.do_bind(idms, "", "")) .unwrap() .unwrap(); - assert!(anon_t.uuid == *UUID_ANONYMOUS); + assert!(anon_t.uuid == UUID_ANONYMOUS); assert!(task::block_on(ldaps.do_bind(idms, "", "test")) .unwrap() .is_none()); @@ -746,7 +746,7 @@ mod tests { let anon_t = task::block_on(ldaps.do_bind(idms, "", "")) .unwrap() .unwrap(); - assert!(anon_t.uuid == *UUID_ANONYMOUS); + assert!(anon_t.uuid == UUID_ANONYMOUS); // Check that when we request *, we get default list. let sr = SearchRequest { diff --git a/kanidmd/src/lib/plugins/base.rs b/kanidmd/src/lib/plugins/base.rs index 79742d0b6..4d6381cce 100644 --- a/kanidmd/src/lib/plugins/base.rs +++ b/kanidmd/src/lib/plugins/base.rs @@ -96,10 +96,11 @@ impl Plugin for Base { } } + //? [Quinn] Now that we have raw UUID constants, can we fix improve this part?? // Setup UUIDS because lazy_static can't create a type valid for range. let uuid_admin = *UUID_ADMIN; - let uuid_anonymous = *UUID_ANONYMOUS; - let uuid_does_not_exist = *UUID_DOES_NOT_EXIST; + let uuid_anonymous = UUID_ANONYMOUS; + let uuid_does_not_exist = UUID_DOES_NOT_EXIST; // Check that the system-protected range is not in the cand_uuid, unless we are // an internal operation. diff --git a/kanidmd/src/lib/plugins/refint.rs b/kanidmd/src/lib/plugins/refint.rs index 11be49481..5d6ce2363 100644 --- a/kanidmd/src/lib/plugins/refint.rs +++ b/kanidmd/src/lib/plugins/refint.rs @@ -479,7 +479,7 @@ mod tests { ), Modify::Present( AttrString::from("member"), - Value::new_refer(*UUID_DOES_NOT_EXIST) + Value::new_refer(UUID_DOES_NOT_EXIST) ), ]), None, diff --git a/kanidmd/src/lib/schema.rs b/kanidmd/src/lib/schema.rs index 03e6f01bd..9e701e0da 100644 --- a/kanidmd/src/lib/schema.rs +++ b/kanidmd/src/lib/schema.rs @@ -540,7 +540,7 @@ impl<'a> SchemaWriteTransaction<'a> { AttrString::from("class"), SchemaAttribute { name: AttrString::from("class"), - uuid: *UUID_SCHEMA_ATTR_CLASS, + uuid: UUID_SCHEMA_ATTR_CLASS, description: String::from("The set of classes defining an object"), multivalue: true, unique: false, @@ -553,7 +553,7 @@ impl<'a> SchemaWriteTransaction<'a> { AttrString::from("uuid"), SchemaAttribute { name: AttrString::from("uuid"), - uuid: *UUID_SCHEMA_ATTR_UUID, + uuid: UUID_SCHEMA_ATTR_UUID, description: String::from("The universal unique id of the object"), multivalue: false, // Uniqueness is handled by base.rs, not attrunique here due to @@ -568,7 +568,7 @@ impl<'a> SchemaWriteTransaction<'a> { AttrString::from("last_modified_cid"), SchemaAttribute { name: AttrString::from("last_modified_cid"), - uuid: *UUID_SCHEMA_ATTR_LAST_MOD_CID, + uuid: UUID_SCHEMA_ATTR_LAST_MOD_CID, description: String::from("The cid of the last change to this object"), multivalue: false, // Uniqueness is handled by base.rs, not attrunique here due to @@ -583,7 +583,7 @@ impl<'a> SchemaWriteTransaction<'a> { AttrString::from("name"), SchemaAttribute { name: AttrString::from("name"), - uuid: *UUID_SCHEMA_ATTR_NAME, + uuid: UUID_SCHEMA_ATTR_NAME, description: String::from("The shortform name of an object"), multivalue: false, unique: true, @@ -596,7 +596,7 @@ impl<'a> SchemaWriteTransaction<'a> { AttrString::from("spn"), SchemaAttribute { name: AttrString::from("spn"), - uuid: *UUID_SCHEMA_ATTR_SPN, + uuid: UUID_SCHEMA_ATTR_SPN, description: String::from( "The Security Principal Name of an object, unique across all domain trusts", ), @@ -611,7 +611,7 @@ impl<'a> SchemaWriteTransaction<'a> { AttrString::from("attributename"), SchemaAttribute { name: AttrString::from("attributename"), - uuid: *UUID_SCHEMA_ATTR_ATTRIBUTENAME, + uuid: UUID_SCHEMA_ATTR_ATTRIBUTENAME, description: String::from("The name of a schema attribute"), multivalue: false, unique: true, @@ -624,7 +624,7 @@ impl<'a> SchemaWriteTransaction<'a> { AttrString::from("classname"), SchemaAttribute { name: AttrString::from("classname"), - uuid: *UUID_SCHEMA_ATTR_CLASSNAME, + uuid: UUID_SCHEMA_ATTR_CLASSNAME, description: String::from("The name of a schema class"), multivalue: false, unique: true, @@ -637,7 +637,7 @@ impl<'a> SchemaWriteTransaction<'a> { AttrString::from("description"), SchemaAttribute { name: AttrString::from("description"), - uuid: *UUID_SCHEMA_ATTR_DESCRIPTION, + uuid: UUID_SCHEMA_ATTR_DESCRIPTION, description: String::from("A description of an attribute, object or class"), multivalue: false, unique: false, @@ -648,7 +648,7 @@ impl<'a> SchemaWriteTransaction<'a> { ); self.attributes.insert(AttrString::from("multivalue"), SchemaAttribute { name: AttrString::from("multivalue"), - uuid: *UUID_SCHEMA_ATTR_MULTIVALUE, + uuid: UUID_SCHEMA_ATTR_MULTIVALUE, description: String::from("If true, this attribute is able to store multiple values rather than just a single value."), multivalue: false, unique: false, @@ -658,7 +658,7 @@ impl<'a> SchemaWriteTransaction<'a> { }); self.attributes.insert(AttrString::from("phantom"), SchemaAttribute { name: AttrString::from("phantom"), - uuid: *UUID_SCHEMA_ATTR_PHANTOM, + uuid: UUID_SCHEMA_ATTR_PHANTOM, description: String::from("If true, this attribute must NOT be present in any may/must sets of a class as. This represents generated attributes."), multivalue: false, unique: false, @@ -668,7 +668,7 @@ impl<'a> SchemaWriteTransaction<'a> { }); self.attributes.insert(AttrString::from("unique"), SchemaAttribute { name: AttrString::from("unique"), - uuid: *UUID_SCHEMA_ATTR_UNIQUE, + uuid: UUID_SCHEMA_ATTR_UNIQUE, description: String::from("If true, this attribute must store a unique value through out the database."), multivalue: false, unique: false, @@ -680,7 +680,7 @@ impl<'a> SchemaWriteTransaction<'a> { AttrString::from("index"), SchemaAttribute { name: AttrString::from("index"), - uuid: *UUID_SCHEMA_ATTR_INDEX, + uuid: UUID_SCHEMA_ATTR_INDEX, description: String::from( "Describe the indexes to apply to instances of this attribute.", ), @@ -695,7 +695,7 @@ impl<'a> SchemaWriteTransaction<'a> { AttrString::from("syntax"), SchemaAttribute { name: AttrString::from("syntax"), - uuid: *UUID_SCHEMA_ATTR_SYNTAX, + uuid: UUID_SCHEMA_ATTR_SYNTAX, description: String::from( "Describe the syntax of this attribute. This affects indexing and sorting.", ), @@ -710,7 +710,7 @@ impl<'a> SchemaWriteTransaction<'a> { AttrString::from("systemmay"), SchemaAttribute { name: AttrString::from("systemmay"), - uuid: *UUID_SCHEMA_ATTR_SYSTEMMAY, + uuid: UUID_SCHEMA_ATTR_SYSTEMMAY, description: String::from( "A list of system provided optional attributes this class can store.", ), @@ -725,7 +725,7 @@ impl<'a> SchemaWriteTransaction<'a> { AttrString::from("may"), SchemaAttribute { name: AttrString::from("may"), - uuid: *UUID_SCHEMA_ATTR_MAY, + uuid: UUID_SCHEMA_ATTR_MAY, description: String::from( "A user modifiable list of optional attributes this class can store.", ), @@ -740,7 +740,7 @@ impl<'a> SchemaWriteTransaction<'a> { AttrString::from("systemmust"), SchemaAttribute { name: AttrString::from("systemmust"), - uuid: *UUID_SCHEMA_ATTR_SYSTEMMUST, + uuid: UUID_SCHEMA_ATTR_SYSTEMMUST, description: String::from( "A list of system provided required attributes this class must store.", ), @@ -755,7 +755,7 @@ impl<'a> SchemaWriteTransaction<'a> { AttrString::from("must"), SchemaAttribute { name: AttrString::from("must"), - uuid: *UUID_SCHEMA_ATTR_MUST, + uuid: UUID_SCHEMA_ATTR_MUST, description: String::from( "A user modifiable list of required attributes this class must store.", ), @@ -772,7 +772,7 @@ impl<'a> SchemaWriteTransaction<'a> { AttrString::from("acp_enable"), SchemaAttribute { name: AttrString::from("acp_enable"), - uuid: *UUID_SCHEMA_ATTR_ACP_ENABLE, + uuid: UUID_SCHEMA_ATTR_ACP_ENABLE, description: String::from("A flag to determine if this ACP is active for application. True is enabled, and enforce. False is checked but not enforced."), multivalue: false, unique: false, @@ -786,7 +786,7 @@ impl<'a> SchemaWriteTransaction<'a> { AttrString::from("acp_receiver"), SchemaAttribute { name: AttrString::from("acp_receiver"), - uuid: *UUID_SCHEMA_ATTR_ACP_RECEIVER, + uuid: UUID_SCHEMA_ATTR_ACP_RECEIVER, description: String::from( "Who the ACP applies to, constraining or allowing operations.", ), @@ -801,7 +801,7 @@ impl<'a> SchemaWriteTransaction<'a> { AttrString::from("acp_targetscope"), SchemaAttribute { name: AttrString::from("acp_targetscope"), - uuid: *UUID_SCHEMA_ATTR_ACP_TARGETSCOPE, + uuid: UUID_SCHEMA_ATTR_ACP_TARGETSCOPE, description: String::from( "The effective targets of the ACP, IE what will be acted upon.", ), @@ -816,7 +816,7 @@ impl<'a> SchemaWriteTransaction<'a> { AttrString::from("acp_search_attr"), SchemaAttribute { name: AttrString::from("acp_search_attr"), - uuid: *UUID_SCHEMA_ATTR_ACP_SEARCH_ATTR, + uuid: UUID_SCHEMA_ATTR_ACP_SEARCH_ATTR, description: String::from("The attributes that may be viewed or searched by the reciever on targetscope."), multivalue: true, unique: false, @@ -829,7 +829,7 @@ impl<'a> SchemaWriteTransaction<'a> { AttrString::from("acp_create_class"), SchemaAttribute { name: AttrString::from("acp_create_class"), - uuid: *UUID_SCHEMA_ATTR_ACP_CREATE_CLASS, + uuid: UUID_SCHEMA_ATTR_ACP_CREATE_CLASS, description: String::from( "The set of classes that can be created on a new entry.", ), @@ -844,7 +844,7 @@ impl<'a> SchemaWriteTransaction<'a> { AttrString::from("acp_create_attr"), SchemaAttribute { name: AttrString::from("acp_create_attr"), - uuid: *UUID_SCHEMA_ATTR_ACP_CREATE_ATTR, + uuid: UUID_SCHEMA_ATTR_ACP_CREATE_ATTR, description: String::from( "The set of attribute types that can be created on an entry.", ), @@ -860,7 +860,7 @@ impl<'a> SchemaWriteTransaction<'a> { AttrString::from("acp_modify_removedattr"), SchemaAttribute { name: AttrString::from("acp_modify_removedattr"), - uuid: *UUID_SCHEMA_ATTR_ACP_MODIFY_REMOVEDATTR, + uuid: UUID_SCHEMA_ATTR_ACP_MODIFY_REMOVEDATTR, description: String::from("The set of attribute types that could be removed or purged in a modification."), multivalue: true, unique: false, @@ -873,7 +873,7 @@ impl<'a> SchemaWriteTransaction<'a> { AttrString::from("acp_modify_presentattr"), SchemaAttribute { name: AttrString::from("acp_modify_presentattr"), - uuid: *UUID_SCHEMA_ATTR_ACP_MODIFY_PRESENTATTR, + uuid: UUID_SCHEMA_ATTR_ACP_MODIFY_PRESENTATTR, description: String::from("The set of attribute types that could be added or asserted in a modification."), multivalue: true, unique: false, @@ -886,7 +886,7 @@ impl<'a> SchemaWriteTransaction<'a> { AttrString::from("acp_modify_class"), SchemaAttribute { name: AttrString::from("acp_modify_class"), - uuid: *UUID_SCHEMA_ATTR_ACP_MODIFY_CLASS, + uuid: UUID_SCHEMA_ATTR_ACP_MODIFY_CLASS, description: String::from("The set of class values that could be asserted or added to an entry. Only applies to modify::present operations on class."), multivalue: true, unique: false, @@ -900,7 +900,7 @@ impl<'a> SchemaWriteTransaction<'a> { AttrString::from("memberof"), SchemaAttribute { name: AttrString::from("memberof"), - uuid: *UUID_SCHEMA_ATTR_MEMBEROF, + uuid: UUID_SCHEMA_ATTR_MEMBEROF, description: String::from("reverse group membership of the object"), multivalue: true, unique: false, @@ -913,7 +913,7 @@ impl<'a> SchemaWriteTransaction<'a> { AttrString::from("directmemberof"), SchemaAttribute { name: AttrString::from("directmemberof"), - uuid: *UUID_SCHEMA_ATTR_DIRECTMEMBEROF, + uuid: UUID_SCHEMA_ATTR_DIRECTMEMBEROF, description: String::from("reverse direct group membership of the object"), multivalue: true, unique: false, @@ -926,7 +926,7 @@ impl<'a> SchemaWriteTransaction<'a> { AttrString::from("member"), SchemaAttribute { name: AttrString::from("member"), - uuid: *UUID_SCHEMA_ATTR_MEMBER, + uuid: UUID_SCHEMA_ATTR_MEMBER, description: String::from("List of members of the group"), multivalue: true, unique: false, @@ -940,7 +940,7 @@ impl<'a> SchemaWriteTransaction<'a> { AttrString::from("version"), SchemaAttribute { name: AttrString::from("version"), - uuid: *UUID_SCHEMA_ATTR_VERSION, + uuid: UUID_SCHEMA_ATTR_VERSION, description: String::from( "The systems internal migration version for provided objects", ), @@ -956,7 +956,7 @@ impl<'a> SchemaWriteTransaction<'a> { AttrString::from("domain"), SchemaAttribute { name: AttrString::from("domain"), - uuid: *UUID_SCHEMA_ATTR_DOMAIN, + uuid: UUID_SCHEMA_ATTR_DOMAIN, description: String::from("A DNS Domain name entry."), multivalue: true, unique: false, @@ -969,7 +969,7 @@ impl<'a> SchemaWriteTransaction<'a> { AttrString::from("claim"), SchemaAttribute { name: AttrString::from("claim"), - uuid: *UUID_SCHEMA_ATTR_CLAIM, + uuid: UUID_SCHEMA_ATTR_CLAIM, description: String::from( "The string identifier of an extracted claim that can be filtered", ), @@ -984,7 +984,7 @@ impl<'a> SchemaWriteTransaction<'a> { AttrString::from("password_import"), SchemaAttribute { name: AttrString::from("password_import"), - uuid: *UUID_SCHEMA_ATTR_PASSWORD_IMPORT, + uuid: UUID_SCHEMA_ATTR_PASSWORD_IMPORT, description: String::from("An imported password hash from an external system."), multivalue: true, unique: false, @@ -999,7 +999,7 @@ impl<'a> SchemaWriteTransaction<'a> { AttrString::from("dn"), SchemaAttribute { name: AttrString::from("dn"), - uuid: *UUID_SCHEMA_ATTR_DN, + uuid: UUID_SCHEMA_ATTR_DN, description: String::from("An LDAP Compatible DN"), multivalue: false, unique: false, @@ -1012,7 +1012,7 @@ impl<'a> SchemaWriteTransaction<'a> { AttrString::from("entrydn"), SchemaAttribute { name: AttrString::from("entrydn"), - uuid: *UUID_SCHEMA_ATTR_ENTRYDN, + uuid: UUID_SCHEMA_ATTR_ENTRYDN, description: String::from("An LDAP Compatible EntryDN"), multivalue: false, unique: false, @@ -1025,7 +1025,7 @@ impl<'a> SchemaWriteTransaction<'a> { AttrString::from("entryuuid"), SchemaAttribute { name: AttrString::from("entryuuid"), - uuid: *UUID_SCHEMA_ATTR_ENTRYUUID, + uuid: UUID_SCHEMA_ATTR_ENTRYUUID, description: String::from("An LDAP Compatible entryUUID"), multivalue: false, unique: false, @@ -1038,7 +1038,7 @@ impl<'a> SchemaWriteTransaction<'a> { AttrString::from("objectclass"), SchemaAttribute { name: AttrString::from("objectclass"), - uuid: *UUID_SCHEMA_ATTR_OBJECTCLASS, + uuid: UUID_SCHEMA_ATTR_OBJECTCLASS, description: String::from("An LDAP Compatible objectClass"), multivalue: true, unique: false, @@ -1051,7 +1051,7 @@ impl<'a> SchemaWriteTransaction<'a> { AttrString::from("cn"), SchemaAttribute { name: AttrString::from("cn"), - uuid: *UUID_SCHEMA_ATTR_CN, + uuid: UUID_SCHEMA_ATTR_CN, description: String::from("An LDAP Compatible objectClass"), multivalue: false, unique: false, @@ -1064,7 +1064,7 @@ impl<'a> SchemaWriteTransaction<'a> { AttrString::from("keys"), SchemaAttribute { name: AttrString::from("keys"), - uuid: *UUID_SCHEMA_ATTR_KEYS, + uuid: UUID_SCHEMA_ATTR_KEYS, description: String::from("An LDAP Compatible keys (ssh)"), multivalue: true, unique: false, @@ -1077,7 +1077,7 @@ impl<'a> SchemaWriteTransaction<'a> { AttrString::from("sshpublickey"), SchemaAttribute { name: AttrString::from("sshpublickey"), - uuid: *UUID_SCHEMA_ATTR_SSHPUBLICKEY, + uuid: UUID_SCHEMA_ATTR_SSHPUBLICKEY, description: String::from("An LDAP Compatible sshPublicKey"), multivalue: true, unique: false, @@ -1090,7 +1090,7 @@ impl<'a> SchemaWriteTransaction<'a> { AttrString::from("email"), SchemaAttribute { name: AttrString::from("email"), - uuid: *UUID_SCHEMA_ATTR_EMAIL, + uuid: UUID_SCHEMA_ATTR_EMAIL, description: String::from("An LDAP Compatible email"), multivalue: true, unique: false, @@ -1103,7 +1103,7 @@ impl<'a> SchemaWriteTransaction<'a> { AttrString::from("emailaddress"), SchemaAttribute { name: AttrString::from("emailaddress"), - uuid: *UUID_SCHEMA_ATTR_EMAILADDRESS, + uuid: UUID_SCHEMA_ATTR_EMAILADDRESS, description: String::from("An LDAP Compatible emailAddress"), multivalue: true, unique: false, @@ -1116,7 +1116,7 @@ impl<'a> SchemaWriteTransaction<'a> { AttrString::from("uidnumber"), SchemaAttribute { name: AttrString::from("uidnumber"), - uuid: *UUID_SCHEMA_ATTR_UIDNUMBER, + uuid: UUID_SCHEMA_ATTR_UIDNUMBER, description: String::from("An LDAP Compatible uidNumber"), multivalue: false, unique: false, @@ -1131,7 +1131,7 @@ impl<'a> SchemaWriteTransaction<'a> { AttrString::from("attributetype"), SchemaClass { name: AttrString::from("attributetype"), - uuid: *UUID_SCHEMA_CLASS_ATTRIBUTETYPE, + uuid: UUID_SCHEMA_CLASS_ATTRIBUTETYPE, description: String::from("Definition of a schema attribute"), systemmay: vec![AttrString::from("phantom"), AttrString::from("index")], may: vec![], @@ -1150,7 +1150,7 @@ impl<'a> SchemaWriteTransaction<'a> { AttrString::from("classtype"), SchemaClass { name: AttrString::from("classtype"), - uuid: *UUID_SCHEMA_CLASS_CLASSTYPE, + uuid: UUID_SCHEMA_CLASS_CLASSTYPE, description: String::from("Definition of a schema classtype"), systemmay: vec![ AttrString::from("systemmay"), @@ -1171,7 +1171,7 @@ impl<'a> SchemaWriteTransaction<'a> { AttrString::from("object"), SchemaClass { name: AttrString::from("object"), - uuid: *UUID_SCHEMA_CLASS_OBJECT, + uuid: UUID_SCHEMA_CLASS_OBJECT, description: String::from( "A system created class that all objects must contain", ), @@ -1189,7 +1189,7 @@ impl<'a> SchemaWriteTransaction<'a> { AttrString::from("memberof"), SchemaClass { name: AttrString::from("memberof"), - uuid: *UUID_SCHEMA_CLASS_MEMBEROF, + uuid: UUID_SCHEMA_CLASS_MEMBEROF, description: String::from("Class that is dynamically added to recepients of memberof or directmemberof"), systemmay: vec![ AttrString::from("memberof"), @@ -1204,7 +1204,7 @@ impl<'a> SchemaWriteTransaction<'a> { AttrString::from("extensibleobject"), SchemaClass { name: AttrString::from("extensibleobject"), - uuid: *UUID_SCHEMA_CLASS_EXTENSIBLEOBJECT, + uuid: UUID_SCHEMA_CLASS_EXTENSIBLEOBJECT, description: String::from( "A class type that has green hair and turns off all rules ...", ), @@ -1219,7 +1219,7 @@ impl<'a> SchemaWriteTransaction<'a> { AttrString::from("recycled"), SchemaClass { name: AttrString::from("recycled"), - uuid: *UUID_SCHEMA_CLASS_RECYCLED, + uuid: UUID_SCHEMA_CLASS_RECYCLED, description: String::from("An object that has been deleted, but still recoverable via the revive operation. Recycled objects are not modifiable, only revivable."), systemmay: vec![], may: vec![], @@ -1231,7 +1231,7 @@ impl<'a> SchemaWriteTransaction<'a> { AttrString::from("tombstone"), SchemaClass { name: AttrString::from("tombstone"), - uuid: *UUID_SCHEMA_CLASS_TOMBSTONE, + uuid: UUID_SCHEMA_CLASS_TOMBSTONE, description: String::from("An object that is purged from the recycle bin. This is a system internal state. Tombstones have no attributes beside UUID."), systemmay: vec![], may: vec![], @@ -1247,7 +1247,7 @@ impl<'a> SchemaWriteTransaction<'a> { AttrString::from("system_info"), SchemaClass { name: AttrString::from("system_info"), - uuid: *UUID_SCHEMA_CLASS_SYSTEM_INFO, + uuid: UUID_SCHEMA_CLASS_SYSTEM_INFO, description: String::from("System metadata object class"), systemmay: vec![], may: vec![], @@ -1265,7 +1265,7 @@ impl<'a> SchemaWriteTransaction<'a> { AttrString::from("access_control_profile"), SchemaClass { name: AttrString::from("access_control_profile"), - uuid: *UUID_SCHEMA_CLASS_ACCESS_CONTROL_PROFILE, + uuid: UUID_SCHEMA_CLASS_ACCESS_CONTROL_PROFILE, description: String::from("System Access Control Profile Class"), systemmay: vec![ AttrString::from("acp_enable"), @@ -1284,7 +1284,7 @@ impl<'a> SchemaWriteTransaction<'a> { AttrString::from("access_control_search"), SchemaClass { name: AttrString::from("access_control_search"), - uuid: *UUID_SCHEMA_CLASS_ACCESS_CONTROL_SEARCH, + uuid: UUID_SCHEMA_CLASS_ACCESS_CONTROL_SEARCH, description: String::from("System Access Control Search Class"), systemmay: vec![], may: vec![], @@ -1296,7 +1296,7 @@ impl<'a> SchemaWriteTransaction<'a> { AttrString::from("access_control_delete"), SchemaClass { name: AttrString::from("access_control_delete"), - uuid: *UUID_SCHEMA_CLASS_ACCESS_CONTROL_DELETE, + uuid: UUID_SCHEMA_CLASS_ACCESS_CONTROL_DELETE, description: String::from("System Access Control DELETE Class"), systemmay: vec![], may: vec![], @@ -1308,7 +1308,7 @@ impl<'a> SchemaWriteTransaction<'a> { AttrString::from("access_control_modify"), SchemaClass { name: AttrString::from("access_control_modify"), - uuid: *UUID_SCHEMA_CLASS_ACCESS_CONTROL_MODIFY, + uuid: UUID_SCHEMA_CLASS_ACCESS_CONTROL_MODIFY, description: String::from("System Access Control Modify Class"), systemmay: vec![ AttrString::from("acp_modify_removedattr"), @@ -1324,7 +1324,7 @@ impl<'a> SchemaWriteTransaction<'a> { AttrString::from("access_control_create"), SchemaClass { name: AttrString::from("access_control_create"), - uuid: *UUID_SCHEMA_CLASS_ACCESS_CONTROL_CREATE, + uuid: UUID_SCHEMA_CLASS_ACCESS_CONTROL_CREATE, description: String::from("System Access Control Create Class"), systemmay: vec![ AttrString::from("acp_create_class"), @@ -1339,7 +1339,7 @@ impl<'a> SchemaWriteTransaction<'a> { AttrString::from("system"), SchemaClass { name: AttrString::from("system"), - uuid: *UUID_SCHEMA_CLASS_SYSTEM, + uuid: UUID_SCHEMA_CLASS_SYSTEM, description: String::from("A class denoting that a type is system generated and protected. It has special internal behaviour."), systemmay: vec![], may: vec![], diff --git a/kanidmd/src/lib/server.rs b/kanidmd/src/lib/server.rs index 11cd974b4..19dfc618f 100644 --- a/kanidmd/src/lib/server.rs +++ b/kanidmd/src/lib/server.rs @@ -480,7 +480,7 @@ pub trait QueryServerTransaction<'a> { // all subsequent filter tests because it ... well, doesn't exist. let un = self .name_to_uuid( value) - .unwrap_or_else(|_| *UUID_DOES_NOT_EXIST); + .unwrap_or_else(|_| UUID_DOES_NOT_EXIST); Some(Value::new_uuid(un)) }) // I think this is unreachable due to how the .or_else works. @@ -492,7 +492,7 @@ pub trait QueryServerTransaction<'a> { .or_else(|| { let un = self .name_to_uuid( value) - .unwrap_or_else(|_| *UUID_DOES_NOT_EXIST); + .unwrap_or_else(|_| UUID_DOES_NOT_EXIST); Some(Value::new_refer(un)) }) // I think this is unreachable due to how the .or_else works. @@ -554,7 +554,7 @@ pub trait QueryServerTransaction<'a> { // all subsequent filter tests because it ... well, doesn't exist. let un = self .name_to_uuid(value) - .unwrap_or_else(|_| *UUID_DOES_NOT_EXIST); + .unwrap_or_else(|_| UUID_DOES_NOT_EXIST); Some(PartialValue::new_uuid(un)) }) // I think this is unreachable due to how the .or_else works. @@ -580,7 +580,7 @@ pub trait QueryServerTransaction<'a> { .or_else(|| { let un = self .name_to_uuid(value) - .unwrap_or_else(|_| *UUID_DOES_NOT_EXIST); + .unwrap_or_else(|_| UUID_DOES_NOT_EXIST); Some(PartialValue::new_refer(un)) }) // I think this is unreachable due to how the .or_else works. @@ -597,7 +597,7 @@ pub trait QueryServerTransaction<'a> { .or_else(|| { let un = self .name_to_uuid(value) - .unwrap_or_else(|_| *UUID_DOES_NOT_EXIST); + .unwrap_or_else(|_| UUID_DOES_NOT_EXIST); Some(PartialValue::new_oauthscopemap(un)) }) // I think this is unreachable due to how the .or_else works.