Merge branch 'master' into haskafka

This commit is contained in:
Hao Miao
2024-04-01 12:46:06 +08:00
36 changed files with 217 additions and 76 deletions

View File

@@ -35,4 +35,6 @@ public class AlertMessage {
@JsonProperty("alert_message_uuid")
private String alertMessageUUID;
@JsonProperty("protect_object_is_src_dst")
private int protectIsSrcOrDst;
}

View File

@@ -28,4 +28,7 @@ public class ProtectLevel {
@Schema(description = "该防护等级是否需要提取DNS")
private Boolean hasDNS = false;
@Schema(description = "该防护等级是处置防护对象的全流量or单向流量")
private Boolean isFullFlow = false;
}

View File

@@ -13,7 +13,7 @@ public class Template {
@JsonProperty("template_name")
@NotNull(message = "template_name字段不能为空。")
@Schema(description = "防御策略模板名称", example = "自定义模板")
@Schema(description = "防御策略模板名称(事件类型)", example = "APT攻击事件")
private String templateName;
@JsonProperty("source_system")
@@ -21,6 +21,11 @@ public class Template {
@Schema(description = "防御策略模板数据来源系统", example = "BW系统")
private String sourceSystem;
@JsonProperty("description")
@NotNull(message = "source_system字段不能为空。")
@Schema(description = "对策略模板的文字描述。方便用户使用", example = "zd防护对象的全流量")
private String description;
@JsonProperty("protect_level_low")
@NotNull(message = "protect_level_low字段不能为空。")
@Schema(description = "防御策略模板日常态字段提取选项")

View File

@@ -103,4 +103,31 @@ public class TaskCommandInfo {
@Schema(description = "指令所属任务的运行状态", accessMode = Schema.AccessMode.READ_ONLY)
private Integer taskStatus;
// 复制构造函数
public void copyTaskCommandInfo(TaskCommandInfo original) {
this.UUID = original.UUID;
this.taskId = original.taskId;
this.ruleId = original.ruleId;
this.taskCreateUsername = original.taskCreateUsername;
this.taskCreateDepart = original.taskCreateDepart;
this.taskCreateUserId = original.taskCreateUserId;
this.taskName = original.taskName;
this.taskType = original.taskType;
this.taskAct = original.taskAct;
this.frequency = original.frequency;
this.startTime = original.startTime;
this.endTime = original.endTime;
this.isValid = original.isValid;
this.isJudged = original.isJudged;
this.fiveTupleWithMask = original.fiveTupleWithMask;
this.commandSentTimes = original.commandSentTimes;
this.commandSuccessTimes = original.commandSuccessTimes;
this.earliestSendTime = original.earliestSendTime;
this.latestSendTime = original.latestSendTime;
this.templateId = original.templateId;
this.protectLevel = original.protectLevel;
this.taskStatus = original.taskStatus;
}
}

View File

@@ -8,8 +8,10 @@ import com.realtime.protection.configuration.entity.task.TaskCommandInfo;
import com.realtime.protection.configuration.utils.enums.StateEnum;
import com.realtime.protection.configuration.utils.enums.TaskTypeEnum;
import com.realtime.protection.server.command.CommandService;
import lombok.Data;
import org.springframework.stereotype.Service;
import java.util.ArrayList;
import java.util.List;
import java.util.UUID;
@@ -27,45 +29,46 @@ public class AlertMessageService {
}
@DSTransactional
public String processAlertMessage(AlertMessage alertMessage) {
TaskCommandInfo dynamicTaskCommandInfo = generateDynamicCommand(alertMessage);
public void processAlertMessage(AlertMessage alertMessage) {
//根据告警信息——>生成指令
List<TaskCommandInfo> dynamicTaskCommandInfoList = generateDynamicCommand(alertMessage);
//获取任务状态设置指令的isValid字段且是否生成指令入库除了RUNING\PAUSED状态其他都不入库
Integer taskStatus = dynamicTaskCommandInfoList.get(0).getTaskStatus();
//获取任务类型设置指令的isJudged字段。
Integer taskType = dynamicTaskCommandInfoList.get(0).getTaskType();
Integer taskStatus = dynamicTaskCommandInfo.getTaskStatus();
Integer taskType = dynamicTaskCommandInfo.getTaskType();
String alertMessageUUID = null;
if (taskType == TaskTypeEnum.DYNAMIC.getTaskType())//实时
switch (StateEnum.getStateEnumByNum(taskStatus)) {
case RUNNING:
alertMessageUUID = insertCommandAndAlertMessage(dynamicTaskCommandInfo, true, true, alertMessage);
insertCommandAndAlertMessage(dynamicTaskCommandInfoList, true, true, alertMessage);
break;
case PAUSED:
alertMessageUUID = insertCommandAndAlertMessage(dynamicTaskCommandInfo, false, true, alertMessage);
insertCommandAndAlertMessage(dynamicTaskCommandInfoList, false, true, alertMessage);
break;
default://主要是stop
//command不入库
//alertmessage入库
alertMessageUUID = insertAlertMessageOnly(alertMessage);
insertAlertMessageOnly(alertMessage);
break;
}
else if (taskType == TaskTypeEnum.JUDGED.getTaskType())//研判后
switch (StateEnum.getStateEnumByNum(taskStatus)) {
case RUNNING:
alertMessageUUID = insertCommandAndAlertMessage(dynamicTaskCommandInfo, true, false, alertMessage);
insertCommandAndAlertMessage(dynamicTaskCommandInfoList, true, false, alertMessage);
break;
case PAUSED:
alertMessageUUID = insertCommandAndAlertMessage(dynamicTaskCommandInfo, false, false, alertMessage);
insertCommandAndAlertMessage(dynamicTaskCommandInfoList, false, false, alertMessage);
break;
default://主要是stop
//command不入库
//alertmessage入库
alertMessageUUID = insertAlertMessageOnly(alertMessage);
insertAlertMessageOnly(alertMessage);
}
return alertMessageUUID;
}
private TaskCommandInfo generateDynamicCommand(AlertMessage alertMessage){
private List<TaskCommandInfo> generateDynamicCommand(AlertMessage alertMessage){
Long taskId = alertMessage.getTaskId();
Integer DynamicRuleId = alertMessage.getDynamicRuleId();
// 查task信息
@@ -79,20 +82,32 @@ public class AlertMessageService {
ProtectLevel templateProtectLevel = alertMessageMapper.queryTemplateProtectLevel(
dynamicCommandInfo.getTemplateId(),
dynamicCommandInfo.getProtectLevel());
//根据策略模板和alertMessage中的FiveTupleWithMask生成要下发五元组信息
FiveTupleWithMask fiveTupleWithMaskNew = updateFiveTupleWithMask(alertMessage.getFiveTupleWithMask(),
templateProtectLevel);
//指令加入策略模板筛选后的fiveTupleWithMaskNew
dynamicCommandInfo.setFiveTupleWithMask(fiveTupleWithMaskNew);
return dynamicCommandInfo;
//根据策略模板和alertMessage中的FiveTupleWithMask生成要下发五元组信息
//根据策略模板的is_full_flow字段如果是双向流量会生成两个fiveTuple所以返回List
List<FiveTupleWithMask> fiveTupleWithMaskNew = updateFiveTupleWithMask(alertMessage.getFiveTupleWithMask(),
alertMessage.getProtectIsSrcOrDst(), templateProtectLevel);
//根据fiveTuple生成动态指令信息
List<TaskCommandInfo> dynamicCommandInfoList = new ArrayList<TaskCommandInfo>();
if (fiveTupleWithMaskNew.size() == 2){
TaskCommandInfo dynamicCommandInfo_bi = new TaskCommandInfo();
dynamicCommandInfo_bi.copyTaskCommandInfo(dynamicCommandInfo);
dynamicCommandInfo_bi.setFiveTupleWithMask(fiveTupleWithMaskNew.get(1));
dynamicCommandInfoList.add(dynamicCommandInfo_bi);
}
dynamicCommandInfo.setFiveTupleWithMask(fiveTupleWithMaskNew.get(0));
dynamicCommandInfoList.add(dynamicCommandInfo);
return dynamicCommandInfoList;
}
@DSTransactional
private String insertCommandAndAlertMessage(TaskCommandInfo dynamicTaskCommandInfo,
private void insertCommandAndAlertMessage(List<TaskCommandInfo> dynamicTaskCommandInfoList,
Boolean isValid,
Boolean isJudged,
AlertMessage alertMessage){
for (TaskCommandInfo dynamicTaskCommandInfo : dynamicTaskCommandInfoList ){
//command入库
dynamicTaskCommandInfo.setIsValid(isValid);
dynamicTaskCommandInfo.setIsJudged(isJudged);
@@ -103,8 +118,8 @@ public class AlertMessageService {
String alertMessageUUID = UUID.randomUUID().toString();
alertMessage.setAlertMessageUUID(alertMessageUUID);
alertMessageMapper.insertAlertMessage(alertMessage);
}
return alertMessageUUID;
}
private String insertAlertMessageOnly(AlertMessage alertMessage){
//alertmessage入库
@@ -119,31 +134,110 @@ public class AlertMessageService {
private FiveTupleWithMask updateFiveTupleWithMask(FiveTupleWithMask fiveTupleWithMask, ProtectLevel templateProtectLevel) {
private List<FiveTupleWithMask> updateFiveTupleWithMask(FiveTupleWithMask fiveTupleWithMask,
int protectIsSrcOrDst,
ProtectLevel templateProtectLevel) {
//参数是告警信息的FiveTupleWithMask、防护对象是src还是dst、某个安全等级下的安全事件策略模板templateProtectLevel
//首先先从告警信息中获取protectObject和peer
@Data
class CommunicateObject {
private String IP;
private String maskIP;
private String Port;
private String maskPort;
FiveTupleWithMask newFiveTupleWithMask = new FiveTupleWithMask();
newFiveTupleWithMask.copyFiveTupleWithMask(fiveTupleWithMask);
public CommunicateObject(String IP,
String maskIP,
String Port,
String maskPort) {
this.IP = IP;
this.maskIP = maskIP;
this.Port = Port;
this.maskPort = maskPort;
}
}
CommunicateObject protectObject;
CommunicateObject peer;
if (protectIsSrcOrDst == 0) {
protectObject = new CommunicateObject(
fiveTupleWithMask.getSourceIP(),
fiveTupleWithMask.getMaskSourceIP(),
fiveTupleWithMask.getSourcePort(),
fiveTupleWithMask.getMaskSourcePort()
);
peer = new CommunicateObject(
fiveTupleWithMask.getDestinationIP(),
fiveTupleWithMask.getMaskDestinationIP(),
fiveTupleWithMask.getDestinationPort(),
fiveTupleWithMask.getMaskDestinationPort()
);
} else {
protectObject = new CommunicateObject(
fiveTupleWithMask.getDestinationIP(),
fiveTupleWithMask.getMaskDestinationIP(),
fiveTupleWithMask.getDestinationPort(),
fiveTupleWithMask.getMaskDestinationPort()
);
peer = new CommunicateObject(
fiveTupleWithMask.getSourceIP(),
fiveTupleWithMask.getMaskSourceIP(),
fiveTupleWithMask.getSourcePort(),
fiveTupleWithMask.getMaskSourcePort()
);
}
//根据模板抽取防护对象和对端需要的字段
if (!templateProtectLevel.getHasProtectObjectIP()) {
protectObject.setIP(null);
protectObject.setMaskIP(null);
}
if (!templateProtectLevel.getHasProtectObjectPort()) {
protectObject.setPort(null);
protectObject.setMaskPort(null);
}
if (!templateProtectLevel.getHasPeerIP()) {
peer.setIP(null);
peer.setMaskIP(null);
}
if (!templateProtectLevel.getHasPeerPort()) {
peer.setPort(null);
peer.setMaskPort(null);
}
List<FiveTupleWithMask> newFiveTupleWithMask = new ArrayList<FiveTupleWithMask>();
//生成指令
FiveTupleWithMask command1 = new FiveTupleWithMask();
command1.setSourceIP(peer.getIP());
command1.setMaskSourceIP(peer.getMaskIP());
command1.setSourcePort(peer.getPort());
command1.setMaskSourcePort(peer.getMaskPort());
command1.setDestinationIP(protectObject.getIP());
command1.setMaskDestinationIP(protectObject.getMaskIP());
command1.setSourcePort(protectObject.getPort());
command1.setMaskSourcePort(protectObject.getMaskPort());
if (templateProtectLevel.getHasProtocol()){
command1.setProtocol(fiveTupleWithMask.getProtocol());
command1.setProtocol(fiveTupleWithMask.getMaskProtocol());
}
newFiveTupleWithMask.add(command1);
//若需要处置全方向流量,再生成防护对象为源的规则
if(templateProtectLevel.getIsFullFlow()){
FiveTupleWithMask command2 = new FiveTupleWithMask();
if(!templateProtectLevel.getHasProtectObjectIP()){
newFiveTupleWithMask.setDestinationIP(null);
newFiveTupleWithMask.setMaskDestinationIP(null);
command2.setSourceIP(protectObject.getIP());
command2.setMaskSourceIP(protectObject.getMaskIP());
command2.setSourcePort(protectObject.getPort());
command2.setMaskSourcePort(protectObject.getMaskPort());
command2.setDestinationIP(peer.getIP());
command2.setMaskDestinationIP(peer.getMaskIP());
command2.setSourcePort(peer.getPort());
command2.setMaskSourcePort(peer.getMaskPort());
if (templateProtectLevel.getHasProtocol()){
command2.setProtocol(fiveTupleWithMask.getProtocol());
command2.setProtocol(fiveTupleWithMask.getMaskProtocol());
}
if(!templateProtectLevel.getHasProtectObjectPort()){
newFiveTupleWithMask.setDestinationPort(null);
newFiveTupleWithMask.setMaskDestinationPort(null);
}
if(!templateProtectLevel.getHasPeerIP()){
newFiveTupleWithMask.setSourceIP(null);
newFiveTupleWithMask.setMaskSourceIP(null);
}
if(!templateProtectLevel.getHasPeerPort()){
newFiveTupleWithMask.setSourcePort(null);
newFiveTupleWithMask.setMaskSourcePort(null);
}
if (!templateProtectLevel.getHasProtocol()) {
newFiveTupleWithMask.setProtocol(null);
newFiveTupleWithMask.setMaskProtocol(null);
newFiveTupleWithMask.add(command2);
}
//目前告警信息还只是五元组没有url、dns
return newFiveTupleWithMask;
}

View File

@@ -17,7 +17,7 @@ spring:
driver-class-name: com.mysql.cj.jdbc.Driver
username: root
password: aiihhbfcsy123!@#
url: jdbc:mysql://192.168.107.89:3306/realtime_protection
url: jdbc:mysql://192.168.107.89:3306/realtime_protection?serverTimezone=Asia/Shanghai
hikari:
is-auto-commit: false
doris:

View File

@@ -15,7 +15,7 @@ spring:
driver-class-name: com.mysql.cj.jdbc.Driver
username: root
password: aiihhbfcsy123!@#
url: jdbc:mysql://192.168.107.89:3306/realtime_protection
url: jdbc:mysql://192.168.107.89:3306/realtime_protection?serverTimezone=Asia/Shanghai
hikari:
is-auto-commit: false
doris:

View File

@@ -17,7 +17,7 @@ spring:
driver-class-name: com.mysql.cj.jdbc.Driver
username: ${MYSQL_USERNAME:root}
password: ${MYSQL_PASSWD}
url: jdbc:mysql://${MYSQL_URL:localhost:3306}/realtime_protection
url: jdbc:mysql://${MYSQL_URL:localhost:3306}/realtime_protection?serverTimezone=Asia/Shanghai
hikari:
is-auto-commit: false
doris:

View File

@@ -17,7 +17,7 @@ spring:
driver-class-name: com.mysql.cj.jdbc.Driver
username: root
password: aiihhbfcsy123!@#
url: jdbc:mysql://192.168.107.89:3306/realtime_protection
url: jdbc:mysql://192.168.107.89:3306/realtime_protection?serverTimezone=Asia/Shanghai
hikari:
is-auto-commit: false
doris:

View File

@@ -8,20 +8,22 @@
strategy_template_low_level_id, strategy_template_medium_level_id,
strategy_template_high_level_id,
strategy_template_create_user_id, strategy_template_create_username,
strategy_template_create_depart)
strategy_template_create_depart,
strategy_template_description)
VALUE (#{template.templateName}, #{template.sourceSystem},
#{template.protectLevelLow.protectLevelId}, #{template.protectLevelMedium.protectLevelId},
#{template.protectLevelHigh.protectLevelId},
#{template.createUserId}, #{template.createUsername}, #{template.createDepart})
#{template.createUserId}, #{template.createUsername}, #{template.createDepart},
#{template.description})
</insert>
<insert id="newProtectLevel" useGeneratedKeys="true" keyProperty="protectLevelId">
INSERT INTO t_protect_level(has_protect_object_ip, has_protect_object_port,
has_protocol, has_url, has_dns,
has_peer_ip, has_peer_port)
has_peer_ip, has_peer_port, is_full_flow)
VALUE (#{level.hasProtectObjectIP}, #{level.hasProtectObjectPort},
#{level.hasProtocol}, #{level.hasURL}, #{level.hasDNS},
#{level.hasPeerIP}, #{level.hasPeerPort})
#{level.hasPeerIP}, #{level.hasPeerPort}, #{level.isFullFlow})
</insert>
<resultMap id="templateMap" type="com.realtime.protection.configuration.entity.defense.template.Template">
@@ -33,6 +35,7 @@
<result column="strategy_template_used_times" property="usedTimes"/>
<result column="strategy_template_running_tasks" property="runningTasks"/>
<result column="strategy_template_description" property="description"/>
<association property="protectLevelLow"
javaType="com.realtime.protection.configuration.entity.defense.template.ProtectLevel">
@@ -44,6 +47,7 @@
<result column="low_has_protocol" property="hasProtocol"/>
<result column="low_has_url" property="hasURL"/>
<result column="low_has_dns" property="hasDNS"/>
<result column="low_is_full_flow" property="isFullFlow"/>
</association>
<association property="protectLevelMedium"
@@ -56,6 +60,7 @@
<result column="medium_has_protocol" property="hasProtocol"/>
<result column="medium_has_url" property="hasURL"/>
<result column="medium_has_dns" property="hasDNS"/>
<result column="medium_is_full_flow" property="isFullFlow"/>
</association>
<association property="protectLevelHigh"
@@ -69,6 +74,7 @@
<result column="high_has_protocol" property="hasProtocol"/>
<result column="high_has_url" property="hasURL"/>
<result column="high_has_dns" property="hasDNS"/>
<result column="high_is_full_flow" property="isFullFlow"/>
</association>
</resultMap>
@@ -81,6 +87,7 @@
<result column="has_protocol" property="hasProtocol"/>
<result column="has_url" property="hasURL"/>
<result column="has_dns" property="hasDNS"/>
<result column="is_full_flow" property="isFullFlow"/>
</resultMap>
<select id="queryTemplates" resultMap="templateMap">

View File

@@ -1 +1 @@
#userPower{height:calc(100vh - 83px);background:#fff}#userPower .ant-card-body{padding:0!important}#userPower .ant-table-empty{border-bottom:none}#userPower .leftBox{display:inline-block;vertical-align:top;width:20%;height:100%;border:1px solid #e8e8e8;background:#fff;overflow:auto}#userPower .leftBox .search-head{position:relative;height:57px;border-bottom:1px solid #e8e8e8;padding:12px 35px 0 12px}#userPower .leftBox .search-head>i{position:absolute;right:8px;top:18px;font-size:20px;color:#1890ff;cursor:pointer}#userPower .leftBox .companyItem{position:relative;padding:3px 10px 5px 20px;cursor:pointer}#userPower .leftBox .companyItem:hover{background:#f8f8f8}#userPower .leftBox .companyItem:hover .companyDelete,#userPower .leftBox .companyItem:hover .companyEdit{display:block}#userPower .leftBox .companyItem.active{background:#1890ff}#userPower .leftBox .companyItem.active p{color:#fff}#userPower .leftBox .companyItem.active .companyDelete,#userPower .leftBox .companyItem.active .companyEdit{color:#1890ff;background:#fff}#userPower .leftBox .companyItem.active .companyIcon{background:url(../assets/company2.33b66bf6.svg) no-repeat}#userPower .leftBox .companyItem p{margin-bottom:0;width:98%;overflow:hidden;white-space:nowrap;text-overflow:ellipsis}#userPower .leftBox .companyItem p:first-child{font-size:16px;font-weight:600;margin-bottom:0}#userPower .leftBox .companyItem .companyDelete,#userPower .leftBox .companyItem .companyEdit{display:none;position:absolute;width:24px;height:24px;right:10px;top:18px;font-size:14px;color:#fff;cursor:pointer;text-align:center;line-height:26px;background:#1890ff;border-radius:50%}#userPower .leftBox .companyItem .companyDelete{top:55px}#userPower .leftBox .companyItem .companyIcon{display:inline-block;width:16px;height:16px;margin-right:5px;margin-bottom:-2px;background:url(../assets/company1.b48b661f.svg) no-repeat}#userPower .leftBox .companyItem:nth-child(6n){border-bottom:none;padding:5px 10px 3px 20px}#userPower .leftBox .ant-list-item-content{margin:0}#userPower .leftBox .ant-list-pagination{margin:14px 10px 15px 0}#userPower .leftBox .ant-spin-container{border-bottom:1px solid #e8e8e8;overflow:auto}#userPower .leftBox .ant-pagination-item:not(.ant-pagination-item-active){display:none}#userPower .rightBox{display:inline-block;width:80%;height:100%}#userPower .rightBox .ant-card-bordered{border-bottom:none;border-left:none}#userPower .rightBox .table-page-search-wrapper .ant-form-inline>div>div{padding-left:14px!important;padding-right:14px!important}#userPower .rightBox .ant-table-fixed-header .ant-table-scroll .ant-table-header{overflow:hidden!important;padding-bottom:0!important;margin-bottom:0!important}#userPower .rightBox .ant-table-body{overflow-y:auto!important}#userPower .ant-table-thead>tr>th{color:#000}#userPower .table-page-search-wrapper .ant-form-inline .ant-form-item,#userPower .table-page-search-wrapper .table-page-search-submitButtons{margin:5px 12px 5px 12px}#userPower .ant-form-item-label{width:75px}.wwx_userType,.wwx_userType:focus,.wwx_userType:hover{text-decoration:none}.wwx_userType li{color:#5f5f5f;line-height:30px;text-align:center}.wwx_userType li:hover{background:#e6f7ff}#userShow{height:calc(100vh - 83px);background:#fff}#userShow .ant-card-body{padding:0!important}#userShow .ant-card-bordered{border-bottom:none;border-left:none}#userShow .table-page-search-wrapper .ant-form-inline>div>div{padding-left:14px!important;padding-right:14px!important}#userShow .ant-table-fixed-header .ant-table-scroll .ant-table-header{overflow:hidden!important;padding-bottom:0!important;margin-bottom:0!important}#userShow .ant-table-body{overflow:auto!important}#userShow .ant-table-empty{border-bottom:none}#userShow .ant-table-thead>tr>th{color:#000}.wwx_addmodal .ant-modal-body{padding:10px 15px 5px 15px}.wwx_addmodal .ant-table-fixed-header .ant-table-scroll .ant-table-header{overflow:hidden!important;padding-bottom:0!important;margin-bottom:0!important}.wwx_addmodal .ant-table-body{overflow:auto!important}#userAudit{height:calc(100vh - 83px);background:#fff}#userAudit .ant-card-body{padding:0!important}#userAudit .ant-card-bordered{border-bottom:none;border-left:none;border-top:none}#userAudit .table-page-search-wrapper .ant-form-inline>div>div{padding-left:14px!important;padding-right:14px!important}#userAudit .ant-table-fixed-header .ant-table-scroll .ant-table-header{overflow:hidden!important;padding-bottom:0!important;margin-bottom:0!important}#userAudit .ant-table-body{overflow:auto!important}#userAudit .ant-table-empty{border-bottom:none}#userAudit .ant-table-thead>tr>th{color:#000}.spstyle{width:160px;word-break:break-all;overflow:hidden;text-overflow:ellipsis;display:-webkit-box;-webkit-box-orient:vertical;-webkit-line-clamp:2}[data-v-103dc642] .fangyu-form .ant-form-item label{display:inline-block;width:120px}
#userPower{height:calc(100vh - 83px);background:#fff}#userPower .ant-card-body{padding:0!important}#userPower .ant-table-empty{border-bottom:none}#userPower .leftBox{display:inline-block;vertical-align:top;width:20%;height:100%;border:1px solid #e8e8e8;background:#fff;overflow:auto}#userPower .leftBox .search-head{position:relative;height:57px;border-bottom:1px solid #e8e8e8;padding:12px 35px 0 12px}#userPower .leftBox .search-head>i{position:absolute;right:8px;top:18px;font-size:20px;color:#1890ff;cursor:pointer}#userPower .leftBox .companyItem{position:relative;padding:3px 10px 5px 20px;cursor:pointer}#userPower .leftBox .companyItem:hover{background:#f8f8f8}#userPower .leftBox .companyItem:hover .companyDelete,#userPower .leftBox .companyItem:hover .companyEdit{display:block}#userPower .leftBox .companyItem.active{background:#1890ff}#userPower .leftBox .companyItem.active p{color:#fff}#userPower .leftBox .companyItem.active .companyDelete,#userPower .leftBox .companyItem.active .companyEdit{color:#1890ff;background:#fff}#userPower .leftBox .companyItem.active .companyIcon{background:url(../assets/company2.33b66bf6.svg) no-repeat}#userPower .leftBox .companyItem p{margin-bottom:0;width:98%;overflow:hidden;white-space:nowrap;text-overflow:ellipsis}#userPower .leftBox .companyItem p:first-child{font-size:16px;font-weight:600;margin-bottom:0}#userPower .leftBox .companyItem .companyDelete,#userPower .leftBox .companyItem .companyEdit{display:none;position:absolute;width:24px;height:24px;right:10px;top:18px;font-size:14px;color:#fff;cursor:pointer;text-align:center;line-height:26px;background:#1890ff;border-radius:50%}#userPower .leftBox .companyItem .companyDelete{top:55px}#userPower .leftBox .companyItem .companyIcon{display:inline-block;width:16px;height:16px;margin-right:5px;margin-bottom:-2px;background:url(../assets/company1.b48b661f.svg) no-repeat}#userPower .leftBox .companyItem:nth-child(6n){border-bottom:none;padding:5px 10px 3px 20px}#userPower .leftBox .ant-list-item-content{margin:0}#userPower .leftBox .ant-list-pagination{margin:14px 10px 15px 0}#userPower .leftBox .ant-spin-container{border-bottom:1px solid #e8e8e8;overflow:auto}#userPower .leftBox .ant-pagination-item:not(.ant-pagination-item-active){display:none}#userPower .rightBox{display:inline-block;width:80%;height:100%}#userPower .rightBox .ant-card-bordered{border-bottom:none;border-left:none}#userPower .rightBox .table-page-search-wrapper .ant-form-inline>div>div{padding-left:14px!important;padding-right:14px!important}#userPower .rightBox .ant-table-fixed-header .ant-table-scroll .ant-table-header{overflow:hidden!important;padding-bottom:0!important;margin-bottom:0!important}#userPower .rightBox .ant-table-body{overflow-y:auto!important}#userPower .ant-table-thead>tr>th{color:#000}#userPower .table-page-search-wrapper .ant-form-inline .ant-form-item,#userPower .table-page-search-wrapper .table-page-search-submitButtons{margin:5px 12px 5px 12px}#userPower .ant-form-item-label{width:75px}.wwx_userType,.wwx_userType:focus,.wwx_userType:hover{text-decoration:none}.wwx_userType li{color:#5f5f5f;line-height:30px;text-align:center}.wwx_userType li:hover{background:#e6f7ff}#userShow{height:calc(100vh - 83px);background:#fff}#userShow .ant-card-body{padding:0!important}#userShow .ant-card-bordered{border-bottom:none;border-left:none}#userShow .table-page-search-wrapper .ant-form-inline>div>div{padding-left:14px!important;padding-right:14px!important}#userShow .ant-table-fixed-header .ant-table-scroll .ant-table-header{overflow:hidden!important;padding-bottom:0!important;margin-bottom:0!important}#userShow .ant-table-body{overflow:auto!important}#userShow .ant-table-empty{border-bottom:none}#userShow .ant-table-thead>tr>th{color:#000}.wwx_addmodal .ant-modal-body{padding:10px 15px 5px 15px}.wwx_addmodal .ant-table-fixed-header .ant-table-scroll .ant-table-header{overflow:hidden!important;padding-bottom:0!important;margin-bottom:0!important}.wwx_addmodal .ant-table-body{overflow:auto!important}#userAudit{height:calc(100vh - 83px);background:#fff}#userAudit .ant-card-body{padding:0!important}#userAudit .ant-card-bordered{border-bottom:none;border-left:none;border-top:none}#userAudit .table-page-search-wrapper .ant-form-inline>div>div{padding-left:14px!important;padding-right:14px!important}#userAudit .ant-table-fixed-header .ant-table-scroll .ant-table-header{overflow:hidden!important;padding-bottom:0!important;margin-bottom:0!important}#userAudit .ant-table-body{overflow:auto!important}#userAudit .ant-table-empty{border-bottom:none}#userAudit .ant-table-thead>tr>th{color:#000}.spstyle{width:160px;word-break:break-all;overflow:hidden;text-overflow:ellipsis;display:-webkit-box;-webkit-box-orient:vertical;-webkit-line-clamp:2}

View File

@@ -0,0 +1 @@
[data-v-c81458ee] .fangyu-form .ant-form-item label{display:inline-block;width:120px}.tagspanlow[data-v-c81458ee]{background:#97c487;color:#f6ffed;border-radius:5px;font-size:22px;padding:5px 10px}.tagspanmedium[data-v-c81458ee]{background:#fca916;color:#fff7d2;border-radius:5px;font-size:22px;padding:5px 10px}.tagspanhigh[data-v-c81458ee]{background:#f7222d;color:#fff1f0;border-radius:5px;font-size:22px;padding:5px 10px}.tagdiv[data-v-c81458ee]{display:-webkit-box;display:-ms-flexbox;display:flex;margin-left:130px;margin-top:-25px}.custom-tag[data-v-c81458ee],custom-tag1[data-v-c81458ee]{font-size:16px;padding:6px 12px}[data-v-c81458ee].tag-item{margin-right:10px}

View File

@@ -0,0 +1 @@
[data-v-71246e25] .fangyu-form .ant-form-item label{display:inline-block;width:75px}[data-v-71246e25] .addform .ant-form-item label,[data-v-71246e25] .fanghu-form .ant-form-item label{display:inline-block;width:100px}[data-v-71246e25] .fangyu-form1 .ant-form-item label{display:inline-block;width:75px}[data-v-71246e25] .adddform .ant-form-item{margin-left:340px}

File diff suppressed because one or more lines are too long

View File

@@ -0,0 +1 @@
[data-v-103dc642] .fangyu-form .ant-form-item label{display:inline-block;width:120px}

File diff suppressed because one or more lines are too long

View File

@@ -1 +1 @@
.step-form-wrapper[data-v-4a462ef6]{margin:0 auto;width:80%;max-width:400px}.user-layout-login label[data-v-7cdad908]{font-size:14px}.user-layout-login .getCaptcha[data-v-7cdad908]{display:block;width:100%;height:40px}.user-layout-login .forge-password[data-v-7cdad908]{font-size:14px}.user-layout-login button.login-button[data-v-7cdad908]{padding:0 15px;font-size:16px;height:40px;width:100%}.user-layout-login .user-login-other[data-v-7cdad908]{text-align:left;margin-top:24px;line-height:22px}.user-layout-login .user-login-other .item-icon[data-v-7cdad908]{font-size:24px;color:rgba(0,0,0,.2);margin-left:16px;vertical-align:middle;cursor:pointer;-webkit-transition:color .3s;transition:color .3s}.user-layout-login .user-login-other .item-icon[data-v-7cdad908]:hover{color:#1890ff}.user-layout-login .user-login-other .register[data-v-7cdad908]{float:right}.user-register.error{color:red}.user-register.warning{color:#ff7e05}.user-register.success{color:#52c41a}.user-layout-register .ant-input-group-addon:first-child{background-color:#fff}.user-layout-register>h3[data-v-54d9a6c2]{font-size:16px;margin-bottom:20px}.user-layout-register .getCaptcha[data-v-54d9a6c2]{display:block;width:100%;height:40px}.user-layout-register .register-button[data-v-54d9a6c2]{width:50%}.user-layout-register .login[data-v-54d9a6c2]{float:right;line-height:40px}
.step-form-wrapper[data-v-4a462ef6]{margin:0 auto;width:80%;max-width:400px}.user-layout-login label[data-v-0452f05e]{font-size:14px}.user-layout-login .getCaptcha[data-v-0452f05e]{display:block;width:100%;height:40px}.user-layout-login .forge-password[data-v-0452f05e]{font-size:14px}.user-layout-login button.login-button[data-v-0452f05e]{padding:0 15px;font-size:16px;height:40px;width:100%}.user-layout-login .user-login-other[data-v-0452f05e]{text-align:left;margin-top:24px;line-height:22px}.user-layout-login .user-login-other .item-icon[data-v-0452f05e]{font-size:24px;color:rgba(0,0,0,.2);margin-left:16px;vertical-align:middle;cursor:pointer;-webkit-transition:color .3s;transition:color .3s}.user-layout-login .user-login-other .item-icon[data-v-0452f05e]:hover{color:#1890ff}.user-layout-login .user-login-other .register[data-v-0452f05e]{float:right}.user-register.error{color:red}.user-register.warning{color:#ff7e05}.user-register.success{color:#52c41a}.user-layout-register .ant-input-group-addon:first-child{background-color:#fff}.user-layout-register>h3[data-v-54d9a6c2]{font-size:16px;margin-bottom:20px}.user-layout-register .getCaptcha[data-v-54d9a6c2]{display:block;width:100%;height:40px}.user-layout-register .register-button[data-v-54d9a6c2]{width:50%}.user-layout-register .login[data-v-54d9a6c2]{float:right;line-height:40px}

View File

@@ -1 +1 @@
<!DOCTYPE html><html lang="zh-cmn-Hans"><head><meta charset="utf-8"><meta http-equiv="X-UA-Compatible" content="IE=edge"><meta name="viewport" content="width=device-width,initial-scale=1"><title>NSADD 网络安全主动防御与处置系统</title><style>#loading-mask{position:fixed;left:0;top:0;height:100%;width:100%;background:#fff;user-select:none;z-index:9999;overflow:hidden}.loading-wrapper{position:absolute;top:50%;left:50%;transform:translate(-50%,-100%)}.loading-dot{animation:antRotate 1.2s infinite linear;transform:rotate(45deg);position:relative;display:inline-block;font-size:64px;width:64px;height:64px;box-sizing:border-box}.loading-dot i{width:22px;height:22px;position:absolute;display:block;background-color:#1890ff;border-radius:100%;transform:scale(.75);transform-origin:50% 50%;opacity:.3;animation:antSpinMove 1s infinite linear alternate}.loading-dot i:nth-child(1){top:0;left:0}.loading-dot i:nth-child(2){top:0;right:0;-webkit-animation-delay:.4s;animation-delay:.4s}.loading-dot i:nth-child(3){right:0;bottom:0;-webkit-animation-delay:.8s;animation-delay:.8s}.loading-dot i:nth-child(4){bottom:0;left:0;-webkit-animation-delay:1.2s;animation-delay:1.2s}@keyframes antRotate{to{-webkit-transform:rotate(405deg);transform:rotate(405deg)}}@-webkit-keyframes antRotate{to{-webkit-transform:rotate(405deg);transform:rotate(405deg)}}@keyframes antSpinMove{to{opacity:1}}@-webkit-keyframes antSpinMove{to{opacity:1}}</style><link href="/css/chunk-095e1288.e17630d8.css" rel="prefetch"><link href="/css/chunk-2b492edc.f46eb8e2.css" rel="prefetch"><link href="/css/chunk-3ecd8d86.2e6aaa43.css" rel="prefetch"><link href="/css/chunk-47a53442.6bfc5f38.css" rel="prefetch"><link href="/css/chunk-796105ba.c909e251.css" rel="prefetch"><link href="/css/chunk-f74c99b8.de740bbe.css" rel="prefetch"><link href="/css/user.34bb7f05.css" rel="prefetch"><link href="/js/chunk-095e1288.7cd5682d.js" rel="prefetch"><link href="/js/chunk-2b492edc.0a748c0c.js" rel="prefetch"><link href="/js/chunk-3ecd8d86.7a0b7f15.js" rel="prefetch"><link href="/js/chunk-47a53442.2f1d00ee.js" rel="prefetch"><link href="/js/chunk-796105ba.e77e2fed.js" rel="prefetch"><link href="/js/chunk-f74c99b8.66c3dc4c.js" rel="prefetch"><link href="/js/fail.c3972baa.js" rel="prefetch"><link href="/js/user.37e00c30.js" rel="prefetch"><link href="/css/app.dbaca293.css" rel="preload" as="style"><link href="/css/chunk-vendors.4013be7d.css" rel="preload" as="style"><link href="/js/app.e7b0b2b7.js" rel="preload" as="script"><link href="/js/chunk-vendors.e88ceb02.js" rel="preload" as="script"><link href="/css/chunk-vendors.4013be7d.css" rel="stylesheet"><link href="/css/app.dbaca293.css" rel="stylesheet"></head><body><noscript><strong>We're sorry but vue-antd-pro doesn't work properly without JavaScript enabled. Please enable it to continue.</strong></noscript><div id="app"><div id="loading-mask"><div class="loading-wrapper"><span class="loading-dot loading-dot-spin"><i></i><i></i><i></i><i></i></span></div></div></div><script src="/js/chunk-vendors.e88ceb02.js"></script><script src="/js/app.e7b0b2b7.js"></script></body></html>
<!DOCTYPE html><html lang="zh-cmn-Hans"><head><meta charset="utf-8"><meta http-equiv="X-UA-Compatible" content="IE=edge"><meta name="viewport" content="width=device-width,initial-scale=1"><title>NSADD 网络安全主动防御与处置系统</title><style>#loading-mask{position:fixed;left:0;top:0;height:100%;width:100%;background:#fff;user-select:none;z-index:9999;overflow:hidden}.loading-wrapper{position:absolute;top:50%;left:50%;transform:translate(-50%,-100%)}.loading-dot{animation:antRotate 1.2s infinite linear;transform:rotate(45deg);position:relative;display:inline-block;font-size:64px;width:64px;height:64px;box-sizing:border-box}.loading-dot i{width:22px;height:22px;position:absolute;display:block;background-color:#1890ff;border-radius:100%;transform:scale(.75);transform-origin:50% 50%;opacity:.3;animation:antSpinMove 1s infinite linear alternate}.loading-dot i:nth-child(1){top:0;left:0}.loading-dot i:nth-child(2){top:0;right:0;-webkit-animation-delay:.4s;animation-delay:.4s}.loading-dot i:nth-child(3){right:0;bottom:0;-webkit-animation-delay:.8s;animation-delay:.8s}.loading-dot i:nth-child(4){bottom:0;left:0;-webkit-animation-delay:1.2s;animation-delay:1.2s}@keyframes antRotate{to{-webkit-transform:rotate(405deg);transform:rotate(405deg)}}@-webkit-keyframes antRotate{to{-webkit-transform:rotate(405deg);transform:rotate(405deg)}}@keyframes antSpinMove{to{opacity:1}}@-webkit-keyframes antSpinMove{to{opacity:1}}</style><link href="/css/chunk-096551b3.97fde7d0.css" rel="prefetch"><link href="/css/chunk-0a2eda1e.bb26d0cd.css" rel="prefetch"><link href="/css/chunk-30acfa54.0380c747.css" rel="prefetch"><link href="/css/chunk-3ecd8d86.2e6aaa43.css" rel="prefetch"><link href="/css/chunk-855887e8.e17630d8.css" rel="prefetch"><link href="/css/chunk-bf6d3418.338f1e53.css" rel="prefetch"><link href="/css/chunk-fc012f0e.9e4c4ae1.css" rel="prefetch"><link href="/css/user.73c4056c.css" rel="prefetch"><link href="/js/chunk-096551b3.b4992042.js" rel="prefetch"><link href="/js/chunk-0a2eda1e.bd5756d1.js" rel="prefetch"><link href="/js/chunk-30acfa54.9c4f1d98.js" rel="prefetch"><link href="/js/chunk-3ecd8d86.d750f731.js" rel="prefetch"><link href="/js/chunk-855887e8.bb569207.js" rel="prefetch"><link href="/js/chunk-bf6d3418.2c79c08e.js" rel="prefetch"><link href="/js/chunk-fc012f0e.4b9e4f96.js" rel="prefetch"><link href="/js/fail.c3972baa.js" rel="prefetch"><link href="/js/user.2f8f7ebe.js" rel="prefetch"><link href="/css/app.dbaca293.css" rel="preload" as="style"><link href="/css/chunk-vendors.4013be7d.css" rel="preload" as="style"><link href="/js/app.6a12d01e.js" rel="preload" as="script"><link href="/js/chunk-vendors.e88ceb02.js" rel="preload" as="script"><link href="/css/chunk-vendors.4013be7d.css" rel="stylesheet"><link href="/css/app.dbaca293.css" rel="stylesheet"></head><body><noscript><strong>We're sorry but vue-antd-pro doesn't work properly without JavaScript enabled. Please enable it to continue.</strong></noscript><div id="app"><div id="loading-mask"><div class="loading-wrapper"><span class="loading-dot loading-dot-spin"><i></i><i></i><i></i><i></i></span></div></div></div><script src="/js/chunk-vendors.e88ceb02.js"></script><script src="/js/app.6a12d01e.js"></script></body></html>

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@@ -44,6 +44,7 @@ class TemplateServiceTest extends ProtectionApplicationTests {
ProtectLevel protectLevelHigh = new ProtectLevel();
protectLevelHigh.setHasDNS(true);
protectLevelHigh.setIsFullFlow(true);
template.setProtectLevelLow(protectLevelLow);
template.setProtectLevelMedium(protectLevelMedium);
@@ -67,7 +68,7 @@ class TemplateServiceTest extends ProtectionApplicationTests {
System.out.println(e.getMessage());
}
for (int i = 0; i < 100; i++) {
for (int i = 0; i < 10; i++) {
assertThrows(DuplicateKeyException.class, () -> {
Integer templateId = templateService.newTemplate(template);
assertTrue(templateId > 0);