1、protocolnum解決
2、docker run 時間同步
This commit is contained in:
@@ -18,5 +18,6 @@ docker build -t protection_springboot -f realtime_protection/docker-springboot/D
|
|||||||
echo "============built backend servers============"
|
echo "============built backend servers============"
|
||||||
|
|
||||||
# 使用privileged模式,在中心部署时不会遭遇Java内存异常错误
|
# 使用privileged模式,在中心部署时不会遭遇Java内存异常错误
|
||||||
docker run --privileged -itd --name springboot_backend -p 8081:8081 protection_springboot
|
#增加-v /etc/localtime:/etc/localtime -v /etc/timezone:/etc/timezone,使容器时间与宿主机时间一致
|
||||||
|
docker run -v /etc/localtime:/etc/localtime -v /etc/timezone:/etc/timezone --privileged -itd --name springboot_backend -p 8081:8081 protection_springboot
|
||||||
echo "============started backend servers============"
|
echo "============started backend servers============"
|
||||||
@@ -281,6 +281,7 @@ public class TaskService {
|
|||||||
|
|
||||||
@Transactional
|
@Transactional
|
||||||
public Boolean updateTask(Task task) {
|
public Boolean updateTask(Task task) {
|
||||||
|
//未审核不能修改
|
||||||
if (!Objects.equals(taskMapper.queryTaskAuditStatus(task.getTaskId()), AuditStatusEnum.AUDITED.getNum())) {
|
if (!Objects.equals(taskMapper.queryTaskAuditStatus(task.getTaskId()), AuditStatusEnum.AUDITED.getNum())) {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
@@ -368,7 +369,8 @@ public class TaskService {
|
|||||||
List<TaskCommandInfo> staticCommandInfos = taskMapper.getStaticCommandInfos(taskId);
|
List<TaskCommandInfo> staticCommandInfos = taskMapper.getStaticCommandInfos(taskId);
|
||||||
|
|
||||||
staticCommandInfos.forEach(taskCommandInfo -> {
|
staticCommandInfos.forEach(taskCommandInfo -> {
|
||||||
taskCommandInfo.setProtocolNum();
|
// taskCommandInfo.setProtocolNum();
|
||||||
|
taskCommandInfo.getFiveTupleWithMask().setProtocolNum(Integer.valueOf(taskCommandInfo.getFiveTupleWithMask().getProtocol()));
|
||||||
// taskCommandInfo.setMask();
|
// taskCommandInfo.setMask();
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|||||||
@@ -15,7 +15,7 @@
|
|||||||
DEFAULT,
|
DEFAULT,
|
||||||
#{info.fiveTupleWithMask.sourceIP}, #{info.fiveTupleWithMask.sourcePort},
|
#{info.fiveTupleWithMask.sourceIP}, #{info.fiveTupleWithMask.sourcePort},
|
||||||
#{info.fiveTupleWithMask.destinationIP}, #{info.fiveTupleWithMask.destinationPort},
|
#{info.fiveTupleWithMask.destinationIP}, #{info.fiveTupleWithMask.destinationPort},
|
||||||
#{info.fiveTupleWithMask.protocolNum},
|
#{info.fiveTupleWithMask.protocol},
|
||||||
#{info.fiveTupleWithMask.maskSourceIP}, #{info.fiveTupleWithMask.maskSourcePort},
|
#{info.fiveTupleWithMask.maskSourceIP}, #{info.fiveTupleWithMask.maskSourcePort},
|
||||||
#{info.fiveTupleWithMask.maskDestinationIP}, #{info.fiveTupleWithMask.maskDestinationPort},
|
#{info.fiveTupleWithMask.maskDestinationIP}, #{info.fiveTupleWithMask.maskDestinationPort},
|
||||||
#{info.fiveTupleWithMask.maskProtocol},
|
#{info.fiveTupleWithMask.maskProtocol},
|
||||||
@@ -41,7 +41,7 @@
|
|||||||
DEFAULT,
|
DEFAULT,
|
||||||
#{info.fiveTupleWithMask.sourceIP}, #{info.fiveTupleWithMask.sourcePort},
|
#{info.fiveTupleWithMask.sourceIP}, #{info.fiveTupleWithMask.sourcePort},
|
||||||
#{info.fiveTupleWithMask.destinationIP}, #{info.fiveTupleWithMask.destinationPort},
|
#{info.fiveTupleWithMask.destinationIP}, #{info.fiveTupleWithMask.destinationPort},
|
||||||
#{info.fiveTupleWithMask.protocolNum},
|
#{info.fiveTupleWithMask.protocol},
|
||||||
#{info.fiveTupleWithMask.maskSourceIP}, #{info.fiveTupleWithMask.maskSourcePort},
|
#{info.fiveTupleWithMask.maskSourceIP}, #{info.fiveTupleWithMask.maskSourcePort},
|
||||||
#{info.fiveTupleWithMask.maskDestinationIP}, #{info.fiveTupleWithMask.maskDestinationPort},
|
#{info.fiveTupleWithMask.maskDestinationIP}, #{info.fiveTupleWithMask.maskDestinationPort},
|
||||||
#{info.fiveTupleWithMask.maskProtocol},
|
#{info.fiveTupleWithMask.maskProtocol},
|
||||||
@@ -64,7 +64,7 @@
|
|||||||
DEFAULT,
|
DEFAULT,
|
||||||
#{info.fiveTupleWithMask.sourceIP}, #{info.fiveTupleWithMask.sourcePort},
|
#{info.fiveTupleWithMask.sourceIP}, #{info.fiveTupleWithMask.sourcePort},
|
||||||
#{info.fiveTupleWithMask.destinationIP}, #{info.fiveTupleWithMask.destinationPort},
|
#{info.fiveTupleWithMask.destinationIP}, #{info.fiveTupleWithMask.destinationPort},
|
||||||
#{info.fiveTupleWithMask.protocolNum},
|
#{info.fiveTupleWithMask.protocol},
|
||||||
#{info.fiveTupleWithMask.maskSourceIP}, #{info.fiveTupleWithMask.maskSourcePort},
|
#{info.fiveTupleWithMask.maskSourceIP}, #{info.fiveTupleWithMask.maskSourcePort},
|
||||||
#{info.fiveTupleWithMask.maskDestinationIP}, #{info.fiveTupleWithMask.maskDestinationPort},
|
#{info.fiveTupleWithMask.maskDestinationIP}, #{info.fiveTupleWithMask.maskDestinationPort},
|
||||||
#{info.fiveTupleWithMask.maskProtocol},
|
#{info.fiveTupleWithMask.maskProtocol},
|
||||||
@@ -511,6 +511,9 @@
|
|||||||
<if test="command.sourcePort != null">
|
<if test="command.sourcePort != null">
|
||||||
and white_list_port = CAST(#{command.sourcePort} AS UNSIGNED)
|
and white_list_port = CAST(#{command.sourcePort} AS UNSIGNED)
|
||||||
</if>
|
</if>
|
||||||
|
<if test="command.protocol != null">
|
||||||
|
and white_list_protocol = #{command.protocol}
|
||||||
|
</if>
|
||||||
|
|
||||||
)
|
)
|
||||||
</if>
|
</if>
|
||||||
@@ -529,6 +532,9 @@
|
|||||||
or (white_list_ip = INET_ATON(#{command.destinationIP})
|
or (white_list_ip = INET_ATON(#{command.destinationIP})
|
||||||
<if test="command.destinationPort != null">
|
<if test="command.destinationPort != null">
|
||||||
and white_list_port = CAST(#{command.destinationPort} AS UNSIGNED)
|
and white_list_port = CAST(#{command.destinationPort} AS UNSIGNED)
|
||||||
|
</if>
|
||||||
|
<if test="command.protocol != null">
|
||||||
|
and white_list_protocol = #{command.protocol}
|
||||||
</if>)
|
</if>)
|
||||||
</if>
|
</if>
|
||||||
<if test="command.destinationIP != null and command.maskDestinationIP != null">
|
<if test="command.destinationIP != null and command.maskDestinationIP != null">
|
||||||
@@ -536,6 +542,9 @@
|
|||||||
(INET_ATON(#{command.destinationIP}) & INET_ATON(#{command.maskDestinationIP}))
|
(INET_ATON(#{command.destinationIP}) & INET_ATON(#{command.maskDestinationIP}))
|
||||||
<if test="command.destinationPort != null">
|
<if test="command.destinationPort != null">
|
||||||
and white_list_port = CAST(#{command.destinationPort} AS UNSIGNED)
|
and white_list_port = CAST(#{command.destinationPort} AS UNSIGNED)
|
||||||
|
</if>
|
||||||
|
<if test="command.protocol != null">
|
||||||
|
and white_list_protocol = #{command.protocol}
|
||||||
</if>)
|
</if>)
|
||||||
</if>
|
</if>
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user