Skip to content
This repository was archived by the owner on Jun 25, 2024. It is now read-only.

Commit 7c05376

Browse files
author
Billy Clark
committed
u2f test users having difficulty authenticating.
1 parent 74623d3 commit 7c05376

File tree

2 files changed

+27
-14
lines changed

2 files changed

+27
-14
lines changed

development/idp4/m991231_235959_insert_mfa_test_users.php

Lines changed: 16 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@
55

66
class m991231_235959_insert_mfa_test_users extends Migration
77
{
8+
89
public function safeUp()
910
{
1011
$this->batchInsert('{{user}}',
@@ -18,13 +19,13 @@ public function safeUp()
1819
]);
1920

2021
$this->batchInsert('{{password}}',
21-
['id','user_id','hash' ,'created_utc' ,'expires_on','grace_period_ends_on'],[
22-
[ 1 , 1 ,'$2y$10$rKbAp0M8gewGpQKhD.U6qOSGDlMqKFkxK9tQZ15SZoieqYHYNsD/y', MySqlDateTime::now(),'9999-12-31','9999-12-31' ],
23-
[ 2 , 2 ,'$2y$10$rKbAp0M8gewGpQKhD.U6qOSGDlMqKFkxK9tQZ15SZoieqYHYNsD/y', MySqlDateTime::now(),'9999-12-31','9999-12-31' ],
24-
[ 3 , 3 ,'$2y$10$rKbAp0M8gewGpQKhD.U6qOSGDlMqKFkxK9tQZ15SZoieqYHYNsD/y', MySqlDateTime::now(),'9999-12-31','9999-12-31' ],
25-
[ 4 , 4 ,'$2y$10$rKbAp0M8gewGpQKhD.U6qOSGDlMqKFkxK9tQZ15SZoieqYHYNsD/y', MySqlDateTime::now(),'9999-12-31','9999-12-31' ],
26-
[ 5 , 5 ,'$2y$10$rKbAp0M8gewGpQKhD.U6qOSGDlMqKFkxK9tQZ15SZoieqYHYNsD/y', MySqlDateTime::now(),'9999-12-31','9999-12-31' ],
27-
[ 6 , 6 ,'$2y$10$rKbAp0M8gewGpQKhD.U6qOSGDlMqKFkxK9tQZ15SZoieqYHYNsD/y', MySqlDateTime::now(),'9999-12-31','9999-12-31' ],
22+
['id','user_id','hash' ,'created_utc' ,'expires_on' ,'grace_period_ends_on' ],[
23+
[ 1 , 1 ,'$2y$10$rKbAp0M8gewGpQKhD.U6qOSGDlMqKFkxK9tQZ15SZoieqYHYNsD/y', MySqlDateTime::now(), MySqlDateTime::relative('+1 year'), MySqlDateTime::relative('+1 year')],
24+
[ 2 , 2 ,'$2y$10$rKbAp0M8gewGpQKhD.U6qOSGDlMqKFkxK9tQZ15SZoieqYHYNsD/y', MySqlDateTime::now(), MySqlDateTime::relative('+1 year'), MySqlDateTime::relative('+1 year')],
25+
[ 3 , 3 ,'$2y$10$rKbAp0M8gewGpQKhD.U6qOSGDlMqKFkxK9tQZ15SZoieqYHYNsD/y', MySqlDateTime::now(), MySqlDateTime::relative('+1 year'), MySqlDateTime::relative('+1 year')],
26+
[ 4 , 4 ,'$2y$10$rKbAp0M8gewGpQKhD.U6qOSGDlMqKFkxK9tQZ15SZoieqYHYNsD/y', MySqlDateTime::now(), MySqlDateTime::relative('+1 year'), MySqlDateTime::relative('+1 year')],
27+
[ 5 , 5 ,'$2y$10$rKbAp0M8gewGpQKhD.U6qOSGDlMqKFkxK9tQZ15SZoieqYHYNsD/y', MySqlDateTime::now(), MySqlDateTime::relative('+1 year'), MySqlDateTime::relative('+1 year')],
28+
[ 6 , 6 ,'$2y$10$rKbAp0M8gewGpQKhD.U6qOSGDlMqKFkxK9tQZ15SZoieqYHYNsD/y', MySqlDateTime::now(), MySqlDateTime::relative('+1 year'), MySqlDateTime::relative('+1 year')],
2829
]);
2930

3031
$this->update('{{user}}', ['current_password_id' => 1], 'id=1');
@@ -34,14 +35,15 @@ public function safeUp()
3435
$this->update('{{user}}', ['current_password_id' => 5], 'id=5');
3536
$this->update('{{user}}', ['current_password_id' => 6], 'id=6');
3637

38+
//TODO: at this time unfortunately, a real uuid that's been verified is required for testing u2f authentication...will discuss decoupling 2-factor config with authentication.
3739
$this->batchInsert('{{mfa}}',
38-
['id','user_id','type' ,'verified','created_utc' ],[
39-
[ 1 , 3 ,'backupcode', 1 , MySqlDateTime::now()],
40-
[ 2 , 4 ,'totp' , 1 , MySqlDateTime::now()],
41-
[ 3 , 5 ,'u2f' , 1 , MySqlDateTime::now()],
42-
[ 4 , 6 ,'backupcode', 1 , MySqlDateTime::now()],
43-
[ 5 , 6 ,'totp' , 1 , MySqlDateTime::now()],
44-
[ 6 , 6 ,'u2f' , 1 , MySqlDateTime::now()],
40+
['id','user_id','type' ,'external_uuid' ,'verified','created_utc' ],[
41+
[ 1 , 3 ,'backupcode',NULL , 1 , MySqlDateTime::now()],
42+
[ 2 , 4 ,'totp' ,'' , 1 , MySqlDateTime::now()],
43+
[ 3 , 5 ,'u2f' ,'11931c0f-8438-4989-a37f-d35ad2b92219', 1 , MySqlDateTime::now()],
44+
[ 4 , 6 ,'backupcode',NULL , 1 , MySqlDateTime::now()],
45+
[ 5 , 6 ,'totp' ,'' , 1 , MySqlDateTime::now()],
46+
[ 6 , 6 ,'u2f' ,'c67279de-0d03-4504-8e07-58b4158ebccf', 1 , MySqlDateTime::now()],
4547
]);
4648

4749
$this->batchInsert('{{mfa_backupcode}}',

docker-compose.yml

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -163,6 +163,17 @@ services:
163163
MYSQL_USER: "user"
164164
MYSQL_PASSWORD: "pass"
165165

166+
brokerPhpmyadmin:
167+
image: phpmyadmin/phpmyadmin
168+
ports:
169+
- "8091:80"
170+
depends_on:
171+
- brokerDb
172+
environment:
173+
PMA_HOST: "brokerDb"
174+
PMA_USER: "user"
175+
PMA_PASSWORD: "pass"
176+
166177
hub2:
167178
image: silintl/ssp-base:develop
168179
volumes:

0 commit comments

Comments
 (0)