diff --git a/apps/daxpay-admin/src/api/system/security.api.ts b/apps/daxpay-admin/src/api/system/security.api.ts index e4bea6195..078ff0f96 100644 --- a/apps/daxpay-admin/src/api/system/security.api.ts +++ b/apps/daxpay-admin/src/api/system/security.api.ts @@ -60,18 +60,6 @@ export const SecurityApi = { updateTwoFactorAuthConfig(data: TwoFactorAuthConfig): Promise> { return defHttp.post({ url: '/platform/config/security/two-factor-auth/update', data }); }, - /** - * 获取异常登录检测配置 - */ - getAnomalyDetectionConfig(): Promise> { - return defHttp.get({ url: '/platform/config/security/anomaly-detection/get' }); - }, - /** - * 更新异常登录检测配置 - */ - updateAnomalyDetectionConfig(data: AnomalyDetectionConfig): Promise> { - return defHttp.post({ url: '/platform/config/security/anomaly-detection/update', data }); - }, }; /** @@ -131,6 +119,8 @@ export interface SessionManagementConfig { enabled?: boolean; /** 最大在线时长(小时) */ maxOnlineHours?: number; + /** 最大活跃时长(小时),0表示不限制 */ + activeTimeoutHours?: number; /** 最大并发会话数 */ maxConcurrentSessions?: number; /** 并发策略 */ @@ -148,23 +138,3 @@ export interface TwoFactorAuthConfig { /** 备用码数量 */ backupCodesCount?: number; } - -/** - * 异常登录检测配置 - */ -export interface AnomalyDetectionConfig { - /** 是否启用 */ - enabled?: boolean; - /** 是否检测异常IP */ - detectAnomalousIp?: boolean; - /** IP风险阈值 */ - ipRiskThreshold?: number; - /** 是否检测异常时间 */ - detectAnomalousTime?: boolean; - /** 时间偏差阈值 */ - timeDeviationThreshold?: number; - /** 是否检测异常设备 */ - detectAnomalousDevice?: boolean; - /** 检测到异常时是否阻止 */ - blockOnAnomaly?: boolean; -} diff --git a/apps/daxpay-admin/src/locales/langs/en-US/system/security/anomaly-detection.json b/apps/daxpay-admin/src/locales/langs/en-US/system/security/anomaly-detection.json deleted file mode 100644 index 951b01dfa..000000000 --- a/apps/daxpay-admin/src/locales/langs/en-US/system/security/anomaly-detection.json +++ /dev/null @@ -1,53 +0,0 @@ -{ - "title": "Anomaly Detection", - "description": "Detect and block anomalous login behaviors", - "summary": { - "enabled": "Detection enabled", - "disabled": "Detection disabled", - "ipDetectionEnabled": "IP detection enabled, threshold {threshold} points", - "ipDetectionDisabled": "IP detection disabled", - "timeDetectionEnabled": "Time detection enabled, deviation threshold {hours} hours", - "timeDetectionDisabled": "Time detection disabled", - "deviceDetectionEnabled": "Device detection enabled", - "deviceDetectionDisabled": "Device detection disabled", - "blockEnabled": "Anomalous login will be blocked", - "blockDisabled": "Anomalous login will only alert" - }, - "section": { - "basic": "Basic Settings", - "ipDetection": "IP Detection", - "timeDetection": "Time Detection", - "deviceDetection": "Device Detection", - "blockStrategy": "Block Strategy" - }, - "enabled": { - "label": "Enable Anomaly Detection", - "desc": "When enabled, the system will detect anomalous login behaviors." - }, - "detectAnomalousIp": { - "label": "Detect Anomalous IP", - "desc": "Detect if login IP has risks, such as proxy IP or high-risk regions." - }, - "ipRiskThreshold": { - "label": "IP Risk Threshold", - "desc": "IP risk score above this threshold is considered anomalous.", - "placeholder": "Enter IP risk threshold" - }, - "detectAnomalousTime": { - "label": "Detect Anomalous Login Time", - "desc": "Detect if login time deviates from user's typical login hours." - }, - "timeDeviationThreshold": { - "label": "Time Deviation Threshold", - "desc": "Login time deviation from user's typical hours above this threshold is considered anomalous.", - "placeholder": "Enter time deviation threshold" - }, - "detectAnomalousDevice": { - "label": "Detect Anomalous Device", - "desc": "Detect if login device is user's commonly used device." - }, - "blockOnAnomaly": { - "label": "Block on Anomaly", - "desc": "When enabled, anomalous login will be blocked; when disabled, only alerts will be recorded." - } -} diff --git a/apps/daxpay-admin/src/locales/langs/zh-CN/system/security/anomaly-detection.json b/apps/daxpay-admin/src/locales/langs/zh-CN/system/security/anomaly-detection.json deleted file mode 100644 index 10faa6414..000000000 --- a/apps/daxpay-admin/src/locales/langs/zh-CN/system/security/anomaly-detection.json +++ /dev/null @@ -1,53 +0,0 @@ -{ - "title": "异常登录检测", - "description": "检测并拦截异常登录行为", - "summary": { - "enabled": "检测已启用", - "disabled": "检测未启用", - "ipDetectionEnabled": "IP检测已启用,阈值 {threshold} 分", - "ipDetectionDisabled": "IP检测未启用", - "timeDetectionEnabled": "时间检测已启用,偏离阈值 {hours} 小时", - "timeDetectionDisabled": "时间检测未启用", - "deviceDetectionEnabled": "设备检测已启用", - "deviceDetectionDisabled": "设备检测未启用", - "blockEnabled": "异常登录将拦截", - "blockDisabled": "异常登录仅告警" - }, - "section": { - "basic": "基础设置", - "ipDetection": "IP检测", - "timeDetection": "时间检测", - "deviceDetection": "设备检测", - "blockStrategy": "拦截策略" - }, - "enabled": { - "label": "启用异常登录检测", - "desc": "开启后,系统将检测异常登录行为。" - }, - "detectAnomalousIp": { - "label": "检测异常IP", - "desc": "检测登录IP是否存在风险,如代理IP、高风险地区等。" - }, - "ipRiskThreshold": { - "label": "IP风险阈值", - "desc": "IP风险评分超过该阈值时视为异常。", - "placeholder": "请输入IP风险阈值" - }, - "detectAnomalousTime": { - "label": "检测异常登录时间", - "desc": "检测登录时间是否偏离用户习惯的登录时段。" - }, - "timeDeviationThreshold": { - "label": "登录时间偏离阈值", - "desc": "登录时间偏离用户习惯时段超过该阈值时视为异常。", - "placeholder": "请输入时间偏离阈值" - }, - "detectAnomalousDevice": { - "label": "检测异常设备", - "desc": "检测登录设备是否为用户常用设备。" - }, - "blockOnAnomaly": { - "label": "检测到异常登录时拦截", - "desc": "开启后,检测到异常登录将直接拦截;关闭则仅记录告警。" - } -} diff --git a/apps/daxpay-admin/src/views/system/config/security/SecurityConfig.vue b/apps/daxpay-admin/src/views/system/config/security/SecurityConfig.vue index 511132a41..09c4bf363 100644 --- a/apps/daxpay-admin/src/views/system/config/security/SecurityConfig.vue +++ b/apps/daxpay-admin/src/views/system/config/security/SecurityConfig.vue @@ -3,7 +3,6 @@ import { $t } from '#/locales'; - import AnomalyDetection from './components/AnomalyDetection.vue'; import LoginSecurity from './components/LoginSecurity.vue'; import PasswordPolicy from './components/PasswordPolicy.vue'; import SessionManagement from './components/SessionManagement.vue'; @@ -28,13 +27,6 @@ // 登录安全描述 description: $t('system.security.login-security.description'), }, - { - key: 'anomalyDetection', - // 异常登录检测标题 - label: $t('system.security.anomaly-detection.title'), - // 异常登录检测描述 - description: $t('system.security.anomaly-detection.description'), - }, { key: 'sessionManagement', // 会话管理标题 @@ -80,7 +72,6 @@
-
diff --git a/apps/daxpay-admin/src/views/system/config/security/components/AnomalyDetection.vue b/apps/daxpay-admin/src/views/system/config/security/components/AnomalyDetection.vue deleted file mode 100644 index 9e2047d45..000000000 --- a/apps/daxpay-admin/src/views/system/config/security/components/AnomalyDetection.vue +++ /dev/null @@ -1,413 +0,0 @@ - - - - -