diff --git a/.idea/sqldialects.xml b/.idea/sqldialects.xml index 9d2b463..b4dcf43 100644 --- a/.idea/sqldialects.xml +++ b/.idea/sqldialects.xml @@ -2,6 +2,7 @@ + diff --git a/coffee_socialbox/config/socialbox.conf b/coffee_socialbox/config/socialbox.conf index e2baf17..0d01283 100755 --- a/coffee_socialbox/config/socialbox.conf +++ b/coffee_socialbox/config/socialbox.conf @@ -84,7 +84,11 @@ "email_address_required": false, "phone_number_required": false, "birthday_required": false, - "image_captcha_verification_required": false + "image_captcha_verification_required": false, + "first_name_required": false, + "middle_name_required": false, + "last_name_required": false, + "url_required": false }, "authentication": { "enabled": true, @@ -94,7 +98,16 @@ "max_signing_keys": 20, "session_inactivity_expires": 43200, "image_captcha_expires": 300, - "peer_sync_interval": 3600 + "peer_sync_interval": 3600, + "get_contacts_limit": 100, + "default_display_picture_privacy": "PUBLIC", + "default_first_name_privacy": "CONTACTS", + "default_middle_name_privacy": "PRIVATE", + "default_last_name_privacy": "PRIVATE", + "default_email_address_privacy": "CONTACTS", + "default_phone_number_privacy": "CONTACTS", + "default_birthday_privacy": "PRIVATE", + "default_url_privacy": "PUBLIC" }, "storage": { "path": "/etc/socialbox", diff --git a/src/Socialbox/Classes/Resources/database/authentication_otp.sql b/src/Socialbox/Classes/Resources/database/authentication_otp.sql index 4e32763..54a3d28 100644 --- a/src/Socialbox/Classes/Resources/database/authentication_otp.sql +++ b/src/Socialbox/Classes/Resources/database/authentication_otp.sql @@ -1,18 +1,18 @@ -create table authentication_otp +create table authentication_passwords ( - peer_uuid varchar(36) not null comment 'The Peer UUID associated with this record' - primary key comment 'The Peer UUID unique Index', - secret mediumtext not null comment 'The encrypted secret for the OTP', - updated timestamp default current_timestamp() not null comment 'The Timestamp for when the record was last updated', - constraint authentication_otp_peer_uuid_uindex - unique (peer_uuid) comment 'The Peer UUID unique Index', - constraint authentication_otp_registered_peers_uuid_fk + peer_uuid varchar(36) not null comment 'The primary unique index of the peer uuid' + primary key, + hash mediumtext not null comment 'The encrypted hash of the password', + updated timestamp default current_timestamp() not null comment 'The Timestamp for when this record was last updated', + constraint authentication_passwords_peer_uuid_uindex + unique (peer_uuid) comment 'The primary unique index of the peer uuid', + constraint authentication_passwords_registered_peers_uuid_fk foreign key (peer_uuid) references peers (uuid) on update cascade on delete cascade ) - comment 'Table for housing encrypted OTP secrets for for verification'; + comment 'Table for housing authentication passwords for registered peers'; -create index authentication_otp_updated_index - on authentication_otp (updated) - comment 'The index for the updated column'; +create index authentication_passwords_updated_index + on authentication_passwords (updated) + comment 'The index of the of the updated column of the record'; diff --git a/src/Socialbox/Classes/Resources/database/authentication_passwords.sql b/src/Socialbox/Classes/Resources/database/authentication_passwords.sql index 5a7b36c..4a8da96 100644 --- a/src/Socialbox/Classes/Resources/database/authentication_passwords.sql +++ b/src/Socialbox/Classes/Resources/database/authentication_passwords.sql @@ -1,7 +1,7 @@ create table authentication_passwords ( - peer_uuid varchar(36) not null comment 'The Universal Unique Identifier for the peer that is associated with this password record' - primary key comment 'The primary unique index of the peer uuid', + peer_uuid varchar(36) not null comment 'The primary unique index of the peer uuid' + primary key, hash mediumtext not null comment 'The encrypted hash of the password', updated timestamp default current_timestamp() not null comment 'The Timestamp for when this record was last updated', constraint authentication_passwords_peer_uuid_uindex diff --git a/src/Socialbox/Classes/Resources/database/captcha_images.sql b/src/Socialbox/Classes/Resources/database/captcha_images.sql index 1a3958b..e4c00a5 100644 --- a/src/Socialbox/Classes/Resources/database/captcha_images.sql +++ b/src/Socialbox/Classes/Resources/database/captcha_images.sql @@ -1,7 +1,7 @@ create table captcha_images ( - uuid varchar(36) default uuid() not null comment 'The Unique Universal Identifier of the captcha record' - primary key comment 'The Unique index for the UUID column', + uuid varchar(36) default uuid() not null comment 'The Unique index for the UUID column' + primary key, peer_uuid varchar(36) not null comment 'The UUID of the peer that is associated with this captcha challenge', status enum ('UNSOLVED', 'SOLVED') default 'UNSOLVED' not null comment 'The status of the current captcha', answer varchar(8) null comment 'The current answer for the captcha', diff --git a/src/Socialbox/Classes/Resources/database/signing_keys.sql b/src/Socialbox/Classes/Resources/database/signing_keys.sql index 8de9fbd..3853718 100644 --- a/src/Socialbox/Classes/Resources/database/signing_keys.sql +++ b/src/Socialbox/Classes/Resources/database/signing_keys.sql @@ -13,7 +13,7 @@ create table signing_keys constraint signing_keys_pk unique (peer_uuid, uuid) comment 'The Unique Index pair for the signing key name and the UUID of the peer', constraint signing_keys_registered_peers_uuid_fk - foreign key (peer_uuid) references registered_peers (uuid) + foreign key (peer_uuid) references peers (uuid) on update cascade on delete cascade ) comment 'Table for housing public signing keys for peers on the network'; @@ -28,5 +28,5 @@ create index signing_keys_state_index create index signing_keys_uuid_index on signing_keys (uuid) - comment 'The index for the signing key name'; + comment 'The index for the signing key namee'; diff --git a/teapot_socialbox/config/socialbox.conf b/teapot_socialbox/config/socialbox.conf index 44c4cdb..bf3b757 100755 --- a/teapot_socialbox/config/socialbox.conf +++ b/teapot_socialbox/config/socialbox.conf @@ -84,7 +84,11 @@ "email_address_required": false, "phone_number_required": false, "birthday_required": false, - "image_captcha_verification_required": false + "image_captcha_verification_required": false, + "first_name_required": false, + "middle_name_required": false, + "last_name_required": false, + "url_required": false }, "authentication": { "enabled": true, @@ -94,7 +98,16 @@ "max_signing_keys": 20, "session_inactivity_expires": 43200, "image_captcha_expires": 300, - "peer_sync_interval": 3600 + "peer_sync_interval": 3600, + "get_contacts_limit": 100, + "default_display_picture_privacy": "PUBLIC", + "default_first_name_privacy": "CONTACTS", + "default_middle_name_privacy": "PRIVATE", + "default_last_name_privacy": "PRIVATE", + "default_email_address_privacy": "CONTACTS", + "default_phone_number_privacy": "CONTACTS", + "default_birthday_privacy": "PRIVATE", + "default_url_privacy": "PUBLIC" }, "storage": { "path": "/etc/socialbox",