This commit is contained in:
MaxKey 2025-10-05 09:59:53 +08:00
parent cfce5f7b1b
commit 1cb5ab7abd
10 changed files with 3012 additions and 1293 deletions

View File

@ -3,5 +3,4 @@ create database if not exists `maxkey` /*!40100 DEFAULT CHARACTER SET utf8mb4 C
use maxkey ;
source /docker-entrypoint-initdb.d/latest/maxkey.sql ;
source /docker-entrypoint-initdb.d/latest/maxkey_data.sql ;

File diff suppressed because one or more lines are too long

View File

@ -15,7 +15,7 @@
# */
#maxkey properties
group =org.dromara.maxkey
version =4.1.8
version =4.1.9
vendor =https://www.maxkey.top
author =MaxKeyTop
githubUrl =https://github.com/dromara/MaxKey

View File

@ -1,7 +1,7 @@
#端口号
application:
name: maxkey-gateway-server
formatted-version: v4.1.8 GA
formatted-version: v4.1.9 GA
server:
port: 9000
spring:

View File

@ -88,6 +88,13 @@ maxkey.ipaddress.whitelist =false
#notices show
maxkey.notices.visible =false
############################################################################
# Passkey Configuration #
############################################################################
maxkey.passkey.enabled=true
maxkey.passkey.relying-party.name=MaxKey
maxkey.passkey.relying-party.id=localhost
maxkey.passkey.relying-party.allowed-origins=http://localhost:8527,http://localhost:8080,http://localhost
############################################################################
#ssl configuration #
############################################################################
#server.ssl.key-store=maxkeyserver.keystore

View File

@ -16,7 +16,7 @@
#MaxKey Title and Version #
############################################################################
application.title =MaxKey
application.formatted-version =v4.1.8 GA
application.formatted-version =v4.1.9 GA
#for dynamic service discovery
spring.application.name =maxkey
############################################################################
@ -28,11 +28,3 @@ spring.main.banner-mode =log
#spring.profiles.active maxkey #
############################################################################
spring.profiles.active =${SERVER_PROFILES:maxkey}
############################################################################
# Passkey Configuration #
############################################################################
maxkey.passkey.enabled=true
maxkey.passkey.relying-party.name=MaxKey
maxkey.passkey.relying-party.id=localhost
maxkey.passkey.relying-party.allowed-origins=http://localhost:8527,http://localhost:8080

View File

@ -16,7 +16,7 @@
#MaxKey Title and Version #
############################################################################
application.title =MaxKey-Mgt
application.formatted-version =v4.1.8 GA
application.formatted-version =v4.1.9 GA
#for dynamic service discovery
spring.application.name =maxkey-mgt
############################################################################

View File

@ -16,7 +16,7 @@
#MaxKey Title and Version #
############################################################################
application.title =MaxKey-OpenApi
application.formatted-version =v4.1.8 GA
application.formatted-version =v4.1.9 GA
#for dynamic service discovery
spring.application.name =maxkey-openapi
############################################################################

View File

@ -1,52 +0,0 @@
-- MaxKey Passkey 模块数据库表创建脚本
-- 创建用户 Passkey 表和挑战表
-- 用户 Passkey 表
CREATE TABLE IF NOT EXISTS mxk_user_passkeys (
id VARCHAR(40) NOT NULL COMMENT '主键ID',
user_id VARCHAR(40) NOT NULL COMMENT '用户ID',
credential_id VARCHAR(500) NOT NULL COMMENT '凭据IDBase64编码',
public_key TEXT NOT NULL COMMENT '公钥数据Base64编码',
display_name VARCHAR(100) COMMENT '显示名称',
device_type VARCHAR(50) DEFAULT 'unknown' COMMENT '设备类型',
signature_count BIGINT DEFAULT 0 COMMENT '签名计数器',
created_date DATETIME NOT NULL COMMENT '创建时间',
last_used_date DATETIME COMMENT '最后使用时间',
aaguid VARCHAR(100) COMMENT 'AAGUID',
inst_id VARCHAR(40) DEFAULT '1' COMMENT '机构ID',
status INT DEFAULT 1 COMMENT '状态1-正常0-禁用',
PRIMARY KEY (id),
UNIQUE KEY uk_credential_id (credential_id),
KEY idx_user_id (user_id),
KEY idx_inst_id (inst_id),
KEY idx_created_date (created_date)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='用户Passkey凭据表';
-- Passkey 挑战表
CREATE TABLE IF NOT EXISTS mxk_passkey_challenges (
id VARCHAR(40) NOT NULL COMMENT '挑战ID',
user_id VARCHAR(40) COMMENT '用户ID认证时可为空',
challenge TEXT NOT NULL COMMENT '挑战数据Base64编码',
challenge_type VARCHAR(20) NOT NULL COMMENT '挑战类型REGISTRATION-注册AUTHENTICATION-认证',
created_date DATETIME NOT NULL COMMENT '创建时间',
expires_date DATETIME NOT NULL COMMENT '过期时间',
status INT DEFAULT 0 COMMENT '状态0-未使用1-已使用',
inst_id VARCHAR(40) DEFAULT '1' COMMENT '机构ID',
PRIMARY KEY (id),
KEY idx_user_id (user_id),
KEY idx_challenge_type (challenge_type),
KEY idx_expires_date (expires_date),
KEY idx_inst_id (inst_id),
KEY idx_status (status)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='Passkey挑战表';
-- 创建索引以优化查询性能
CREATE INDEX idx_user_passkeys_user_status ON mxk_user_passkeys(user_id, status);
CREATE INDEX idx_passkey_challenges_expires_status ON mxk_passkey_challenges(expires_date, status);
CREATE INDEX idx_passkey_challenges_user_type ON mxk_passkey_challenges(user_id, challenge_type);
-- 插入示例数据(可选)
-- INSERT INTO mxk_user_passkeys (id, user_id, credential_id, public_key, display_name, device_type, signature_count, created_date, inst_id)
-- VALUES ('test_passkey_1', 'test_user_1', 'test_credential_id_1', 'test_public_key_1', 'Test Device', 'platform', 0, NOW(), '1');
COMMIT;