2019-08-27 01:36:54 +02:00
|
|
|
use uuid::Uuid;
|
|
|
|
|
2019-07-12 07:28:46 +02:00
|
|
|
// On test builds, define to 60 seconds
|
|
|
|
#[cfg(test)]
|
|
|
|
pub static PURGE_TIMEOUT: u64 = 60;
|
|
|
|
// For production, 1 hour.
|
|
|
|
#[cfg(not(test))]
|
2019-02-22 07:15:48 +01:00
|
|
|
pub static PURGE_TIMEOUT: u64 = 3600;
|
2019-09-06 05:04:58 +02:00
|
|
|
// 5 minute auth session window.
|
|
|
|
pub static AUTH_SESSION_TIMEOUT: u64 = 300;
|
2019-02-22 07:15:48 +01:00
|
|
|
|
2019-08-27 01:36:54 +02:00
|
|
|
pub static STR_UUID_ADMIN: &'static str = "00000000-0000-0000-0000-000000000000";
|
|
|
|
pub static STR_UUID_ANONYMOUS: &'static str = "00000000-0000-0000-0000-ffffffffffff";
|
|
|
|
pub static STR_UUID_DOES_NOT_EXIST: &'static str = "00000000-0000-0000-0000-fffffffffffe";
|
|
|
|
lazy_static! {
|
|
|
|
pub static ref UUID_ADMIN: Uuid = Uuid::parse_str(STR_UUID_ADMIN).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();
|
|
|
|
}
|
|
|
|
|
2019-05-24 07:11:06 +02:00
|
|
|
pub static JSON_ADMIN_V1: &'static str = r#"{
|
|
|
|
"valid": {
|
|
|
|
"uuid": "00000000-0000-0000-0000-000000000000"
|
|
|
|
},
|
|
|
|
"state": null,
|
|
|
|
"attrs": {
|
|
|
|
"class": ["account", "object"],
|
|
|
|
"name": ["admin"],
|
|
|
|
"uuid": ["00000000-0000-0000-0000-000000000000"],
|
|
|
|
"description": ["Builtin Admin account."],
|
|
|
|
"displayname": ["Administrator"]
|
|
|
|
}
|
|
|
|
}"#;
|
2019-01-20 02:40:13 +01:00
|
|
|
|
2019-06-07 11:19:09 +02:00
|
|
|
pub static _UUID_IDM_ADMINS: &'static str = "00000000-0000-0000-0000-000000000001";
|
|
|
|
pub static JSON_IDM_ADMINS_V1: &'static str = r#"{
|
|
|
|
"valid": {
|
|
|
|
"uuid": "00000000-0000-0000-0000-000000000001"
|
|
|
|
},
|
|
|
|
"state": null,
|
|
|
|
"attrs": {
|
|
|
|
"class": ["group", "object"],
|
|
|
|
"name": ["idm_admins"],
|
|
|
|
"uuid": ["00000000-0000-0000-0000-000000000001"],
|
|
|
|
"description": ["Builtin IDM Administrators Group."],
|
|
|
|
"member": ["00000000-0000-0000-0000-000000000000"]
|
|
|
|
}
|
|
|
|
}"#;
|
|
|
|
|
2019-07-12 07:28:46 +02:00
|
|
|
pub static _UUID_SYSTEM_INFO: &'static str = "00000000-0000-0000-0000-ffffff000001";
|
|
|
|
pub static JSON_SYSTEM_INFO_V1: &'static str = r#"{
|
|
|
|
"valid": {
|
|
|
|
"uuid": "00000000-0000-0000-0000-ffffff000001"
|
|
|
|
},
|
|
|
|
"state": null,
|
|
|
|
"attrs": {
|
|
|
|
"class": ["object", "system_info"],
|
|
|
|
"uuid": ["00000000-0000-0000-0000-ffffff000001"],
|
|
|
|
"description": ["System info and metadata object."],
|
|
|
|
"version": ["1"],
|
|
|
|
"domain": ["example.com"]
|
|
|
|
}
|
|
|
|
}"#;
|
|
|
|
|
2019-06-07 11:19:09 +02:00
|
|
|
pub static _UUID_IDM_ADMINS_ACP_SEARCH_V1: &'static str = "00000000-0000-0000-0000-ffffff000002";
|
|
|
|
pub static JSON_IDM_ADMINS_ACP_SEARCH_V1: &'static str = r#"{
|
|
|
|
"valid": {
|
|
|
|
"uuid": "00000000-0000-0000-0000-ffffff000002"
|
|
|
|
},
|
|
|
|
"state": null,
|
|
|
|
"attrs": {
|
|
|
|
"class": ["object", "access_control_profile", "access_control_search"],
|
|
|
|
"name": ["idm_admins_acp_search"],
|
|
|
|
"uuid": ["00000000-0000-0000-0000-ffffff000002"],
|
|
|
|
"description": ["Builtin IDM Administrators Access Controls."],
|
|
|
|
"acp_enable": ["true"],
|
|
|
|
"acp_receiver": [
|
|
|
|
"{\"Eq\":[\"memberof\",\"00000000-0000-0000-0000-000000000001\"]}"
|
|
|
|
],
|
|
|
|
"acp_targetscope": [
|
|
|
|
"{\"Pres\":\"class\"}"
|
|
|
|
],
|
|
|
|
"acp_search_attr": ["name", "class", "uuid"]
|
|
|
|
}
|
|
|
|
}"#;
|
|
|
|
|
|
|
|
pub static _UUID_IDM_ADMINS_ACP_REVIVE_V1: &'static str = "00000000-0000-0000-0000-ffffff000003";
|
|
|
|
pub static JSON_IDM_ADMINS_ACP_REVIVE_V1: &'static str = r#"{
|
|
|
|
"valid": {
|
|
|
|
"uuid": "00000000-0000-0000-0000-ffffff000003"
|
|
|
|
},
|
|
|
|
"state": null,
|
|
|
|
"attrs": {
|
|
|
|
"class": ["object", "access_control_profile", "access_control_modify"],
|
|
|
|
"name": ["idm_admins_acp_revive"],
|
|
|
|
"uuid": ["00000000-0000-0000-0000-ffffff000003"],
|
|
|
|
"description": ["Builtin IDM Administrators Access Controls."],
|
|
|
|
"acp_enable": ["true"],
|
|
|
|
"acp_receiver": [
|
|
|
|
"{\"Eq\":[\"memberof\",\"00000000-0000-0000-0000-000000000001\"]}"
|
|
|
|
],
|
|
|
|
"acp_targetscope": [
|
|
|
|
"{\"Eq\":[\"class\",\"recycled\"]}"
|
|
|
|
],
|
|
|
|
"acp_modify_removedattr": ["class"],
|
|
|
|
"acp_modify_class": ["recycled"]
|
|
|
|
}
|
|
|
|
}"#;
|
|
|
|
|
2019-07-12 07:28:46 +02:00
|
|
|
pub static _UUID_IDM_SELF_ACP_READ_V1: &'static str = "00000000-0000-0000-0000-ffffff000004";
|
|
|
|
pub static JSON_IDM_SELF_ACP_READ_V1: &'static str = r#"{
|
2019-05-15 02:36:18 +02:00
|
|
|
"valid": {
|
2019-07-12 07:28:46 +02:00
|
|
|
"uuid": "00000000-0000-0000-0000-ffffff000004"
|
2019-05-15 02:36:18 +02:00
|
|
|
},
|
2019-01-29 07:52:42 +01:00
|
|
|
"state": null,
|
2019-01-20 02:40:13 +01:00
|
|
|
"attrs": {
|
2019-07-12 07:28:46 +02:00
|
|
|
"class": ["object", "access_control_profile", "access_control_search"],
|
|
|
|
"name": ["idm_self_acp_read"],
|
|
|
|
"uuid": ["00000000-0000-0000-0000-ffffff000004"],
|
|
|
|
"description": ["Builtin IDM Control for self read - required for whoami."],
|
|
|
|
"acp_enable": ["true"],
|
|
|
|
"acp_receiver": [
|
|
|
|
"\"Self\""
|
|
|
|
],
|
|
|
|
"acp_targetscope": [
|
|
|
|
"\"Self\""
|
|
|
|
],
|
|
|
|
"acp_search_attr": ["name", "uuid"]
|
2019-01-20 02:40:13 +01:00
|
|
|
}
|
|
|
|
}"#;
|
|
|
|
|
2019-07-12 07:28:46 +02:00
|
|
|
pub static JSON_ANONYMOUS_V1: &'static str = r#"{
|
2019-05-15 02:36:18 +02:00
|
|
|
"valid": {
|
2019-07-12 07:28:46 +02:00
|
|
|
"uuid": "00000000-0000-0000-0000-ffffffffffff"
|
2019-05-15 02:36:18 +02:00
|
|
|
},
|
2019-01-29 07:52:42 +01:00
|
|
|
"state": null,
|
2019-01-20 02:40:13 +01:00
|
|
|
"attrs": {
|
2019-07-12 07:28:46 +02:00
|
|
|
"class": ["account", "object"],
|
|
|
|
"name": ["anonymous"],
|
|
|
|
"uuid": ["00000000-0000-0000-0000-ffffffffffff"],
|
|
|
|
"description": ["Anonymous access account."],
|
|
|
|
"displayname": ["Anonymous"]
|
2019-01-20 02:40:13 +01:00
|
|
|
}
|
|
|
|
}"#;
|
2018-12-30 03:17:09 +01:00
|
|
|
|
|
|
|
// Core
|
2019-07-27 14:35:44 +02:00
|
|
|
// Schema uuids start at 00000000-0000-0000-0000-ffff00000000
|
2019-07-28 13:18:25 +02:00
|
|
|
pub static UUID_SCHEMA_ATTR_CLASS: &'static str = "00000000-0000-0000-0000-ffff00000000";
|
|
|
|
pub static UUID_SCHEMA_ATTR_UUID: &'static str = "00000000-0000-0000-0000-ffff00000001";
|
|
|
|
pub static UUID_SCHEMA_ATTR_NAME: &'static str = "00000000-0000-0000-0000-ffff00000002";
|
2019-09-08 12:26:35 +02:00
|
|
|
pub static UUID_SCHEMA_ATTR_ATTRIBUTENAME: &'static str = "00000000-0000-0000-0000-ffff00000048";
|
|
|
|
pub static UUID_SCHEMA_ATTR_CLASSNAME: &'static str = "00000000-0000-0000-0000-ffff00000049";
|
2019-07-28 13:18:25 +02:00
|
|
|
pub static UUID_SCHEMA_ATTR_PRINCIPAL_NAME: &'static str = "00000000-0000-0000-0000-ffff00000003";
|
|
|
|
pub static UUID_SCHEMA_ATTR_DESCRIPTION: &'static str = "00000000-0000-0000-0000-ffff00000004";
|
|
|
|
pub static UUID_SCHEMA_ATTR_MULTIVALUE: &'static str = "00000000-0000-0000-0000-ffff00000005";
|
2019-09-08 12:26:35 +02:00
|
|
|
pub static UUID_SCHEMA_ATTR_UNIQUE: &'static str = "00000000-0000-0000-0000-ffff00000047";
|
2019-07-28 13:18:25 +02:00
|
|
|
pub static UUID_SCHEMA_ATTR_INDEX: &'static str = "00000000-0000-0000-0000-ffff00000006";
|
|
|
|
pub static UUID_SCHEMA_ATTR_SYNTAX: &'static str = "00000000-0000-0000-0000-ffff00000007";
|
|
|
|
pub static UUID_SCHEMA_ATTR_SYSTEMMAY: &'static str = "00000000-0000-0000-0000-ffff00000008";
|
|
|
|
pub static UUID_SCHEMA_ATTR_MAY: &'static str = "00000000-0000-0000-0000-ffff00000009";
|
|
|
|
pub static UUID_SCHEMA_ATTR_SYSTEMMUST: &'static str = "00000000-0000-0000-0000-ffff00000010";
|
|
|
|
pub static UUID_SCHEMA_ATTR_MUST: &'static str = "00000000-0000-0000-0000-ffff00000011";
|
|
|
|
pub static UUID_SCHEMA_ATTR_MEMBEROF: &'static str = "00000000-0000-0000-0000-ffff00000012";
|
|
|
|
pub static UUID_SCHEMA_ATTR_MEMBER: &'static str = "00000000-0000-0000-0000-ffff00000013";
|
|
|
|
pub static UUID_SCHEMA_ATTR_DIRECTMEMBEROF: &'static str = "00000000-0000-0000-0000-ffff00000014";
|
|
|
|
pub static UUID_SCHEMA_ATTR_VERSION: &'static str = "00000000-0000-0000-0000-ffff00000015";
|
|
|
|
pub static UUID_SCHEMA_ATTR_DOMAIN: &'static str = "00000000-0000-0000-0000-ffff00000016";
|
|
|
|
pub static UUID_SCHEMA_ATTR_ACP_ENABLE: &'static str = "00000000-0000-0000-0000-ffff00000017";
|
|
|
|
pub static UUID_SCHEMA_ATTR_ACP_RECEIVER: &'static str = "00000000-0000-0000-0000-ffff00000018";
|
2019-07-27 14:35:44 +02:00
|
|
|
pub static UUID_SCHEMA_ATTR_ACP_TARGETSCOPE: &'static str = "00000000-0000-0000-0000-ffff00000019";
|
|
|
|
pub static UUID_SCHEMA_ATTR_ACP_SEARCH_ATTR: &'static str = "00000000-0000-0000-0000-ffff00000020";
|
2019-07-28 13:18:25 +02:00
|
|
|
pub static UUID_SCHEMA_ATTR_ACP_CREATE_CLASS: &'static str = "00000000-0000-0000-0000-ffff00000021";
|
2019-07-27 14:35:44 +02:00
|
|
|
pub static UUID_SCHEMA_ATTR_ACP_CREATE_ATTR: &'static str = "00000000-0000-0000-0000-ffff00000022";
|
2019-05-24 07:11:06 +02:00
|
|
|
pub static UUID_SCHEMA_ATTR_ACP_MODIFY_REMOVEDATTR: &'static str =
|
2019-07-28 13:18:25 +02:00
|
|
|
"00000000-0000-0000-0000-ffff00000023";
|
2019-05-24 07:11:06 +02:00
|
|
|
pub static UUID_SCHEMA_ATTR_ACP_MODIFY_PRESENTATTR: &'static str =
|
2019-07-28 13:18:25 +02:00
|
|
|
"00000000-0000-0000-0000-ffff00000024";
|
|
|
|
pub static UUID_SCHEMA_ATTR_ACP_MODIFY_CLASS: &'static str = "00000000-0000-0000-0000-ffff00000025";
|
2018-12-30 03:17:09 +01:00
|
|
|
|
2019-07-28 13:18:25 +02:00
|
|
|
pub static UUID_SCHEMA_CLASS_ATTRIBUTETYPE: &'static str = "00000000-0000-0000-0000-ffff00000026";
|
|
|
|
pub static UUID_SCHEMA_CLASS_CLASSTYPE: &'static str = "00000000-0000-0000-0000-ffff00000027";
|
|
|
|
pub static UUID_SCHEMA_CLASS_OBJECT: &'static str = "00000000-0000-0000-0000-ffff00000028";
|
2019-07-15 08:56:55 +02:00
|
|
|
pub static UUID_SCHEMA_CLASS_EXTENSIBLEOBJECT: &'static str =
|
2019-07-28 13:18:25 +02:00
|
|
|
"00000000-0000-0000-0000-ffff00000029";
|
|
|
|
pub static UUID_SCHEMA_CLASS_MEMBEROF: &'static str = "00000000-0000-0000-0000-ffff00000030";
|
2019-07-15 08:56:55 +02:00
|
|
|
|
2019-07-28 13:18:25 +02:00
|
|
|
pub static UUID_SCHEMA_CLASS_RECYCLED: &'static str = "00000000-0000-0000-0000-ffff00000031";
|
|
|
|
pub static UUID_SCHEMA_CLASS_TOMBSTONE: &'static str = "00000000-0000-0000-0000-ffff00000032";
|
|
|
|
pub static UUID_SCHEMA_CLASS_SYSTEM_INFO: &'static str = "00000000-0000-0000-0000-ffff00000033";
|
2019-05-24 07:11:06 +02:00
|
|
|
pub static UUID_SCHEMA_CLASS_ACCESS_CONTROL_PROFILE: &'static str =
|
2019-07-28 13:18:25 +02:00
|
|
|
"00000000-0000-0000-0000-ffff00000034";
|
2019-05-24 07:11:06 +02:00
|
|
|
pub static UUID_SCHEMA_CLASS_ACCESS_CONTROL_SEARCH: &'static str =
|
2019-07-28 13:18:25 +02:00
|
|
|
"00000000-0000-0000-0000-ffff00000035";
|
2019-05-24 07:11:06 +02:00
|
|
|
pub static UUID_SCHEMA_CLASS_ACCESS_CONTROL_DELETE: &'static str =
|
2019-07-28 13:18:25 +02:00
|
|
|
"00000000-0000-0000-0000-ffff00000036";
|
2019-05-24 07:11:06 +02:00
|
|
|
pub static UUID_SCHEMA_CLASS_ACCESS_CONTROL_MODIFY: &'static str =
|
2019-07-28 13:18:25 +02:00
|
|
|
"00000000-0000-0000-0000-ffff00000037";
|
2019-05-24 07:11:06 +02:00
|
|
|
pub static UUID_SCHEMA_CLASS_ACCESS_CONTROL_CREATE: &'static str =
|
2019-07-28 13:18:25 +02:00
|
|
|
"00000000-0000-0000-0000-ffff00000038";
|
|
|
|
pub static UUID_SCHEMA_CLASS_SYSTEM: &'static str = "00000000-0000-0000-0000-ffff00000039";
|
2019-06-07 11:19:09 +02:00
|
|
|
|
2019-07-15 08:56:55 +02:00
|
|
|
// system supplementary
|
2019-07-27 14:35:44 +02:00
|
|
|
pub static UUID_SCHEMA_ATTR_DISPLAYNAME: &'static str = "00000000-0000-0000-0000-ffff00000040";
|
2019-07-15 08:56:55 +02:00
|
|
|
pub static JSON_SCHEMA_ATTR_DISPLAYNAME: &'static str = r#"{
|
|
|
|
"valid": {
|
2019-07-27 14:35:44 +02:00
|
|
|
"uuid": "00000000-0000-0000-0000-ffff00000040"
|
2019-07-15 08:56:55 +02:00
|
|
|
},
|
|
|
|
"state": null,
|
|
|
|
"attrs": {
|
|
|
|
"class": [
|
|
|
|
"object",
|
2019-07-20 04:04:38 +02:00
|
|
|
"system",
|
2019-07-15 08:56:55 +02:00
|
|
|
"attributetype"
|
|
|
|
],
|
|
|
|
"description": [
|
|
|
|
"The publicly visible display name of this person"
|
|
|
|
],
|
|
|
|
"index": [
|
|
|
|
"EQUALITY"
|
|
|
|
],
|
2019-09-08 12:26:35 +02:00
|
|
|
"unique": [
|
|
|
|
"false"
|
|
|
|
],
|
2019-07-15 08:56:55 +02:00
|
|
|
"multivalue": [
|
|
|
|
"false"
|
|
|
|
],
|
2019-09-08 12:26:35 +02:00
|
|
|
"attributename": [
|
2019-07-15 08:56:55 +02:00
|
|
|
"displayname"
|
|
|
|
],
|
|
|
|
"syntax": [
|
|
|
|
"UTF8STRING"
|
|
|
|
],
|
|
|
|
"uuid": [
|
2019-07-27 14:35:44 +02:00
|
|
|
"00000000-0000-0000-0000-ffff00000040"
|
2019-07-15 08:56:55 +02:00
|
|
|
]
|
|
|
|
}
|
|
|
|
}"#;
|
2019-07-27 14:35:44 +02:00
|
|
|
pub static UUID_SCHEMA_ATTR_MAIL: &'static str = "00000000-0000-0000-0000-ffff00000041";
|
2019-07-15 08:56:55 +02:00
|
|
|
pub static JSON_SCHEMA_ATTR_MAIL: &'static str = r#"
|
|
|
|
{
|
|
|
|
"valid": {
|
2019-07-27 14:35:44 +02:00
|
|
|
"uuid": "00000000-0000-0000-0000-ffff00000041"
|
2019-07-15 08:56:55 +02:00
|
|
|
},
|
|
|
|
"state": null,
|
|
|
|
"attrs": {
|
|
|
|
"class": [
|
|
|
|
"object",
|
2019-07-20 04:04:38 +02:00
|
|
|
"system",
|
2019-07-15 08:56:55 +02:00
|
|
|
"attributetype"
|
|
|
|
],
|
|
|
|
"description": [
|
|
|
|
"mail addresses of the object"
|
|
|
|
],
|
|
|
|
"index": [
|
|
|
|
"EQUALITY"
|
|
|
|
],
|
2019-09-08 12:26:35 +02:00
|
|
|
"unique": [
|
|
|
|
"true"
|
|
|
|
],
|
2019-07-15 08:56:55 +02:00
|
|
|
"multivalue": [
|
|
|
|
"true"
|
|
|
|
],
|
2019-09-08 12:26:35 +02:00
|
|
|
"attributename": [
|
2019-07-15 08:56:55 +02:00
|
|
|
"mail"
|
|
|
|
],
|
|
|
|
"syntax": [
|
|
|
|
"UTF8STRING"
|
|
|
|
],
|
|
|
|
"uuid": [
|
2019-07-27 14:35:44 +02:00
|
|
|
"00000000-0000-0000-0000-ffff00000041"
|
2019-07-15 08:56:55 +02:00
|
|
|
]
|
|
|
|
}
|
|
|
|
}
|
|
|
|
"#;
|
2019-07-27 14:35:44 +02:00
|
|
|
pub static UUID_SCHEMA_ATTR_SSH_PUBLICKEY: &'static str = "00000000-0000-0000-0000-ffff00000042";
|
2019-07-15 08:56:55 +02:00
|
|
|
pub static JSON_SCHEMA_ATTR_SSH_PUBLICKEY: &'static str = r#"
|
|
|
|
{
|
|
|
|
"valid": {
|
2019-07-27 14:35:44 +02:00
|
|
|
"uuid": "00000000-0000-0000-0000-ffff00000042"
|
2019-07-15 08:56:55 +02:00
|
|
|
},
|
|
|
|
"state": null,
|
|
|
|
"attrs": {
|
|
|
|
"class": [
|
|
|
|
"object",
|
2019-07-20 04:04:38 +02:00
|
|
|
"system",
|
2019-07-15 08:56:55 +02:00
|
|
|
"attributetype"
|
|
|
|
],
|
|
|
|
"description": [
|
|
|
|
"SSH public keys of the object"
|
|
|
|
],
|
|
|
|
"index": [],
|
2019-09-08 12:26:35 +02:00
|
|
|
"unique": [
|
|
|
|
"false"
|
|
|
|
],
|
2019-07-15 08:56:55 +02:00
|
|
|
"multivalue": [
|
|
|
|
"true"
|
|
|
|
],
|
2019-09-08 12:26:35 +02:00
|
|
|
"attributename": [
|
2019-07-15 08:56:55 +02:00
|
|
|
"ssh_publickey"
|
|
|
|
],
|
|
|
|
"syntax": [
|
|
|
|
"UTF8STRING"
|
|
|
|
],
|
|
|
|
"uuid": [
|
2019-07-27 14:35:44 +02:00
|
|
|
"00000000-0000-0000-0000-ffff00000042"
|
2019-07-15 08:56:55 +02:00
|
|
|
]
|
|
|
|
}
|
|
|
|
}
|
|
|
|
"#;
|
2019-09-04 03:06:37 +02:00
|
|
|
pub static UUID_SCHEMA_ATTR_PRIMARY_CREDENTIAL: &'static str =
|
|
|
|
"00000000-0000-0000-0000-ffff00000043";
|
|
|
|
pub static JSON_SCHEMA_ATTR_PRIMARY_CREDENTIAL: &'static str = r#"
|
2019-07-15 08:56:55 +02:00
|
|
|
{
|
|
|
|
"valid": {
|
2019-07-27 14:35:44 +02:00
|
|
|
"uuid": "00000000-0000-0000-0000-ffff00000043"
|
2019-07-15 08:56:55 +02:00
|
|
|
},
|
|
|
|
"state": null,
|
|
|
|
"attrs": {
|
|
|
|
"class": [
|
|
|
|
"object",
|
2019-07-20 04:04:38 +02:00
|
|
|
"system",
|
2019-07-15 08:56:55 +02:00
|
|
|
"attributetype"
|
|
|
|
],
|
|
|
|
"description": [
|
2019-09-04 03:06:37 +02:00
|
|
|
"Primary credential material of the account for authentication interactively."
|
2019-07-15 08:56:55 +02:00
|
|
|
],
|
|
|
|
"index": [],
|
2019-09-08 12:26:35 +02:00
|
|
|
"unique": [
|
|
|
|
"false"
|
|
|
|
],
|
2019-07-15 08:56:55 +02:00
|
|
|
"multivalue": [
|
2019-09-04 03:06:37 +02:00
|
|
|
"false"
|
2019-07-15 08:56:55 +02:00
|
|
|
],
|
2019-09-08 12:26:35 +02:00
|
|
|
"attributename": [
|
2019-09-04 03:06:37 +02:00
|
|
|
"primary_credential"
|
2019-07-15 08:56:55 +02:00
|
|
|
],
|
|
|
|
"syntax": [
|
2019-09-04 03:06:37 +02:00
|
|
|
"CREDENTIAL"
|
2019-07-15 08:56:55 +02:00
|
|
|
],
|
|
|
|
"uuid": [
|
2019-07-27 14:35:44 +02:00
|
|
|
"00000000-0000-0000-0000-ffff00000043"
|
2019-07-15 08:56:55 +02:00
|
|
|
]
|
|
|
|
}
|
|
|
|
}
|
|
|
|
"#;
|
|
|
|
|
2019-07-27 14:35:44 +02:00
|
|
|
pub static UUID_SCHEMA_CLASS_PERSON: &'static str = "00000000-0000-0000-0000-ffff00000044";
|
2019-07-15 08:56:55 +02:00
|
|
|
pub static JSON_SCHEMA_CLASS_PERSON: &'static str = r#"
|
|
|
|
{
|
|
|
|
"valid": {
|
2019-07-27 14:35:44 +02:00
|
|
|
"uuid": "00000000-0000-0000-0000-ffff00000044"
|
2019-07-15 08:56:55 +02:00
|
|
|
},
|
|
|
|
"state": null,
|
|
|
|
"attrs": {
|
|
|
|
"class": [
|
|
|
|
"object",
|
2019-07-20 04:04:38 +02:00
|
|
|
"system",
|
2019-07-15 08:56:55 +02:00
|
|
|
"classtype"
|
|
|
|
],
|
|
|
|
"description": [
|
|
|
|
"Object representation of a person"
|
|
|
|
],
|
2019-09-08 12:26:35 +02:00
|
|
|
"classname": [
|
2019-07-15 08:56:55 +02:00
|
|
|
"person"
|
|
|
|
],
|
|
|
|
"systemmay": [
|
|
|
|
"mail",
|
|
|
|
"memberof"
|
|
|
|
],
|
|
|
|
"systemmust": [
|
|
|
|
"displayname",
|
|
|
|
"name"
|
|
|
|
],
|
|
|
|
"uuid": [
|
2019-07-27 14:35:44 +02:00
|
|
|
"00000000-0000-0000-0000-ffff00000044"
|
2019-07-15 08:56:55 +02:00
|
|
|
]
|
|
|
|
}
|
|
|
|
}
|
|
|
|
"#;
|
|
|
|
|
2019-07-27 14:35:44 +02:00
|
|
|
pub static UUID_SCHEMA_CLASS_GROUP: &'static str = "00000000-0000-0000-0000-ffff00000045";
|
2019-07-15 08:56:55 +02:00
|
|
|
pub static JSON_SCHEMA_CLASS_GROUP: &'static str = r#"
|
|
|
|
{
|
|
|
|
"valid": {
|
2019-07-27 14:35:44 +02:00
|
|
|
"uuid": "00000000-0000-0000-0000-ffff00000045"
|
2019-07-15 08:56:55 +02:00
|
|
|
},
|
|
|
|
"state": null,
|
|
|
|
"attrs": {
|
|
|
|
"class": [
|
|
|
|
"object",
|
2019-07-20 04:04:38 +02:00
|
|
|
"system",
|
2019-07-15 08:56:55 +02:00
|
|
|
"classtype"
|
|
|
|
],
|
|
|
|
"description": [
|
|
|
|
"Object representation of a group"
|
|
|
|
],
|
2019-09-08 12:26:35 +02:00
|
|
|
"classname": [
|
2019-07-15 08:56:55 +02:00
|
|
|
"group"
|
|
|
|
],
|
|
|
|
"systemmay": [
|
|
|
|
"member"
|
|
|
|
],
|
|
|
|
"systemmust": [
|
|
|
|
"name"
|
|
|
|
],
|
|
|
|
"uuid": [
|
2019-07-27 14:35:44 +02:00
|
|
|
"00000000-0000-0000-0000-ffff00000045"
|
2019-07-15 08:56:55 +02:00
|
|
|
]
|
|
|
|
}
|
|
|
|
}
|
|
|
|
"#;
|
2019-07-27 14:35:44 +02:00
|
|
|
pub static UUID_SCHEMA_CLASS_ACCOUNT: &'static str = "00000000-0000-0000-0000-ffff00000046";
|
2019-07-15 08:56:55 +02:00
|
|
|
pub static JSON_SCHEMA_CLASS_ACCOUNT: &'static str = r#"
|
|
|
|
{
|
|
|
|
"valid": {
|
2019-07-27 14:35:44 +02:00
|
|
|
"uuid": "00000000-0000-0000-0000-ffff00000046"
|
2019-07-15 08:56:55 +02:00
|
|
|
},
|
|
|
|
"state": null,
|
|
|
|
"attrs": {
|
|
|
|
"class": [
|
|
|
|
"object",
|
2019-07-20 04:04:38 +02:00
|
|
|
"system",
|
2019-07-15 08:56:55 +02:00
|
|
|
"classtype"
|
|
|
|
],
|
|
|
|
"description": [
|
|
|
|
"Object representation of a person"
|
|
|
|
],
|
2019-09-08 12:26:35 +02:00
|
|
|
"classname": [
|
2019-07-15 08:56:55 +02:00
|
|
|
"account"
|
|
|
|
],
|
|
|
|
"systemmay": [
|
2019-09-04 03:06:37 +02:00
|
|
|
"primary_credential",
|
2019-07-15 08:56:55 +02:00
|
|
|
"ssh_publickey"
|
|
|
|
],
|
|
|
|
"systemmust": [
|
|
|
|
"displayname",
|
|
|
|
"name"
|
|
|
|
],
|
|
|
|
"uuid": [
|
2019-07-27 14:35:44 +02:00
|
|
|
"00000000-0000-0000-0000-ffff00000046"
|
2019-07-15 08:56:55 +02:00
|
|
|
]
|
|
|
|
}
|
|
|
|
}
|
|
|
|
"#;
|
|
|
|
|
2019-06-07 11:19:09 +02:00
|
|
|
// ============ TEST DATA ============
|
|
|
|
#[cfg(test)]
|
|
|
|
pub static JSON_TESTPERSON1: &'static str = r#"{
|
|
|
|
"valid": null,
|
|
|
|
"state": null,
|
|
|
|
"attrs": {
|
|
|
|
"class": ["object"],
|
|
|
|
"name": ["testperson1"],
|
|
|
|
"uuid": ["cc8e95b4-c24f-4d68-ba54-8bed76f63930"]
|
|
|
|
}
|
|
|
|
}"#;
|
|
|
|
|
|
|
|
#[cfg(test)]
|
|
|
|
pub static JSON_TESTPERSON2: &'static str = r#"{
|
|
|
|
"valid": null,
|
|
|
|
"state": null,
|
|
|
|
"attrs": {
|
|
|
|
"class": ["object"],
|
|
|
|
"name": ["testperson2"],
|
|
|
|
"uuid": ["538faac7-4d29-473b-a59d-23023ac19955"]
|
|
|
|
}
|
|
|
|
}"#;
|