diff --git a/src/main/java/com/nis/domain/restful/MmFileDigestLog.java b/src/main/java/com/nis/domain/restful/MmFileDigestLog.java new file mode 100644 index 0000000..35dd74f --- /dev/null +++ b/src/main/java/com/nis/domain/restful/MmFileDigestLog.java @@ -0,0 +1,71 @@ +package com.nis.domain.restful; + +import com.nis.domain.LogEntity; +import com.wordnik.swagger.annotations.ApiModelProperty; + +/** + * @ClassName:MmFileDigestLog + * @Description:TODO(这里用一句话描述这个类的作用) + * @author zdx + * @date 2018年10月9日 下午6:55:48 + * @version V1.0 + */ +public class MmFileDigestLog extends LogEntity { + private static final long serialVersionUID = -6491462762322051638L; + @ApiModelProperty(value="节目ID", required=true) + protected String pid; + @ApiModelProperty(value="节目访问地址", required=true) + protected String url; + @ApiModelProperty(value="封堵现场片段路径", required=true) + protected String logUri; + @ApiModelProperty(value="入口页面", required=true) + protected String referer; + @ApiModelProperty(value="有害级别", required=true) + protected Integer level; + @ApiModelProperty(value="封堵类型", required=true) + protected Integer fdType; + @ApiModelProperty(value="协议", required=true) + protected String protocol; + public String getPid() { + return pid; + } + public void setPid(String pid) { + this.pid = pid; + } + public String getUrl() { + return url; + } + public void setUrl(String url) { + this.url = url; + } + public String getLogUri() { + return logUri; + } + public void setLogUri(String logUri) { + this.logUri = logUri; + } + public String getReferer() { + return referer; + } + public void setReferer(String referer) { + this.referer = referer; + } + public Integer getLevel() { + return level; + } + public void setLevel(Integer level) { + this.level = level; + } + public Integer getFdType() { + return fdType; + } + public void setFdType(Integer fdType) { + this.fdType = fdType; + } + public String getProtocol() { + return protocol; + } + public void setProtocol(String protocol) { + this.protocol = protocol; + } +} diff --git a/src/main/java/com/nis/domain/restful/NtcBgpLog.java b/src/main/java/com/nis/domain/restful/NtcBgpLog.java index 8fd0583..ddfe970 100644 --- a/src/main/java/com/nis/domain/restful/NtcBgpLog.java +++ b/src/main/java/com/nis/domain/restful/NtcBgpLog.java @@ -1,6 +1,7 @@ package com.nis.domain.restful; import com.nis.domain.LogEntity; +import com.wordnik.swagger.annotations.ApiModelProperty; /** * @@ -13,6 +14,30 @@ import com.nis.domain.LogEntity; public class NtcBgpLog extends LogEntity { private static final long serialVersionUID = -990806269407561021L; - - + @ApiModelProperty(value="BGP消息类型", required=true) + protected Integer type; + @ApiModelProperty(value="自治系统号", required=true) + protected String asNumber; + @ApiModelProperty(value="路由信息", required=true) + protected String route; + + public void setType(Integer type) { + this.type = type; + } + public Integer getType() { + return type; + } + public void setAsNumber(String asNumber) { + this.asNumber = asNumber; + } + public String getAsNumber() { + return asNumber; + } + public void setRoute(String route) { + this.route = route; + } + public String getRoute() { + return route; + } + } diff --git a/src/main/java/com/nis/domain/restful/NtcDdosLog.java b/src/main/java/com/nis/domain/restful/NtcDdosLog.java index 6b426f8..1bd10d8 100644 --- a/src/main/java/com/nis/domain/restful/NtcDdosLog.java +++ b/src/main/java/com/nis/domain/restful/NtcDdosLog.java @@ -31,6 +31,8 @@ public class NtcDdosLog extends LogEntity { protected String attackTotalByte; @ApiModelProperty(value = "攻击流量是否被丢弃", required = true) protected Integer isBlcok; + + protected String searchIsBlcok; //攻击流量是否被丢弃 public Integer getAttackType() { return attackType; } @@ -80,4 +82,11 @@ public class NtcDdosLog extends LogEntity { this.isBlcok = isBlcok; } + public String getSearchIsBlcok() { + return searchIsBlcok; + } + + public void setSearchIsBlcok(String searchIsBlcok) { + this.searchIsBlcok = searchIsBlcok; + } } diff --git a/src/main/java/com/nis/domain/restful/NtcStreamMediaLog.java b/src/main/java/com/nis/domain/restful/NtcStreamMediaLog.java new file mode 100644 index 0000000..d18f8fe --- /dev/null +++ b/src/main/java/com/nis/domain/restful/NtcStreamMediaLog.java @@ -0,0 +1,31 @@ +package com.nis.domain.restful; + +import com.nis.domain.LogEntity; +import com.wordnik.swagger.annotations.ApiModelProperty; + +/** + * @ClassName:NtcStreamMediaLog + * @Description:TODO(这里用一句话描述这个类的作用) + * @author zdx + * @date 2018年10月9日 下午6:33:11 + * @version V1.0 + */ +public class NtcStreamMediaLog extends LogEntity { + private static final long serialVersionUID = 8993339583170276251L; + @ApiModelProperty(value="节目访问地址", required=true) + protected String url; + @ApiModelProperty(value="传输协议", required=true) + protected String protocol; + public String getUrl() { + return url; + } + public void setUrl(String url) { + this.url = url; + } + public String getProtocol() { + return protocol; + } + public void setProtocol(String protocol) { + this.protocol = protocol; + } +} diff --git a/src/main/java/com/nis/domain/restful/NtcVoipLog.java b/src/main/java/com/nis/domain/restful/NtcVoipLog.java new file mode 100644 index 0000000..40da9f4 --- /dev/null +++ b/src/main/java/com/nis/domain/restful/NtcVoipLog.java @@ -0,0 +1,70 @@ +package com.nis.domain.restful; + +import com.nis.domain.LogEntity; +import com.wordnik.swagger.annotations.ApiModelProperty; + +/** + * + * @ClassName:NtcVoipLog + * @Description:TODO(这里用一句话描述这个类的作用) + * @author zdx + * @date 2018年10月9日 下午6:30:10 + * @version V1.0 + */ +public class NtcVoipLog extends LogEntity { + private static final long serialVersionUID = -1868408809534973479L; + @ApiModelProperty(value="VOIP通话时长(秒)", required=true) + protected String duation; + @ApiModelProperty(value="VOIP协议", required=true) + protected String voipProtocol; + @ApiModelProperty(value="主叫VOIP账号", required=true) + protected String callingAccount; + @ApiModelProperty(value="被叫VOIP账号", required=true) + protected String calledAccount; + @ApiModelProperty(value="VOIP主叫电信号码", required=true) + protected String callingNumber; + @ApiModelProperty(value="VOIP被叫电信号码", required=true) + protected String calledNumber; + /** + * @return the voipProtocol + */ + public String getVoipProtocol() { + return voipProtocol; + } + /** + * @param voipProtocol the voipProtocol to set + */ + public void setVoipProtocol(String voipProtocol) { + this.voipProtocol = voipProtocol; + } + public String getDuation() { + return duation; + } + public void setDuation(String duation) { + this.duation = duation; + } + public String getCallingAccount() { + return callingAccount; + } + public void setCallingAccount(String callingAccount) { + this.callingAccount = callingAccount; + } + public String getCalledAccount() { + return calledAccount; + } + public void setCalledAccount(String calledAccount) { + this.calledAccount = calledAccount; + } + public String getCallingNumber() { + return callingNumber; + } + public void setCallingNumber(String callingNumber) { + this.callingNumber = callingNumber; + } + public String getCalledNumber() { + return calledNumber; + } + public void setCalledNumber(String calledNumber) { + this.calledNumber = calledNumber; + } +} diff --git a/src/main/java/com/nis/web/controller/restful/MmLogSearchController.java b/src/main/java/com/nis/web/controller/restful/MmLogSearchController.java index 938d49a..af0634c 100644 --- a/src/main/java/com/nis/web/controller/restful/MmLogSearchController.java +++ b/src/main/java/com/nis/web/controller/restful/MmLogSearchController.java @@ -8,6 +8,7 @@ import java.util.Map; import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletResponse; +import org.apache.ibatis.annotations.Delete; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.ui.Model; import org.springframework.web.bind.annotation.RequestMapping; @@ -19,6 +20,7 @@ import com.nis.domain.Page; import com.nis.domain.restful.MmAvIpLog; import com.nis.domain.restful.MmAvUrlLog; import com.nis.domain.restful.MmFaceRecognizationLog; +import com.nis.domain.restful.MmFileDigestLog; import com.nis.domain.restful.MmLogoDetectionLog; import com.nis.domain.restful.MmPicIpLog; import com.nis.domain.restful.MmPicUrlLog; @@ -275,7 +277,7 @@ public class MmLogSearchController extends BaseRestController { return serviceLogResponse(auditLogThread, System.currentTimeMillis() - start, request, "图片URL日志检索成功", logPage, 0); } - + @Deprecated @RequestMapping(value = "/mmVoipIpLogs", method = RequestMethod.GET) @ApiOperation(value = "VoIP IP日志查询", httpMethod = "GET", notes = "对日志功能“VoIP IP日志”提供数据基础查询服务") public Map mmVoipIpLogs(Page page, MmVoipIpLog mmVoipIpLog, Model model, HttpServletRequest request, @@ -329,6 +331,7 @@ public class MmLogSearchController extends BaseRestController { return serviceLogResponse(auditLogThread, System.currentTimeMillis() - start, request, "VoIP IP日志检索成功", logPage, 0); } + @Deprecated @RequestMapping(value = "/mmVoipAccountLogs", method = RequestMethod.GET) @ApiOperation(value = "VoIP Account日志查询", httpMethod = "GET", notes = "对日志功能“VoIP Account日志”提供数据基础查询服务") public Map mmVoipAccountLogs(Page page, MmVoipAccountLog mmVoipLog, Model model, HttpServletRequest request, @@ -865,6 +868,60 @@ public class MmLogSearchController extends BaseRestController { logPage, 0); } + @RequestMapping(value = "/mmFileDigestLogs", method = RequestMethod.GET) + @ApiOperation(value = "文件摘要日志查询", httpMethod = "GET", notes = "对日志功能“文件摘要日志”提供数据基础查询服务") + public Map mmFileDigestLogs(Page page, MmFileDigestLog mmFileDigestLog, Model model, HttpServletRequest request, + HttpServletResponse response) { + long start = System.currentTimeMillis(); + AuditLogThread auditLogThread = super.saveRequestLog(servicesRequestLogService, Constants.OPACTION_GET, + request, null); + + Page logPage = null; + try { + resetTime(mmFileDigestLog); + ntcLogService.queryConditionCheck(auditLogThread, start, mmFileDigestLog, MmFileDigestLog.class, page); + logPage = new Page(); + logPage.setPageNo(page.getPageNo()); + logPage.setPageSize(page.getPageSize()); + String orderBy = ""; + if (null != page.getOrderBy() && !page.getOrderBy().equals("")) { + orderBy = Page.getOrderBySql(MmFileDigestLog.class.getSimpleName(), page.getOrderBy()); + } else { + orderBy = "found_Time"; + } + String sql = HiveSqlService.getSql(page, mmFileDigestLog, + getTableName(MmFileDigestLog.class.getSimpleName() + "HiveTable", "MM_FILE_DIGEST_LOG"), + getCol2Col(), orderBy, null); + Map> tableMapping = new LogJDBCByDruid().tableMapping(page, null, sql, MmFileDigestLog.class, "foundTime", + "recvTime"); + if (tableMapping == null) { + logPage.setList(new ArrayList()); + } else { + List list = tableMapping.get("obj"); + if (list.size() > 0) { + String jsonString = JsonMapper.toJsonString(list); + List List = (java.util.List) JsonMapper.fromJsonList(jsonString, + MmFileDigestLog.class); + logPage.setList(List); + logPage.setCount(List.size()); + + } else { + logPage.setList(new ArrayList()); + } + } + } catch (Exception e) { + e.printStackTrace(); + auditLogThread.setExceptionInfo(e.getMessage() + " " + e.getCause()); + logger.error(e); + if (!(e instanceof RestServiceException)) { + e = new RestServiceException(auditLogThread, System.currentTimeMillis() - start, "文件摘要日志检索失败"); + } + throw ((RestServiceException) e); + } + return serviceLogResponse(auditLogThread, System.currentTimeMillis() - start, request, "文件摘要日志检索成功", + logPage, 0); + } + /** *判断开始和结束时间是否为null,如果为null则初始化时间 * @param entity diff --git a/src/main/java/com/nis/web/controller/restful/NtcLogSearchController.java b/src/main/java/com/nis/web/controller/restful/NtcLogSearchController.java index 7033157..2112d00 100644 --- a/src/main/java/com/nis/web/controller/restful/NtcLogSearchController.java +++ b/src/main/java/com/nis/web/controller/restful/NtcLogSearchController.java @@ -31,6 +31,8 @@ import com.nis.domain.restful.NtcP2pLog; import com.nis.domain.restful.NtcPptpLog; import com.nis.domain.restful.NtcSshLog; import com.nis.domain.restful.NtcSslLog; +import com.nis.domain.restful.NtcStreamMediaLog; +import com.nis.domain.restful.NtcVoipLog; import com.nis.restful.RestServiceException; import com.nis.util.Configurations; import com.nis.util.Constants; @@ -968,7 +970,115 @@ public class NtcLogSearchController extends BaseRestController { return serviceLogResponse(auditLogThread, System.currentTimeMillis() - start, request, "BGP日志检索成功", ntcBgpLogPage, 0); } + + @RequestMapping(value = "/ntcVoipLogs", method = RequestMethod.GET) + @ApiOperation(value = "NTC VoIP日志查询", httpMethod = "GET", notes = "对日志功能“NTC VoIP日志”提供数据基础查询服务") + public Map ntcVoipLogs(Page page, NtcVoipLog ntcVoipLog, Model model, HttpServletRequest request, + HttpServletResponse response) { + long start = System.currentTimeMillis(); + AuditLogThread auditLogThread = super.saveRequestLog(servicesRequestLogService, Constants.OPACTION_GET, + request, null); + + Page logPage = null; + try { + resetTime(ntcVoipLog); + ntcLogService.queryConditionCheck(auditLogThread, start, ntcVoipLog, NtcVoipLog.class, page); + logPage = new Page(); + logPage.setPageNo(page.getPageNo()); + logPage.setPageSize(page.getPageSize()); + String orderBy = ""; + if (null != page.getOrderBy() && !page.getOrderBy().equals("")) { + orderBy = Page.getOrderBySql(NtcVoipLog.class.getSimpleName(), page.getOrderBy()); + } else { + orderBy = "found_Time"; + } + String sql = HiveSqlService.getSql(page, ntcVoipLog, + getTableName(NtcVoipLog.class.getSimpleName() + "HiveTable", "NTC_VOIP_LOG"), + getCol2Col(), orderBy, null); + Map> tableMapping = new LogJDBCByDruid().tableMapping(page, null, sql, NtcVoipLog.class, "foundTime", + "recvTime"); + if (tableMapping == null) { + logPage.setList(new ArrayList()); + } else { + List list = tableMapping.get("obj"); + if (list.size() > 0) { + String jsonString = JsonMapper.toJsonString(list); + List List = (java.util.List) JsonMapper.fromJsonList(jsonString, + NtcVoipLog.class); + logPage.setList(List); + logPage.setCount(List.size()); + + } else { + logPage.setList(new ArrayList()); + } + } + } catch (Exception e) { + e.printStackTrace(); + auditLogThread.setExceptionInfo(e.getMessage() + " " + e.getCause()); + logger.error(e); + if (!(e instanceof RestServiceException)) { + e = new RestServiceException(auditLogThread, System.currentTimeMillis() - start, "NTC VoIP日志检索失败"); + } + throw ((RestServiceException) e); + } + return serviceLogResponse(auditLogThread, System.currentTimeMillis() - start, request, "NTC VoIP日志检索成功", + logPage, 0); + } + @RequestMapping(value = "/ntcStreamMediaLogs", method = RequestMethod.GET) + @ApiOperation(value = "流媒体协议日志查询", httpMethod = "GET", notes = "对日志功能“流媒体协议日志”提供数据基础查询服务") + public Map ntcStreamMediaLogs(Page page, NtcStreamMediaLog ntcStreamMediaLog, Model model, HttpServletRequest request, + HttpServletResponse response) { + long start = System.currentTimeMillis(); + AuditLogThread auditLogThread = super.saveRequestLog(servicesRequestLogService, Constants.OPACTION_GET, + request, null); + + Page logPage = null; + try { + resetTime(ntcStreamMediaLog); + ntcLogService.queryConditionCheck(auditLogThread, start, ntcStreamMediaLog, NtcStreamMediaLog.class, page); + logPage = new Page(); + logPage.setPageNo(page.getPageNo()); + logPage.setPageSize(page.getPageSize()); + String orderBy = ""; + if (null != page.getOrderBy() && !page.getOrderBy().equals("")) { + orderBy = Page.getOrderBySql(NtcStreamMediaLog.class.getSimpleName(), page.getOrderBy()); + } else { + orderBy = "found_Time"; + } + String sql = HiveSqlService.getSql(page, ntcStreamMediaLog, + getTableName(NtcStreamMediaLog.class.getSimpleName() + "HiveTable", "NTC_STREAM_MEDIA_LOG"), + getCol2Col(), orderBy, null); + Map> tableMapping = new LogJDBCByDruid().tableMapping(page, null, sql, NtcStreamMediaLog.class, "foundTime", + "recvTime"); + if (tableMapping == null) { + logPage.setList(new ArrayList()); + } else { + List list = tableMapping.get("obj"); + if (list.size() > 0) { + String jsonString = JsonMapper.toJsonString(list); + List List = (java.util.List) JsonMapper.fromJsonList(jsonString, + NtcStreamMediaLog.class); + logPage.setList(List); + logPage.setCount(List.size()); + + } else { + logPage.setList(new ArrayList()); + } + } + } catch (Exception e) { + e.printStackTrace(); + auditLogThread.setExceptionInfo(e.getMessage() + " " + e.getCause()); + logger.error(e); + if (!(e instanceof RestServiceException)) { + e = new RestServiceException(auditLogThread, System.currentTimeMillis() - start, "流媒体协议日志检索失败"); + } + throw ((RestServiceException) e); + } + return serviceLogResponse(auditLogThread, System.currentTimeMillis() - start, request, "流媒体协议日志检索成功", + logPage, 0); + } + /** *判断开始和结束时间是否为null,如果为null则初始化时间 * @param entity diff --git a/src/main/java/com/nis/web/dao/DfLogSearchDao.xml b/src/main/java/com/nis/web/dao/DfLogSearchDao.xml index f797db7..29c4739 100644 --- a/src/main/java/com/nis/web/dao/DfLogSearchDao.xml +++ b/src/main/java/com/nis/web/dao/DfLogSearchDao.xml @@ -1024,12 +1024,6 @@ - - - - - - @@ -1132,25 +1126,102 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/src/main/resources/applicationConfig-rule.properties b/src/main/resources/applicationConfig-rule.properties index 4a9ce06..0806cb2 100644 --- a/src/main/resources/applicationConfig-rule.properties +++ b/src/main/resources/applicationConfig-rule.properties @@ -20,7 +20,7 @@ ##回流 0x60 96 loop ##白名单 0x80 128 whitelist -service=1:128;2:128;16:16;17:16;18:16;19:16;20:16;21:16;22:16;23:16;24:16;26:16;27:16;30:16;31:16;32:16;33:16;34:16;35:16;36:16;37:16;128:1;129:1;130:1;131:1;132:1;133:1;134:1;135:1;136:1;137:1;138:1;139:1;140:1;142:1;143:1;144:1;145:1;146:1;147:1;148:1;149:1;256:128;257:128;258:16;259:16;260:16;267:16;271:16;272:16;384:1;385:1;386:1;387:1;388:1;395:1;512:1;513:1;514:64;515:64;517:80;521:128;528:48;544:2;560:80;576:16;592:1;750:128;768:96;1024:1;1025:1;1026:1;1027:1;1028:1;1029:1;1030:1;1040:32;1041:32;1042:32;1056:64;1057:64;1058:64;1059:64;1060:64;1152:1 +service=1:128;2:128;16:16;17:16;18:16;19:16;20:16;21:16;22:16;23:16;24:16;26:16;27:16;30:16;31:16;32:16;33:16;34:16;35:16;36:16;37:16;38:16;39:16;128:1;129:1;130:1;131:1;132:1;133:1;134:1;135:1;136:1;137:1;138:1;139:1;140:1;142:1;143:1;144:1;145:1;146:1;147:1;148:1;149:1;150:1;151:1;256:128;257:128;258:16;259:16;260:16;267:16;271:16;272:16;273:16;384:1;385:1;386:1;387:1;388:1;395:1;399:1;512:1;513:1;514:64;515:64;517:80;521:128;528:48;544:2;560:80;576:16;592:1;750:128;768:96;1024:1;1025:1;1026:1;1027:1;1028:1;1029:1;1030:1;1040:32;1041:32;1042:32;1056:64;1057:64;1058:64;1059:64;1060:64;1152:1 #0x1E 0x8E 有问题:14:NTC_XMPP_REGION,NTC_XMPP_CONT 无表结构 不确定表是不是字符串类 @@ -67,7 +67,11 @@ service=1:128;2:128;16:16;17:16;18:16;19:16;20:16;21:16;22:16;23:16;24:16;26:16; 36=10:APP_COMPILE;11:APP_GROUP;12:NTC_UNIVERSAL_IP;13:NTC_UNIVERSAL_PROTO_TYPE;14:APP_POLICY,APP_SUBSCRIBE_ID;18:NTC_IP_RANGE #0x25 ASN IP阻断 37=10:NTC_COMPILE;11:NTC_GROUP;12:NTC_ASN_IP;18:NTC_IP_RANGE - +#0x26 VoIP协议阻断 +38=10:NTC_COMPILE;11:NTC_GROUP;12:NTC_UNIVERSAL_IP;13:NTC_UNIVERSAL_PROTO_TYPE;14:NTC_VOIP_ACCOUNT,NTC_SUBSCRIBE_ID;18:NTC_IP_RANGE +#0x27 流媒体协议阻断 +39=10:NTC_COMPILE;11:NTC_GROUP;12:NTC_UNIVERSAL_IP;13:NTC_UNIVERSAL_PROTO_TYPE;14:NTC_STREAMING_MEDIA_URL,NTC_SUBSCRIBE_ID;18:NTC_IP_RANGE + #0x80 IP地址监测 128=10:NTC_COMPILE;11:NTC_GROUP;12:NTC_IP;14:NTC_SUBSCRIBE_ID;18:NTC_IP_RANGE @@ -111,6 +115,10 @@ service=1:128;2:128;16:16;17:16;18:16;19:16;20:16;21:16;22:16;23:16;24:16;26:16; 148=10:APP_COMPILE;11:APP_GROUP;12:NTC_UNIVERSAL_IP;13:NTC_UNIVERSAL_PROTO_TYPE;14:APP_POLICY,APP_SUBSCRIBE_ID;18:NTC_IP_RANGE #0x95 ASN IP监测 149=10:NTC_COMPILE;11:NTC_GROUP;12:NTC_ASN_IP;14:NTC_SUBSCRIBE_ID;18:NTC_IP_RANGE +#0x96 VoIP协议阻断 +150=10:NTC_COMPILE;11:NTC_GROUP;12:NTC_UNIVERSAL_IP;13:NTC_UNIVERSAL_PROTO_TYPE;14:NTC_VOIP_ACCOUNT,NTC_SUBSCRIBE_ID;18:NTC_IP_RANGE +#0x97 流媒体协议阻断 +151=10:NTC_COMPILE;11:NTC_GROUP;12:NTC_UNIVERSAL_IP;13:NTC_UNIVERSAL_PROTO_TYPE;14:NTC_STREAMING_MEDIA_URL,NTC_SUBSCRIBE_ID;18:NTC_IP_RANGE #0xA0 通联关系监测 monit 无配置 #0xA1 邮件泛收 monit 无配置 @@ -132,6 +140,8 @@ service=1:128;2:128;16:16;17:16;18:16;19:16;20:16;21:16;22:16;23:16;24:16;26:16; 271=10:MM_COMPILE;11:MM_GROUP;12:MM_AV_IP;14:MM_SUBSCRIBE_ID;18:NTC_IP_RANGE #0x110 基于音视频传输的URL阻断 272=10:MM_COMPILE;11:MM_GROUP;14:MM_AV_URL,MM_SUBSCRIBE_ID;18:NTC_IP_RANGE +#0X111 文件摘要配置 阻断 +273=10:MM_COMPILE;11:MM_GROUP;14:MM_SUBSCRIBE_ID;16:MM_FILE_DIGEST;18:NTC_IP_RANGE #0x180 基于音视频传输的IP PORT监测 384=10:MM_COMPILE;11:MM_GROUP;12:MM_AV_IP;14:MM_SUBSCRIBE_ID;18:NTC_IP_RANGE @@ -145,6 +155,8 @@ service=1:128;2:128;16:16;17:16;18:16;19:16;20:16;21:16;22:16;23:16;24:16;26:16; 388=10:MM_COMPILE;11:MM_GROUP;12:MM_VOIP_IP;14:MM_SUBSCRIBE_ID;18:NTC_IP_RANGE #0x18B 基于VOIP-ACCOUNT监测 395=10:MM_COMPILE;11:MM_GROUP;14:MM_VOIP_ACCOUNT,MM_SUBSCRIBE_ID;18:NTC_IP_RANGE +#0X18F 文件摘要配置监测 +399=10:MM_COMPILE;11:MM_GROUP;14:MM_SUBSCRIBE_ID;16:MM_FILE_DIGEST;18:NTC_IP_RANGE #0x200 PXY拦截IP 512=10:PXY_INTERCEPT_COMPILE;11:PXY_INTERCEPT_GROUP;12:PXY_INTERCEPT_IP;14:PXY_CRTL_SUBSCRIBE_ID;18:NTC_IP_RANGE @@ -294,7 +306,7 @@ unMaatService=3:32;4:96;5:32;25:32;28:32;64;65;261:16;262:16;263:16;264:16;265:1 ##回调类配置 #0x340 IP复用地址池配置(回调)832:2,4,5 ########## -serviceDBIndex=1:2,3,4,5;2:2,3,4,5;16:2;17:2;18:2;19:2;20:2;21:2;22:2;23:2;24:2;26:2;27:2;30:2;31:2;32:2;33:2,5;34:2;35:2;36:2;37:2;128:2;129:2;130:2;131:2;132:2;133:2;134:2;135:2;136:2;137:2;138:2;139:2;140:2;142:2;143:2;144:2;145:2;146:2;147:2;148:2;149:2;256:2;257:2;258:2;259:2;260:2;267:2;271:2;272:2;384:2;385:2;386:2;387:2;388:2;395:2;512:4,5;513:4,2,5;514:4;515:4;517:4;520:4;521:4;528:4;544:4;560:4;576:4;592:4;608:4;750:4;768:4;1024:2;1025:2;1026:2,5;1027:2;1028:2,5;1029:2;1030:2;1040:2;1041:2;1042:2;1152:2;3:5;4:5;5:2;25:5;28:5;64:2;65:2;261:3;262:3;263:3;264:3;265:2;266:2;268:3;269:3;270:3;389:3;390:3;391:3;392:3;393:2;394:2;396:3;397:3;398:3;832:2,4,5; +serviceDBIndex=1:2,3,4,5;2:2,3,4,5;16:2;17:2;18:2;19:2;20:2;21:2;22:2;23:2;24:2;26:2;27:2;30:2;31:2;32:2;33:2,5;34:2;35:2;36:2;37:2;38:2;39:2;128:2;129:2;130:2;131:2;132:2;133:2;134:2;135:2;136:2;137:2;138:2;139:2;140:2;142:2;143:2;144:2;145:2;146:2;147:2;148:2;149:2;150:2;151:2;256:2;257:2;258:2;259:2;260:2;267:2;271:2;272:2;273:2;384:2;385:2;386:2;387:2;388:2;395:2;399:2;512:4,5;513:4,2,5;514:4;515:4;517:4;520:4;521:4;528:4;544:4;560:4;576:4;592:4;608:4;750:4;768:4;1024:2;1025:2;1026:2,5;1027:2;1028:2,5;1029:2;1030:2;1040:2;1041:2;1042:2;1152:2;3:5;4:5;5:2;25:5;28:5;64:2;65:2;261:3;262:3;263:3;264:3;265:2;266:2;268:3;269:3;270:3;389:3;390:3;391:3;392:3;393:2;394:2;396:3;397:3;398:3;832:2,4,5; ##阀门配置在redisdb的序号 tapRedisDb=5 diff --git a/src/main/resources/applicationConfig-rule.ysp.properties b/src/main/resources/applicationConfig-rule.ysp.properties index 0bd89cd..b15f14d 100644 --- a/src/main/resources/applicationConfig-rule.ysp.properties +++ b/src/main/resources/applicationConfig-rule.ysp.properties @@ -20,7 +20,7 @@ ##回流 0x60 96 loop ##白名单 0x80 128 whitelist -service=1:128;2:128;16:16;17:16;18:16;19:16;20:16;21:16;22:16;23:16;24:16;26:16;27:16;30:16;31:16;32:16;33:16;34:16;35:16;36:16;37:16;128:1;129:1;130:1;131:1;132:1;133:1;134:1;135:1;136:1;137:1;138:1;139:1;140:1;142:1;143:1;144:1;145:1;146:1;147:1;148:1;149:1;256:128;257:128;258:16;259:16;260:16;267:16;271:16;272:16;384:1;385:1;386:1;387:1;388:1;395:1;512:1;513:1;514:64;515:64;517:80;521:128;528:48;544:2;560:80;576:16;592:1;750:128;768:96;1024:1;1025:1;1026:1;1027:1;1028:1;1029:1;1030:1;1040:32;1041:32;1042:32;1056:64;1057:64;1058:64;1059:64;1060:64;1152:1 +service=1:128;2:128;16:16;17:16;18:16;19:16;20:16;21:16;22:16;23:16;24:16;26:16;27:16;30:16;31:16;32:16;33:16;34:16;35:16;36:16;37:16;38:16;39:16;128:1;129:1;130:1;131:1;132:1;133:1;134:1;135:1;136:1;137:1;138:1;139:1;140:1;142:1;143:1;144:1;145:1;146:1;147:1;148:1;149:1;150:1;151:1;256:128;257:128;258:16;259:16;260:16;267:16;271:16;272:16;273:16;384:1;385:1;386:1;387:1;388:1;395:1;399:1;512:1;513:1;514:64;515:64;517:80;521:128;528:48;544:2;560:80;576:16;592:1;750:128;768:96;1024:1;1025:1;1026:1;1027:1;1028:1;1029:1;1030:1;1040:32;1041:32;1042:32;1056:64;1057:64;1058:64;1059:64;1060:64;1152:1 #0x1E 0x8E 有问题:14:NTC_XMPP_REGION,NTC_XMPP_CONT 无表结构 不确定表是不是字符串类 @@ -67,7 +67,10 @@ service=1:128;2:128;16:16;17:16;18:16;19:16;20:16;21:16;22:16;23:16;24:16;26:16; 36=10:APP_COMPILE;11:APP_GROUP;12:NTC_UNIVERSAL_IP;13:NTC_UNIVERSAL_PROTO_TYPE;14:APP_POLICY,APP_SUBSCRIBE_ID;18:NTC_IP_RANGE #0x25 ASN IP阻断 37=10:NTC_COMPILE;11:NTC_GROUP;12:NTC_ASN_IP;18:NTC_IP_RANGE - +#0x26 VoIP协议阻断 +38=10:NTC_COMPILE;11:NTC_GROUP;12:NTC_UNIVERSAL_IP;13:NTC_UNIVERSAL_PROTO_TYPE;14:NTC_VOIP_ACCOUNT,NTC_SUBSCRIBE_ID;18:NTC_IP_RANGE +#0x27 流媒体协议阻断 +39=10:NTC_COMPILE;11:NTC_GROUP;12:NTC_UNIVERSAL_IP;13:NTC_UNIVERSAL_PROTO_TYPE;14:NTC_STREAMING_MEDIA_URL,NTC_SUBSCRIBE_ID;18:NTC_IP_RANGE #0x80 IP地址监测 128=10:NTC_COMPILE;11:NTC_GROUP;12:NTC_IP;14:NTC_SUBSCRIBE_ID;18:NTC_IP_RANGE @@ -111,6 +114,10 @@ service=1:128;2:128;16:16;17:16;18:16;19:16;20:16;21:16;22:16;23:16;24:16;26:16; 148=10:APP_COMPILE;11:APP_GROUP;12:NTC_UNIVERSAL_IP;13:NTC_UNIVERSAL_PROTO_TYPE;14:APP_POLICY,APP_SUBSCRIBE_ID;18:NTC_IP_RANGE #0x95 ASN IP监测 149=10:NTC_COMPILE;11:NTC_GROUP;12:NTC_ASN_IP;14:NTC_SUBSCRIBE_ID;18:NTC_IP_RANGE +#0x96 VoIP协议阻断 +150=10:NTC_COMPILE;11:NTC_GROUP;12:NTC_UNIVERSAL_IP;13:NTC_UNIVERSAL_PROTO_TYPE;14:NTC_VOIP_ACCOUNT,NTC_SUBSCRIBE_ID;18:NTC_IP_RANGE +#0x97 流媒体协议阻断 +151=10:NTC_COMPILE;11:NTC_GROUP;12:NTC_UNIVERSAL_IP;13:NTC_UNIVERSAL_PROTO_TYPE;14:NTC_STREAMING_MEDIA_URL,NTC_SUBSCRIBE_ID;18:NTC_IP_RANGE #0xA0 通联关系监测 monit 无配置 #0xA1 邮件泛收 monit 无配置 @@ -132,6 +139,8 @@ service=1:128;2:128;16:16;17:16;18:16;19:16;20:16;21:16;22:16;23:16;24:16;26:16; 271=10:MM_COMPILE;11:MM_GROUP;12:MM_AV_IP;14:MM_SUBSCRIBE_ID;18:NTC_IP_RANGE #0x110 基于音视频传输的URL阻断 272=10:MM_COMPILE;11:MM_GROUP;14:MM_AV_URL,MM_SUBSCRIBE_ID;18:NTC_IP_RANGE +#0X111 文件摘要配置 阻断 +273=10:MM_COMPILE;11:MM_GROUP;14:MM_SUBSCRIBE_ID;16:MM_FILE_DIGEST;18:NTC_IP_RANGE #0x180 基于音视频传输的IP PORT监测 384=10:MM_COMPILE;11:MM_GROUP;12:MM_AV_IP;14:MM_SUBSCRIBE_ID;18:NTC_IP_RANGE @@ -145,6 +154,8 @@ service=1:128;2:128;16:16;17:16;18:16;19:16;20:16;21:16;22:16;23:16;24:16;26:16; 388=10:MM_COMPILE;11:MM_GROUP;12:MM_VOIP_IP;14:MM_SUBSCRIBE_ID;18:NTC_IP_RANGE #0x18B 基于VOIP-ACCOUNT监测 395=10:MM_COMPILE;11:MM_GROUP;14:MM_VOIP_ACCOUNT,MM_SUBSCRIBE_ID;18:NTC_IP_RANGE +#0X18F 文件摘要配置监测 +399=10:MM_COMPILE;11:MM_GROUP;14:MM_SUBSCRIBE_ID;16:MM_FILE_DIGEST;18:NTC_IP_RANGE #0x200 PXY拦截IP 512=10:PXY_INTERCEPT_COMPILE;11:PXY_INTERCEPT_GROUP;12:PXY_INTERCEPT_IP;14:PXY_CRTL_SUBSCRIBE_ID;18:NTC_IP_RANGE @@ -294,7 +305,7 @@ unMaatService=3:32;4:96;5:32;25:32;28:32;64;65;261:16;262:16;263:16;264:16;265:1 ##回调类配置 #0x340 IP复用地址池配置(回调)832:2,4,5 ########## -serviceDBIndex=1:2,3,4,5;2:2,3,4,5;16:2;17:2;18:2;19:2;20:2;21:2;22:2;23:2;24:2;26:2;27:2;30:2;31:2;32:2;33:2,5;34:2;35:2;36:2;37:2;128:2;129:2;130:2;131:2;132:2;133:2;134:2;135:2;136:2;137:2;138:2;139:2;140:2;142:2;143:2;144:2;145:2;146:2;147:2;148:2;149:2;256:2;257:2;258:2;259:2;260:2;267:2;271:2;272:2;384:2;385:2;386:2;387:2;388:2;395:2;512:4,5;513:4,2,5;514:4;515:4;517:4;520:4;521:4;528:4;544:4;560:4;576:4;592:4;608:4;750:4;768:4;1024:2;1025:2;1026:2,5;1027:2;1028:2,5;1029:2;1030:2;1040:2;1041:2;1042:2;1152:2;3:5;4:5;5:2;25:5;28:5;64:2;65:2;261:8;262:9;263:10;264:11;265:2;266:2;268:3;269:3;270:3;389:8;390:9;391:10;392:11;393:2;394:2;396:3;397:3;398:3;832:2,4,5; +serviceDBIndex=1:2,3,4,5;2:2,3,4,5;16:2;17:2;18:2;19:2;20:2;21:2;22:2;23:2;24:2;26:2;27:2;30:2;31:2;32:2;33:2,5;34:2;35:2;36:2;37:2;38:2;39:2;128:2;129:2;130:2;131:2;132:2;133:2;134:2;135:2;136:2;137:2;138:2;139:2;140:2;142:2;143:2;144:2;145:2;146:2;147:2;148:2;149:2;150:2;151:2;256:2;257:2;258:2;259:2;260:2;267:2;271:2;272:2;384:2;385:2;386:2;387:2;388:2;395:2;512:4,5;513:4,2,5;514:4;515:4;517:4;520:4;521:4;528:4;544:4;560:4;576:4;592:4;608:4;750:4;768:4;1024:2;1025:2;1026:2,5;1027:2;1028:2,5;1029:2;1030:2;1040:2;1041:2;1042:2;1152:2;3:5;4:5;5:2;25:5;28:5;64:2;65:2;261:8;262:9;263:10;264:11;265:2;266:2;268:3;269:3;270:3;389:8;390:9;391:10;392:11;393:2;394:2;396:3;397:3;398:3;832:2,4,5; ##阀门配置在redisdb的序号 tapRedisDb=5 diff --git a/src/main/resources/applicationLog-hive.properties b/src/main/resources/applicationLog-hive.properties index 4930397..de67e5f 100644 --- a/src/main/resources/applicationLog-hive.properties +++ b/src/main/resources/applicationLog-hive.properties @@ -31,7 +31,9 @@ PxyHttpLogHiveTable=PXY_HTTP_LOG MmFaceRecognizationLogHiveTable=MM_FACE_RECOGNIZATION_LOG MmLogoDetectionLogHiveTable=MM_LOGO_DETECTION_LOG MmSpeakerRecognizationLogHiveTable=MM_SPEAKER_RECOGNIZATION_LOG - +NtcVoipLogHiveTable=NTC_VOIP_LOG +NtcStreamMediaLogHiveTable=NTC_STREAM_MEDIA_LOG +MmFileDigestLogHiveTable=MM_FILE_DIGEST_LOG diff --git a/src/main/resources/commonSources/applicationConfig-parser.schema.xsd b/src/main/resources/commonSources/applicationConfig-parser.schema.xsd index 4f10c1b..8102034 100644 --- a/src/main/resources/commonSources/applicationConfig-parser.schema.xsd +++ b/src/main/resources/commonSources/applicationConfig-parser.schema.xsd @@ -45,8 +45,12 @@ - + + + + + diff --git a/src/main/resources/commonSources/applicationConfig-parser.xml b/src/main/resources/commonSources/applicationConfig-parser.xml index 232b06a..0aac91a 100644 --- a/src/main/resources/commonSources/applicationConfig-parser.xml +++ b/src/main/resources/commonSources/applicationConfig-parser.xml @@ -9,9 +9,8 @@ #0x04 IP地址丢弃 4=0:INLINE_IP_CB #0x19 IPSec丢弃 25=0:INLINE_IP_CB #0x1C GRE 丢弃 28=0:INLINE_IP_CB - #0x05 DDOS流量丢弃 5=0:DDOS_PROTECT_TARGET_IP_CB --> - + @@ -29,6 +28,28 @@ + + + + + + + + + + + + + + + + + + + + - + 25=0:INLINE_IP_CB #0x1C GRE 丢弃 28=0:INLINE_IP_CB --> + EFFECTIVE_RULE;:;{un_maat_table_name};,;[cfg_id] [cfg_id];\t;0;\t;[addr_type];\t;[src_ip];\t;[mask_src_ip];\t;[src_port];\t;[mask_src_port];\t;[dst_ip];\t;[mask_dst_ip];\t;[dst_port];\t;[mask_dst_port];\t;[protocol];\t;[direction];\t;[is_valid];\t;[action];\t;[service];\t;[op_time]; 0;\n @@ -73,6 +73,27 @@ MAAT_VERSION_TIMER + + + + EFFECTIVE_RULE;:;{un_maat_table_name};,;[cfg_id] + [cfg_id];\t;0;\t;[addr_type];\t;[src_ip];\t;[mask_src_ip];\t;[src_port];\t;[mask_src_port];\t;[dst_ip];\t;[mask_dst_ip];\t;[dst_port];\t;[mask_dst_port];\t;[protocol];\t;[direction];\t;[is_valid];\t;[action];\t;[service];\t;[op_time];\t;[user_region]; 0;\n + + + 1 + MAAT_VERSION + + + MAAT_UPDATE_STATUS + + + + MAAT_RULE_TIMER + + + MAAT_VERSION_TIMER + + @@ -177,7 +198,7 @@ + service="1;2;16;17;18;19;20;21;22;23;24;26;27;30;31;32;33;34;35;36;37;38;39;128;129;130;131;132;133;134;135;136;137;138;139;140;141;142;143;144;145;146;147;148;149;150;151;256;257;258;259;260;267;271;272;273;384;385;386;387;388;395;399;512;513;514;515;517;521;528;544;560;576;592;750;768;848;1024;1025;1026;1027;1028;1029;1030;1040;1041;1042;1056;1057;1058;1059;1060;1152"> EFFECTIVE_RULE;:;{compile_table_name};,;[compile_id] [compile_id];\t;[service];\t;[action];\t;[do_blacklist];\t;[do_log];\t;[effective_range];\t;[user_region];\t;[is_valid];\t;[group_num];\t;[father_cfg_id];\t;[op_time]; 0;\n