Passkeys: agents and client portal contacts can add a passkey with their password and sign in with it instead of their email and password, counting as two-step sign-in; a passkey that supports PRF also opens an agent's credential vault, otherwise credentials stay locked until they type their password once; admins can turn passkeys off in Security settings, and resetting MFA, turning off a contact's two-step sign-in, archiving an agent and the incident password reset remove them; database 4.2.2 adds user_passkeys, users.user_passkey_handle and settings.config_login_passkeys, and lbuchs/WebAuthn 2.2.0 is bundled in libs/webauthn

This commit is contained in:
johnnyq
2026-11-28 23:31:17 -05:00
parent 4a2933cac9
commit d9c1c752bd
50 changed files with 4679 additions and 46 deletions

29
db.sql
View File

@@ -4128,6 +4128,7 @@ CREATE TABLE `settings` (
`config_login_key_required` tinyint(1) NOT NULL DEFAULT 0,
`config_login_key_secret` varchar(255) DEFAULT NULL,
`config_login_remember_me_expire` int(11) NOT NULL DEFAULT 3,
`config_login_passkeys` tinyint(1) NOT NULL DEFAULT 1,
`config_log_retention` int(11) NOT NULL DEFAULT 90,
`config_module_enable_ticketing` tinyint(1) NOT NULL DEFAULT 1,
`config_module_enable_purchasing` tinyint(1) NOT NULL DEFAULT 0,
@@ -5322,6 +5323,33 @@ CREATE TABLE `user_invites` (
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci;
/*!40101 SET character_set_client = @saved_cs_client */;
--
-- Table structure for table `user_passkeys`
--
DROP TABLE IF EXISTS `user_passkeys`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
/*!40101 SET character_set_client = utf8mb4 */;
CREATE TABLE `user_passkeys` (
`passkey_id` int(11) NOT NULL AUTO_INCREMENT,
`passkey_user_id` int(11) NOT NULL,
`passkey_name` varchar(200) NOT NULL,
`passkey_credential_id` varchar(1400) NOT NULL,
`passkey_credential_hash` char(64) NOT NULL,
`passkey_public_key` text NOT NULL,
`passkey_sign_count` int(10) unsigned NOT NULL DEFAULT 0,
`passkey_aaguid` char(36) NOT NULL DEFAULT '',
`passkey_transports` varchar(100) NOT NULL DEFAULT '',
`passkey_synced` tinyint(1) NOT NULL DEFAULT 0,
`passkey_vault` varchar(255) NOT NULL DEFAULT '',
`passkey_created_at` datetime NOT NULL DEFAULT current_timestamp(),
`passkey_used_at` datetime DEFAULT NULL,
PRIMARY KEY (`passkey_id`),
UNIQUE KEY `passkey_credential_hash` (`passkey_credential_hash`),
KEY `passkey_user_id` (`passkey_user_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci;
/*!40101 SET character_set_client = @saved_cs_client */;
--
-- Table structure for table `user_role_permissions`
--
@@ -5401,6 +5429,7 @@ CREATE TABLE `users` (
`user_service_account` tinyint(1) NOT NULL DEFAULT 0,
`user_status` tinyint(1) NOT NULL DEFAULT 1,
`user_token` varchar(200) DEFAULT NULL,
`user_passkey_handle` varchar(64) DEFAULT NULL,
`user_password_reset_token` varchar(200) DEFAULT NULL,
`user_password_reset_token_expire` datetime DEFAULT NULL,
`user_avatar` varchar(200) DEFAULT NULL,