MT#62568 subscribers 2fa fields

2-Factor-Authentication (2FA) for subscribers based on
voip_preferences only, to support lazy OTP secret initialisation
by application logic.

Change-Id: I265fe1c6e5b75d96aa77b6169ac7508bbf65fbb3
mr13.4
Rene Krenn 5 months ago committed by Sipwise Jenkins Builder
parent 3f5749cb1b
commit 4e8e9a7e6c

@ -0,0 +1,9 @@
USE provisioning;
SET autocommit=0;
DELETE from voip_preferences WHERE attribute = "enable_2fa";
DELETE from voip_preferences WHERE attribute = "show_otp_registration_info";
DELETE from voip_preferences WHERE attribute = "otp_secret";
COMMIT;

@ -0,0 +1,82 @@
USE provisioning;
SET autocommit=0;
SET @group_id = (SELECT id FROM voip_preference_groups WHERE name = 'Access Restrictions' LIMIT 1);
INSERT INTO voip_preferences SET
voip_preference_groups_id = @group_id,
attribute = 'enable_2fa',
label = '2-Factor Authentication (2FA)',
type = 0,
max_occur = 1,
usr_pref = 1,
prof_pref = 1,
dom_pref = 1,
peer_pref = 0,
contract_pref = 0,
contract_location_pref = 0,
dev_pref = 0,
devprof_pref = 0,
fielddev_pref = 0,
modify_timestamp = now(),
internal = 0,
expose_to_customer = 1,
data_type = 'boolean',
read_only = 0,
description = 'Enable Time-based One-Time-Password (TOTP) Multifactor Authentication for Subscriber CSC logins.',
dynamic = 0,
reseller_pref = 0,
expose_to_subscriber = 1;
INSERT INTO voip_preferences SET
voip_preference_groups_id = @group_id,
attribute = 'otp_secret',
label = 'OTP Secret',
type = 0,
max_occur = 1,
usr_pref = 1,
prof_pref = 0,
dom_pref = 0,
peer_pref = 0,
contract_pref = 0,
contract_location_pref = 0,
dev_pref = 0,
devprof_pref = 0,
fielddev_pref = 0,
modify_timestamp = now(),
internal = 1,
expose_to_customer = 0,
data_type = 'string',
read_only = 1,
description ='Time-based One-Time-Password (TOTP) secret (RFC 6238).',
dynamic = 0,
reseller_pref = 0,
expose_to_subscriber = 0;
INSERT INTO voip_preferences SET
voip_preference_groups_id = @group_id,
attribute = 'show_otp_registration_info',
label = 'Show OTP Registration Info',
type = 0,
max_occur = 1,
usr_pref = 1,
prof_pref = 0,
dom_pref = 0,
peer_pref = 0,
contract_pref = 0,
contract_location_pref = 0,
dev_pref = 0,
devprof_pref = 0,
fielddev_pref = 0,
modify_timestamp = now(),
internal = 1,
expose_to_customer = 0,
data_type = 'boolean',
read_only = 1,
description = 'Show Time-based One-Time-Password (TOTP) secret and registration info for the next CSC logins.',
dynamic = 0,
reseller_pref = 0,
expose_to_subscriber = 0;
COMMIT;

@ -24,7 +24,7 @@ CREATE TABLE `db_schema` (
PRIMARY KEY (`id`),
UNIQUE KEY `rev_idx` (`revision`,`node`),
KEY `release_idx` (`release`)
) ENGINE=InnoDB AUTO_INCREMENT=907 DEFAULT CHARSET=utf8mb3 COLLATE=utf8mb3_general_ci;
) ENGINE=InnoDB AUTO_INCREMENT=908 DEFAULT CHARSET=utf8mb3 COLLATE=utf8mb3_general_ci;
/*!40101 SET character_set_client = @saved_cs_client */;
/*!40101 SET @saved_cs_client = @@character_set_client */;
/*!40101 SET character_set_client = utf8mb4 */;
@ -30957,6 +30957,7 @@ INSERT INTO `db_schema` VALUES (903,15840,'spce','1970-01-01 00:00:01','trunk');
INSERT INTO `db_schema` VALUES (904,15841,'spce','1970-01-01 00:00:01','trunk');
INSERT INTO `db_schema` VALUES (905,15842,'spce','1970-01-01 00:00:01','trunk');
INSERT INTO `db_schema` VALUES (906,15859,'spce','1970-01-01 00:00:01','trunk');
INSERT INTO `db_schema` VALUES (907,15862,'spce','1970-01-01 00:00:01','trunk');
commit;
set autocommit=0;
INSERT INTO `timezone` VALUES ('1','localtime','1970-01-01 00:00:01','1970-01-01 00:00:01',NULL);

@ -1194,7 +1194,7 @@ CREATE TABLE `voip_preferences` (
UNIQUE KEY `attribute_idx` (`attribute`),
KEY `vpgid_ref` (`voip_preference_groups_id`),
CONSTRAINT `vpgid_ref` FOREIGN KEY (`voip_preference_groups_id`) REFERENCES `voip_preference_groups` (`id`) ON UPDATE CASCADE
) ENGINE=InnoDB AUTO_INCREMENT=407 DEFAULT CHARSET=utf8mb3 COLLATE=utf8mb3_general_ci;
) ENGINE=InnoDB AUTO_INCREMENT=410 DEFAULT CHARSET=utf8mb3 COLLATE=utf8mb3_general_ci;
/*!40101 SET character_set_client = @saved_cs_client */;
/*!40101 SET @saved_cs_client = @@character_set_client */;
/*!40101 SET character_set_client = utf8mb4 */;
@ -4156,6 +4156,9 @@ INSERT INTO `voip_preferences` VALUES (403,9,'aa_extensions_dial_mode','Auto-Att
INSERT INTO `voip_preferences` VALUES (404,5,'sdp_media_remove','Remove/reject SDP media sections by type',0,1,1,1,1,1,0,0,0,0,0,'1970-01-01 00:00:01',0,0,'string',0,'Comma-separated list of SDP media types (e.g. \'video\') to remove from an offer.',0,0,0);
INSERT INTO `voip_preferences` VALUES (405,9,'aa_timeout_repetition','Auto-Attendant message repetition on timeout',0,1,1,1,1,0,0,0,0,0,0,'1970-01-01 00:00:01',0,0,'int',0,'Define Auto-Attendant number of message repetitions played before reaching associated overflow in case of timeout',0,0,0);
INSERT INTO `voip_preferences` VALUES (406,9,'aa_wrongkey_repetition','Auto-Attendant message repetition on wrong key',0,1,1,1,1,0,0,0,0,0,0,'1970-01-01 00:00:01',0,0,'int',0,'Define Auto-Attendant number of message repetitions played before reaching associated overflow in case of wrong keypress',0,0,0);
INSERT INTO `voip_preferences` VALUES (407,3,'enable_2fa','2-Factor Authentication (2FA)',0,1,1,1,1,0,0,0,0,0,0,'1970-01-01 00:00:01',0,1,'boolean',0,'Enable Time-based One-Time-Password (TOTP) Multifactor Authentication for Subscriber CSC logins.',0,0,1);
INSERT INTO `voip_preferences` VALUES (408,3,'otp_secret','OTP Secret',0,1,1,0,0,0,0,0,0,0,0,'1970-01-01 00:00:01',1,0,'string',1,'Time-based One-Time-Password (TOTP) secret (RFC 6238).',0,0,0);
INSERT INTO `voip_preferences` VALUES (409,3,'show_otp_registration_info','Show OTP Registration Info',0,1,1,0,0,0,0,0,0,0,0,'1970-01-01 00:00:01',1,0,'boolean',1,'Show Time-based One-Time-Password (TOTP) secret and registration info for the next CSC logins.',0,0,0);
commit;
set autocommit=0;
INSERT INTO `voip_preferences_enum` VALUES (8,62,'use domain default',NULL,1,1,0,0,NULL,0,0,0,0,NULL,NULL);

Loading…
Cancel
Save