mirror of https://github.com/sipwise/db-schema.git
2-Factor-Authentication (2FA) for subscribers based on voip_preferences only, to support lazy OTP secret initialisation by application logic. Change-Id: I265fe1c6e5b75d96aa77b6169ac7508bbf65fbb3mr13.4
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;
|
||||
Loading…
Reference in new issue