@@ -9,14 +9,15 @@ class m991231_235959_insert_mfa_test_users extends Migration
99 public function safeUp ()
1010 {
1111 $ this ->batchInsert ('{{user}} ' ,
12- ['id ' ,'uuid ' ,'employee_id ' ,'first_name ' ,'last_name ' ,'username ' ,'email ' ,'active ' ,'locked ' ,'last_changed_utc ' ,'last_synced_utc ' ,'require_mfa ' ,'review_profile_after ' ,'manager_email ' ],[
13- [
1 ,
'2b2d424e-8cb0-49c7-8c0b-7f660340f5fa ' ,
'11111 ' ,
'Not ' ,
'Needed ' ,
'nag_for_mfa ' ,
'[email protected] ' ,
'yes ' ,
'no ' , MySqlDateTime::
now (), MySqlDateTime::
now (),
'no ' , MySqlDateTime::
today () ,
'[email protected] ' ],
14- [
2 ,
'ef960c92-09fc-44f4-aadf-2d3aea6e0dbd ' ,
'22222 ' ,
'Must ' ,
'Have ' ,
'must_set_up_mfa ' ,
'[email protected] ' ,
'yes ' ,
'no ' , MySqlDateTime::
now (), MySqlDateTime::
now (),
'yes ' , MySqlDateTime::
today () ,
'[email protected] ' ],
15- [
3 ,
'a42317a0-9a43-4da0-9921-50f004e011c0 ' ,
'33333 ' ,
'Has ' ,
'Backup ' ,
'has_backupcode ' ,
'[email protected] ' ,
'yes ' ,
'no ' , MySqlDateTime::
now (), MySqlDateTime::
now (),
'no ' , MySqlDateTime::
today () ,
'[email protected] ' ],
16- [
4 ,
'7bab90d3-9f54-4187-804d-7f6400021789 ' ,
'44444 ' ,
'Has ' ,
'Totp ' ,
'has_totp ' ,
'[email protected] ' ,
'yes ' ,
'no ' , MySqlDateTime::
now (), MySqlDateTime::
now (),
'no ' , MySqlDateTime::
today () ,
'[email protected] ' ],
17- [
5 ,
'6b614606-bbe8-4793-b0db-ca862295c661 ' ,
'55555 ' ,
'Has ' ,
'U2f ' ,
'has_u2f ' ,
'[email protected] ' ,
'yes ' ,
'no ' , MySqlDateTime::
now (), MySqlDateTime::
now (),
'no ' , MySqlDateTime::
today () ,
'[email protected] ' ],
18- [
6 ,
'7c695eac-dbca-45d0-b3dc-2df2e1d2294c ' ,
'77777 ' ,
'Has ' ,
'All ' ,
'has_all ' ,
'[email protected] ' ,
'yes ' ,
'no ' , MySqlDateTime::
now (), MySqlDateTime::
now (),
'no ' , MySqlDateTime::
today () ,
'[email protected] ' ],
19- [
7 ,
'7c695eac-dbca-45d0-b3dc-123jkhf23bql ' ,
'88888 ' ,
'Review ' ,
'Needed ' ,
'needs_review ' ,
'[email protected] ' ,
'yes ' ,
'no ' , MySqlDateTime::
now (), MySqlDateTime::
now (),
'no ' , MySqlDateTime::
relative (
'-3 days ' ),
'[email protected] ' ],
12+ ['id ' ,'uuid ' ,'employee_id ' ,'first_name ' ,'last_name ' ,'username ' ,'email ' ,'active ' ,'locked ' ,'last_changed_utc ' ,'last_synced_utc ' ,'require_mfa ' ,'review_profile_after ' ,'nag_for_mfa_after ' ,'nag_for_method_after ' ,'manager_email ' ],[
13+ [
1 ,
'2b2d424e-8cb0-49c7-8c0b-7f660340f5fa ' ,
'11111 ' ,
'No ' ,
'Mfas ' ,
'nag_for_mfa ' ,
'[email protected] ' ,
'yes ' ,
'no ' , MySqlDateTime::
now (), MySqlDateTime::
now (),
'no ' , MySqlDateTime::
today () , MySqlDateTime::
relative (
'-1 days ' ), MySqlDateTime::
today () ,
'[email protected] ' ],
14+ [
2 ,
'ef960c92-09fc-44f4-aadf-2d3aea6e0dbd ' ,
'22222 ' ,
'Must ' ,
'Have ' ,
'must_set_up_mfa ' ,
'[email protected] ' ,
'yes ' ,
'no ' , MySqlDateTime::
now (), MySqlDateTime::
now (),
'yes ' , MySqlDateTime::
today () , MySqlDateTime::
today () , MySqlDateTime::
today () ,
'[email protected] ' ],
15+ [
3 ,
'a42317a0-9a43-4da0-9921-50f004e011c0 ' ,
'33333 ' ,
'Has ' ,
'Backup ' ,
'has_backupcode ' ,
'[email protected] ' ,
'yes ' ,
'no ' , MySqlDateTime::
now (), MySqlDateTime::
now (),
'no ' , MySqlDateTime::
today () , MySqlDateTime::
today () , MySqlDateTime::
today () ,
'[email protected] ' ],
16+ [
4 ,
'7bab90d3-9f54-4187-804d-7f6400021789 ' ,
'44444 ' ,
'Has ' ,
'Totp ' ,
'has_totp ' ,
'[email protected] ' ,
'yes ' ,
'no ' , MySqlDateTime::
now (), MySqlDateTime::
now (),
'no ' , MySqlDateTime::
today () , MySqlDateTime::
today () , MySqlDateTime::
today () ,
'[email protected] ' ],
17+ [
5 ,
'6b614606-bbe8-4793-b0db-ca862295c661 ' ,
'55555 ' ,
'Has ' ,
'U2f ' ,
'has_u2f ' ,
'[email protected] ' ,
'yes ' ,
'no ' , MySqlDateTime::
now (), MySqlDateTime::
now (),
'no ' , MySqlDateTime::
today () , MySqlDateTime::
today () , MySqlDateTime::
today () ,
'[email protected] ' ],
18+ [
6 ,
'7c695eac-dbca-45d0-b3dc-2df2e1d2294c ' ,
'77777 ' ,
'Has ' ,
'All ' ,
'has_all ' ,
'[email protected] ' ,
'yes ' ,
'no ' , MySqlDateTime::
now (), MySqlDateTime::
now (),
'no ' , MySqlDateTime::
today () , MySqlDateTime::
today () , MySqlDateTime::
today () ,
'[email protected] ' ],
19+ [
7 ,
'7c695eac-dbca-45d0-b3dc-123jkhf23bql ' ,
'88888 ' ,
'Review ' ,
'Needed ' ,
'needs_review ' ,
'[email protected] ' ,
'yes ' ,
'no ' , MySqlDateTime::
now (), MySqlDateTime::
now (),
'no ' , MySqlDateTime::
relative (
'-3 days ' ), MySqlDateTime::
today () , MySqlDateTime::
today () ,
'[email protected] ' ],
20+ [
8 ,
'7c695eac-dbca-45d0-b3dc-123jkhf23bbq ' ,
'99999 ' ,
'No ' ,
'Methods ' ,
'nag_for_method ' ,
'[email protected] ' ,
'yes ' ,
'no ' , MySqlDateTime::
now (), MySqlDateTime::
now (),
'no ' , MySqlDateTime::
today () , MySqlDateTime::
today () , MySqlDateTime::
relative (
'-1 days ' ),
'[email protected] ' ],
2021 ]);
2122
2223 $ this ->batchInsert ('{{password}} ' ,
@@ -28,6 +29,7 @@ public function safeUp()
2829 [ 5 , 5 ,'$2y$10$rKbAp0M8gewGpQKhD.U6qOSGDlMqKFkxK9tQZ15SZoieqYHYNsD/y ' , MySqlDateTime::now (), MySqlDateTime::relative ('+1 year ' ), MySqlDateTime::relative ('+1 year ' )],
2930 [ 6 , 6 ,'$2y$10$rKbAp0M8gewGpQKhD.U6qOSGDlMqKFkxK9tQZ15SZoieqYHYNsD/y ' , MySqlDateTime::now (), MySqlDateTime::relative ('+1 year ' ), MySqlDateTime::relative ('+1 year ' )],
3031 [ 7 , 7 ,'$2y$10$rKbAp0M8gewGpQKhD.U6qOSGDlMqKFkxK9tQZ15SZoieqYHYNsD/y ' , MySqlDateTime::now (), MySqlDateTime::relative ('+1 year ' ), MySqlDateTime::relative ('+1 year ' )],
32+ [ 8 , 8 ,'$2y$10$rKbAp0M8gewGpQKhD.U6qOSGDlMqKFkxK9tQZ15SZoieqYHYNsD/y ' , MySqlDateTime::now (), MySqlDateTime::relative ('+1 year ' ), MySqlDateTime::relative ('+1 year ' )],
3133 ]);
3234
3335 $ this ->update ('{{user}} ' , ['current_password_id ' => 1 ], 'id=1 ' );
@@ -37,10 +39,11 @@ public function safeUp()
3739 $ this ->update ('{{user}} ' , ['current_password_id ' => 5 ], 'id=5 ' );
3840 $ this ->update ('{{user}} ' , ['current_password_id ' => 6 ], 'id=6 ' );
3941 $ this ->update ('{{user}} ' , ['current_password_id ' => 7 ], 'id=7 ' );
42+ $ this ->update ('{{user}} ' , ['current_password_id ' => 8 ], 'id=8 ' );
4043
4144 //TODO: unfortunately, a real uuid that's been verified is required for testing at this time ...will discuss decoupling 2-factor config with authentication.
4245 $ this ->batchInsert ('{{mfa}} ' ,
43- ['id ' ,'user_id ' ,'type ' ,'external_uuid ' ,'label ' ,'verified ' ,'created_utc ' ],[
46+ ['id ' ,'user_id ' ,'type ' ,'external_uuid ' ,'label ' ,'verified ' ,'created_utc ' ],[
4447 [ 1 , 3 ,'backupcode ' ,NULL ,'Printable Codes ' , 1 , MySqlDateTime::now ()],
4548 [ 2 , 4 ,'totp ' ,'38764a89-b904-404e-a195-1ad2bcfabf75 ' ,'Smartphone App ' , 1 , MySqlDateTime::now ()], // JVRXKYTMPBEVKXLS
4649 [ 3 , 5 ,'u2f ' ,'6092a08c-b271-4971-996a-6577333a7b6d ' ,'Security Key ' , 1 , MySqlDateTime::now ()],
@@ -50,6 +53,7 @@ public function safeUp()
5053 [ 7 , 7 ,'backupcode ' ,NULL ,'Printable Codes ' , 1 , MySqlDateTime::now ()],
5154 [ 8 , 7 ,'totp ' ,'38764a89-b904-404e-a195-1ad2bcfabf75 ' ,'Smartphone App ' , 1 , MySqlDateTime::now ()], // JVRXKYTMPBEVKXLS
5255 [ 9 , 7 ,'u2f ' ,'6092a08c-b271-4971-996a-6577333a7b6d ' ,'Security Key ' , 1 , MySqlDateTime::now ()],
56+ [ 10 , 8 ,'backupcode ' ,NULL ,'Printable Codes ' , 1 , MySqlDateTime::now ()],
5357 ]);
5458
5559 $ this ->batchInsert ('{{mfa_backupcode}} ' ,
@@ -69,6 +73,11 @@ public function safeUp()
6973 [ 13 , 7 ,'$2y$10$rA5MdrbEcmbCiqtAgPXnYeBCEKc.AnylPArnamyu.x4DS/A0/0/4i ' , MySqlDateTime::now ()], // 77802769
7074 [ 14 , 7 ,'$2y$10$JsiRI/W/FLfZzJLPj8umKeXP.rvsOW4aYQO5mOEOwGkBPpKhKWT2K ' , MySqlDateTime::now ()], // 01970541
7175 [ 15 , 7 ,'$2y$10$NWw0.DPBSm.bjQoSck8xbeqJgENUhE/WazmHmsEtWoxs/UKaIdkUq ' , MySqlDateTime::now ()], // 37771076
76+ [ 16 , 10 ,'$2y$10$j/V6zcotFES8MkVmgRaiMe2E6DV1qjmO8UhUoJQD0/.p6LhZddGn2 ' , MySqlDateTime::now ()], // 94923279
77+ [ 17 , 10 ,'$2y$10$If6srqyKGBag/x.nPDBeau9bjNR1RZgxqRVKhdRhJk2PkbOn5rKNS ' , MySqlDateTime::now ()], // 82743523
78+ [ 18 , 10 ,'$2y$10$rA5MdrbEcmbCiqtAgPXnYeBCEKc.AnylPArnamyu.x4DS/A0/0/4i ' , MySqlDateTime::now ()], // 77802769
79+ [ 19 , 10 ,'$2y$10$JsiRI/W/FLfZzJLPj8umKeXP.rvsOW4aYQO5mOEOwGkBPpKhKWT2K ' , MySqlDateTime::now ()], // 01970541
80+ [ 20 , 10 ,'$2y$10$NWw0.DPBSm.bjQoSck8xbeqJgENUhE/WazmHmsEtWoxs/UKaIdkUq ' , MySqlDateTime::now ()], // 37771076
7281 ]);
7382
7483 $ this ->batchInsert ('{{method}} ' ,
@@ -89,15 +98,15 @@ public function safeDown()
8998 ]);
9099
91100 $ this ->delete ('{{password}} ' , [
92- 'user_id ' => [1 , 2 , 3 , 4 , 5 , 6 , 7 ]
101+ 'user_id ' => [1 , 2 , 3 , 4 , 5 , 6 , 7 , 8 ]
93102 ]);
94103
95104 $ this ->delete ('{{method}} ' , [
96105 'user_id ' => [7 ]
97106 ]);
98107
99108 $ this ->delete ('{{user}} ' , [
100- 'id ' => [1 , 2 , 3 , 4 , 5 , 6 , 7 ]
109+ 'id ' => [1 , 2 , 3 , 4 , 5 , 6 , 7 , 8 ]
101110 ]);
102111 }
103112}
0 commit comments