appsession组件 特征组件,管控组件
This commit is contained in:
45
src/main/resources/sql/20190215/add_app_correlation_ip.sql
Normal file
45
src/main/resources/sql/20190215/add_app_correlation_ip.sql
Normal file
@@ -0,0 +1,45 @@
|
||||
--------------App 关联特征IP配置----start--------20190201-------------------------------------
|
||||
##菜单
|
||||
INSERT INTO `sys_menu` (`parent_id`, `parent_ids`, `code`, `name`, `sort`, `href`, `target`, `icon`, `is_show`, `permission`, `create_by`, `create_date`, `update_by`, `update_date`, `remarks`, `del_flag`, `menu_bg`, `quick_action`, `is_top`, `function_id`) VALUES ('735', '0,1,86,717,735,', 'app_ip_correlation', 'APP关联特征IP配置', '60', '/app/feature/multiFeatureCfgList', '', '', '1', 'app_correlation_ip_monit:config', '1', '2019-01-29 17:07:57', '1', '2019-01-29 17:22:40', '', '1', NULL, '0', '0', '568');
|
||||
INSERT INTO `sys_menu` (`parent_id`, `parent_ids`, `code`, `name`, `sort`, `href`, `target`, `icon`, `is_show`, `permission`, `create_by`, `create_date`, `update_by`, `update_date`, `remarks`, `del_flag`, `menu_bg`, `quick_action`, `is_top`, `function_id`) VALUES ('751', '0,1,150,750,751,', 'app_ip_correlation', 'APP关联特征IP配置', '60', '/app/feature/multiFeatureCfgList', '', '', '1', 'app_correlation_ip_monit:confirm', '1', '2019-01-31 17:14:47', '1', '2019-01-31 17:14:47', '', '1', NULL, '0', '0', '568');
|
||||
INSERT INTO `sys_menu` (`parent_id`, `parent_ids`, `code`, `name`, `sort`, `href`, `target`, `icon`, `is_show`, `permission`, `create_by`, `create_date`, `update_by`, `update_date`, `remarks`, `del_flag`, `menu_bg`, `quick_action`, `is_top`, `function_id`) VALUES ('866', '0,1,151,865,866,', 'app_ip_correlation', 'APP关联特征IP配置', '60', '/app/feature/multiFeatureCfgList', '', '', '1', 'app_correlation_ip_monit:audit', '1', '2019-01-31 17:15:56', '1', '2019-01-31 17:15:56', '', '1', NULL, '0', '0', '568');
|
||||
|
||||
##添加IP域和特征属性,其中特征属性的region_type=9 config_expr_type控制组件: 1 无控管属性,2 无特征属性,
|
||||
INSERT INTO `function_region_dict` (`function_id`, `config_district`, `config_region_code`, `config_region_value`, `config_desc`, `is_valid`, `is_maat`, `region_type`, `creator_id`, `create_time`, `editor_id`, `edit_time`, `config_service_type`, `config_expr_type`, `config_match_method`, `config_ip_type`, `config_hex`, `config_multi_keywords`, `config_ip_pattern`, `config_port_pattern`, `config_direction`, `config_protocol`, `config_ip_port_show`, `config_region_sort`, `is_import`) VALUES ('568', '', '1', 'APP_IP_CORRELATION', 'APP IP CORRELATION', '1', '1', '1', NULL, '2019-01-31 15:48:13', NULL, NULL, '', '', '', '4,6', '', '', '1,2,3', '1,2', '0', '0,6,17', '1,2,3,4', '1', '0');
|
||||
INSERT INTO `function_region_dict` (`function_id`, `config_district`, `config_region_code`, `config_region_value`, `config_desc`, `is_valid`, `is_maat`, `region_type`, `creator_id`, `create_time`, `editor_id`, `edit_time`, `config_service_type`, `config_expr_type`, `config_match_method`, `config_ip_type`, `config_hex`, `config_multi_keywords`, `config_ip_pattern`, `config_port_pattern`, `config_direction`, `config_protocol`, `config_ip_port_show`, `config_region_sort`, `is_import`) VALUES ('568', '', '7', 'APP_FEATURE_PROPERTIES', 'APP特征属性组件', '1', '1', '9', NULL, '2019-02-01 10:47:28', NULL, '2019-02-01 10:47:32', '', '0', '', '', '', '', NULL, NULL, NULL, NULL, NULL, '2', '0');
|
||||
##添加service和action 暂定service=1031,action=1;
|
||||
INSERT INTO `function_service_dict` (`function_id`, `protocol_id`, `action`, `action_code`, `service_id`, `service_name`, `service_desc`, `is_valid`, `creator_id`, `create_time`, `editor_id`, `edit_time`, `region_code`, `is_import`, `sort`, `config_do_log`) VALUES ('568', '0', '1', 'monit', '1031', 'app_correlation_ip_monit', '', '1', NULL, '0000-00-00 00:00:00', NULL, '0000-00-00 00:00:00', '1', '1', '1', NULL);
|
||||
|
||||
|
||||
##添加App特征组件配置表
|
||||
DROP TABLE IF EXISTS `app_feature_prop_cfg`;
|
||||
CREATE TABLE `app_feature_prop_cfg` (
|
||||
`cfg_id` bigint(20) NOT NULL AUTO_INCREMENT COMMENT '主键',
|
||||
`drop_opt` int(11) COMMENT 'DROP 持续时间(秒):0-7200',
|
||||
`loop_opt` int(11) COMMENT 'LOOP 持续时间(秒):0-7200',
|
||||
`weak_feature` varchar(64) COMMENT '特征强弱属性',
|
||||
`whitelist_feature` varchar(64) COMMENT '白名单属性',
|
||||
`extend_scan_pkt_num` int(11) COMMENT '扫描包数',
|
||||
`correlation_valid_time` int(11) COMMENT '多流汇聚关联时间',
|
||||
`correlation_block_after` varchar(64) COMMENT '多流汇聚关联后控管',
|
||||
`long_stream_lock_time` int(11) COMMENT '长流锁定时间',
|
||||
`compile_id` int(11) NOT NULL,
|
||||
`function_id` int(11) NOT NULL,
|
||||
`service_id` int(11) NOT NULL COMMENT '业务id',
|
||||
`request_id` int(11) NOT NULL COMMENT '来自request_info.id',
|
||||
`is_valid` int(11) NOT NULL,
|
||||
`is_audit` int(11) NOT NULL,
|
||||
`creator_id` int(11) NOT NULL COMMENT 'sys_user.id',
|
||||
`create_time` datetime NOT NULL,
|
||||
`editor_id` int(11) DEFAULT NULL COMMENT '来自sys_user.id',
|
||||
`edit_time` datetime DEFAULT NULL,
|
||||
`auditor_id` int(11) DEFAULT NULL COMMENT '来自sys_user.id',
|
||||
`audit_time` datetime DEFAULT NULL,
|
||||
`user_region1` varchar(1024) DEFAULT NULL COMMENT '预留自定义域1',
|
||||
`user_region2` varchar(1024) DEFAULT NULL COMMENT '预留自定义域2',
|
||||
`user_region3` varchar(1024) DEFAULT NULL COMMENT '预留自定义域3',
|
||||
`user_region4` varchar(1024) DEFAULT NULL COMMENT '预留自定义域4',
|
||||
`user_region5` varchar(1024) DEFAULT NULL COMMENT '预留自定义域5',
|
||||
PRIMARY KEY (`cfg_id`)
|
||||
) ENGINE=InnoDB AUTO_INCREMENT=1 DEFAULT CHARSET=utf8mb4;
|
||||
--------------App 关联特征IP配置----end------------------------------------------------------
|
||||
@@ -1,5 +1,5 @@
|
||||
--添加dns和url公共组的function_region和function_service字典
|
||||
INSERT INTO `function_region_dict` (`dict_id`, `function_id`, `config_district`, `config_region_code`, `config_region_value`, `config_desc`, `is_valid`, `is_maat`, `region_type`, `creator_id`, `create_time`, `editor_id`, `edit_time`, `config_service_type`, `config_expr_type`, `config_match_method`, `config_ip_type`, `config_hex`, `config_multi_keywords`, `config_ip_pattern`, `config_port_pattern`, `config_direction`, `config_protocol`, `config_ip_port_show`, `config_region_sort`, `is_import`) VALUES ('622', '409', 'QNAME', '2', 'NTC_DNS_REGION', 'DNS域名配置', '1', '1', '3', NULL, '0000-00-00 00:00:00', NULL, '0000-00-00 00:00:00', '', '0', '0,1,2,3', '', '0,1,2', '0', '', '', '', '', '', '1', '1');
|
||||
INSERT INTO `function_region_dict` (`dict_id`, `function_id`, `config_district`, `config_region_code`, `config_region_value`, `config_desc`, `is_valid`, `is_maat`, `region_type`, `creator_id`, `create_time`, `editor_id`, `edit_time`, `config_service_type`, `config_expr_type`, `config_match_method`, `config_ip_type`, `config_hex`, `config_multi_keywords`, `config_ip_pattern`, `config_port_pattern`, `config_direction`, `config_protocol`, `config_ip_port_show`, `config_region_sort`, `is_import`) VALUES ('623', '111', '', '2', 'NTC_URL_REGION', 'URL公共组域配置', '1', '1', '2', NULL, '0000-00-00 00:00:00', NULL, '0000-00-00 00:00:00', '', '0,1', '0,1,2,3', '', '0', '1', NULL, NULL, NULL, NULL, NULL, '2', '1');
|
||||
INSERT INTO `function_service_dict` (`dict_id`, `function_id`, `protocol_id`, `action`, `action_code`, `service_id`, `service_name`, `service_desc`, `is_valid`, `creator_id`, `create_time`, `editor_id`, `edit_time`, `region_code`, `is_import`, `sort`, `config_do_log`) VALUES ('164', '409', '0', '0', '', '-2', 'NTC_DNS_REGION', NULL, '1', '1', '2019-02-15 16:48:56', NULL, NULL, '1', '1', '1', NULL);
|
||||
INSERT INTO `function_service_dict` (`dict_id`, `function_id`, `protocol_id`, `action`, `action_code`, `service_id`, `service_name`, `service_desc`, `is_valid`, `creator_id`, `create_time`, `editor_id`, `edit_time`, `region_code`, `is_import`, `sort`, `config_do_log`) VALUES ('165', '111', '0', '0', '', '-1', 'NTC_URL_REGION', NULL, '1', '1', '2019-02-15 16:49:49', NULL, NULL, '1', '1', '1', NULL);
|
||||
INSERT INTO `function_region_dict` ( `function_id`, `config_district`, `config_region_code`, `config_region_value`, `config_desc`, `is_valid`, `is_maat`, `region_type`, `creator_id`, `create_time`, `editor_id`, `edit_time`, `config_service_type`, `config_expr_type`, `config_match_method`, `config_ip_type`, `config_hex`, `config_multi_keywords`, `config_ip_pattern`, `config_port_pattern`, `config_direction`, `config_protocol`, `config_ip_port_show`, `config_region_sort`, `is_import`) VALUES ('409', 'QNAME', '2', 'NTC_DNS_REGION', 'DNS域名配置', '1', '1', '3', NULL, '0000-00-00 00:00:00', NULL, '0000-00-00 00:00:00', '', '0', '0,1,2,3', '', '0,1,2', '0', '', '', '', '', '', '1', '1');
|
||||
INSERT INTO `function_region_dict` ( `function_id`, `config_district`, `config_region_code`, `config_region_value`, `config_desc`, `is_valid`, `is_maat`, `region_type`, `creator_id`, `create_time`, `editor_id`, `edit_time`, `config_service_type`, `config_expr_type`, `config_match_method`, `config_ip_type`, `config_hex`, `config_multi_keywords`, `config_ip_pattern`, `config_port_pattern`, `config_direction`, `config_protocol`, `config_ip_port_show`, `config_region_sort`, `is_import`) VALUES ( '111', '', '2', 'NTC_URL_REGION', 'URL公共组域配置', '1', '1', '2', NULL, '0000-00-00 00:00:00', NULL, '0000-00-00 00:00:00', '', '0,1', '0,1,2,3', '', '0', '1', NULL, NULL, NULL, NULL, NULL, '2', '1');
|
||||
INSERT INTO `function_service_dict` ( `function_id`, `protocol_id`, `action`, `action_code`, `service_id`, `service_name`, `service_desc`, `is_valid`, `creator_id`, `create_time`, `editor_id`, `edit_time`, `region_code`, `is_import`, `sort`, `config_do_log`) VALUES ( '409', '0', '0', '', '-2', 'NTC_DNS_REGION', NULL, '1', '1', '2019-02-15 16:48:56', NULL, NULL, '1', '1', '1', NULL);
|
||||
INSERT INTO `function_service_dict` ( `function_id`, `protocol_id`, `action`, `action_code`, `service_id`, `service_name`, `service_desc`, `is_valid`, `creator_id`, `create_time`, `editor_id`, `edit_time`, `region_code`, `is_import`, `sort`, `config_do_log`) VALUES ( '111', '0', '0', '', '-1', 'NTC_URL_REGION', NULL, '1', '1', '2019-02-15 16:49:49', NULL, NULL, '1', '1', '1', NULL);
|
||||
|
||||
15
src/main/resources/sql/20190215/add_function_region_dict.sql
Normal file
15
src/main/resources/sql/20190215/add_function_region_dict.sql
Normal file
@@ -0,0 +1,15 @@
|
||||
-- APP Payload、HTTP、SSL增加session组件
|
||||
INSERT INTO `function_region_dict` (`function_id`, `config_district`, `config_region_code`, `config_region_value`, `config_desc`, `is_valid`, `is_maat`, `region_type`, `creator_id`, `create_time`, `editor_id`, `edit_time`, `config_service_type`, `config_expr_type`, `config_match_method`, `config_ip_type`, `config_hex`, `config_multi_keywords`, `config_ip_pattern`, `config_port_pattern`, `config_direction`, `config_protocol`, `config_ip_port_show`, `config_region_sort`, `is_import`) VALUES ('563', 'Attribute', '6', 'APP_SESSION', 'APP SESSION组件', '1', '1', '8', NULL, '2019-01-22 13:57:49', NULL, NULL, '', '1', '0', '', '0', '', NULL, NULL, NULL, NULL, NULL, '7', '0');
|
||||
INSERT INTO `function_region_dict` (`function_id`, `config_district`, `config_region_code`, `config_region_value`, `config_desc`, `is_valid`, `is_maat`, `region_type`, `creator_id`, `create_time`, `editor_id`, `edit_time`, `config_service_type`, `config_expr_type`, `config_match_method`, `config_ip_type`, `config_hex`, `config_multi_keywords`, `config_ip_pattern`, `config_port_pattern`, `config_direction`, `config_protocol`, `config_ip_port_show`, `config_region_sort`, `is_import`) VALUES ('566', 'Attribute', '6', 'APP_SESSION', 'APP SESSION组件', '1', '1', '8', NULL, '2019-01-24 09:33:13', NULL, NULL, '', '1', '0', '', '0', '', NULL, NULL, NULL, NULL, NULL, '7', '0');
|
||||
INSERT INTO `function_region_dict` (`function_id`, `config_district`, `config_region_code`, `config_region_value`, `config_desc`, `is_valid`, `is_maat`, `region_type`, `creator_id`, `create_time`, `editor_id`, `edit_time`, `config_service_type`, `config_expr_type`, `config_match_method`, `config_ip_type`, `config_hex`, `config_multi_keywords`, `config_ip_pattern`, `config_port_pattern`, `config_direction`, `config_protocol`, `config_ip_port_show`, `config_region_sort`, `is_import`) VALUES ('565', 'Attribute', '6', 'APP_SESSION', 'APP SESSION组件', '1', '1', '8', NULL, '2019-01-24 09:41:17', NULL, NULL, '', '1', '0', '', '0', '', NULL, NULL, NULL, NULL, NULL, '7', '0');
|
||||
|
||||
-- 修改字段注释
|
||||
ALTER TABLE `function_region_dict` MODIFY COLUMN `region_type` INT(1) NOT NULL COMMENT '1IP类,2字符串类,3增强字符串类,4数值类,5摘要类,6回调类,7 ASN,8 APP特征Session组件';
|
||||
|
||||
|
||||
-- APP Payload/http/ssl/domain/ip 增加控管参数组件、特征属性组件
|
||||
INSERT INTO `function_region_dict` (`function_id`, `config_district`, `config_region_code`, `config_region_value`, `config_desc`, `is_valid`, `is_maat`, `region_type`, `creator_id`, `create_time`, `editor_id`, `edit_time`, `config_service_type`, `config_expr_type`, `config_match_method`, `config_ip_type`, `config_hex`, `config_multi_keywords`, `config_ip_pattern`, `config_port_pattern`, `config_direction`, `config_protocol`, `config_ip_port_show`, `config_region_sort`, `is_import`) VALUES ('563', '', '7', 'APP_FEATURE_PROPERTIES', 'APP特征属性组件', '1', '1', '9', NULL, '2019-02-01 10:47:28', NULL, '2019-02-01 10:47:32', '', '0', '', '', '', '', NULL, NULL, NULL, NULL, NULL, '8', '0');
|
||||
INSERT INTO `function_region_dict` (`function_id`, `config_district`, `config_region_code`, `config_region_value`, `config_desc`, `is_valid`, `is_maat`, `region_type`, `creator_id`, `create_time`, `editor_id`, `edit_time`, `config_service_type`, `config_expr_type`, `config_match_method`, `config_ip_type`, `config_hex`, `config_multi_keywords`, `config_ip_pattern`, `config_port_pattern`, `config_direction`, `config_protocol`, `config_ip_port_show`, `config_region_sort`, `is_import`) VALUES ('565', '', '7', 'APP_FEATURE_PROPERTIES', 'APP特征属性组件', '1', '1', '9', NULL, '2019-02-01 10:47:28', NULL, '2019-02-01 10:47:32', '', '0', '', '', '', '', NULL, NULL, NULL, NULL, NULL, '8', '0');
|
||||
INSERT INTO `function_region_dict` (`function_id`, `config_district`, `config_region_code`, `config_region_value`, `config_desc`, `is_valid`, `is_maat`, `region_type`, `creator_id`, `create_time`, `editor_id`, `edit_time`, `config_service_type`, `config_expr_type`, `config_match_method`, `config_ip_type`, `config_hex`, `config_multi_keywords`, `config_ip_pattern`, `config_port_pattern`, `config_direction`, `config_protocol`, `config_ip_port_show`, `config_region_sort`, `is_import`) VALUES ('566', '', '7', 'APP_FEATURE_PROPERTIES', 'APP特征属性组件', '1', '1', '9', NULL, '2019-02-01 10:47:28', NULL, '2019-02-01 10:47:32', '', '0', '', '', '', '', NULL, NULL, NULL, NULL, NULL, '8', '0');
|
||||
INSERT INTO `function_region_dict` (`function_id`, `config_district`, `config_region_code`, `config_region_value`, `config_desc`, `is_valid`, `is_maat`, `region_type`, `creator_id`, `create_time`, `editor_id`, `edit_time`, `config_service_type`, `config_expr_type`, `config_match_method`, `config_ip_type`, `config_hex`, `config_multi_keywords`, `config_ip_pattern`, `config_port_pattern`, `config_direction`, `config_protocol`, `config_ip_port_show`, `config_region_sort`, `is_import`) VALUES ('403', '', '7', 'APP_FEATURE_PROPERTIES', 'APP特征属性组件', '1', '1', '9', NULL, '2019-02-01 10:47:28', NULL, '2019-02-01 10:47:32', '', '0', '', '', '', '', NULL, NULL, NULL, NULL, NULL, '2', '0');
|
||||
INSERT INTO `function_region_dict` (`function_id`, `config_district`, `config_region_code`, `config_region_value`, `config_desc`, `is_valid`, `is_maat`, `region_type`, `creator_id`, `create_time`, `editor_id`, `edit_time`, `config_service_type`, `config_expr_type`, `config_match_method`, `config_ip_type`, `config_hex`, `config_multi_keywords`, `config_ip_pattern`, `config_port_pattern`, `config_direction`, `config_protocol`, `config_ip_port_show`, `config_region_sort`, `is_import`) VALUES ('405', '', '7', 'APP_FEATURE_PROPERTIES', 'APP特征属性组件', '1', '1', '9', NULL, '2019-02-01 10:47:28', NULL, '2019-02-01 10:47:32', '', '1', '', '', '', '', NULL, NULL, NULL, NULL, NULL, '2', '0');
|
||||
@@ -0,0 +1,14 @@
|
||||
-- APP特征 Session组件复用字段添加注释
|
||||
ALTER TABLE `app_complex_feature_cfg` MODIFY COLUMN `header_type` VARCHAR(16) DEFAULT '' COMMENT 'Session组件复用:传输服务端端口';
|
||||
ALTER TABLE `app_complex_feature_cfg` MODIFY COLUMN `ver` VARCHAR(4) DEFAULT '' COMMENT 'Session组件复用:传输协议';
|
||||
ALTER TABLE `app_complex_feature_cfg` MODIFY COLUMN `tos` VARCHAR(16) DEFAULT '' COMMENT 'Session组件复用:L7层协议';
|
||||
ALTER TABLE `app_complex_feature_cfg` MODIFY COLUMN `total_length` VARCHAR(16) DEFAULT '' COMMENT 'Session组件复用:链接建立方式';
|
||||
ALTER TABLE `app_complex_feature_cfg` MODIFY COLUMN `flags` VARCHAR(32) DEFAULT '' COMMENT 'Session组件复用:TCP包发送特性';
|
||||
ALTER TABLE `app_complex_feature_cfg` MODIFY COLUMN `fragment_offset` VARCHAR(32) DEFAULT '' COMMENT 'Session组件复用:域名初筛标识';
|
||||
ALTER TABLE `app_complex_feature_cfg` MODIFY COLUMN `payload_packet_direction` VARCHAR(8) DEFAULT NULL COMMENT 'payload包方向 | Session组件复用:清洗标识';
|
||||
ALTER TABLE `app_complex_feature_cfg` MODIFY COLUMN `payload_offset` INT(11) DEFAULT NULL COMMENT 'payload特征偏移量 | Session组件复用:session size min';
|
||||
ALTER TABLE `app_complex_feature_cfg` MODIFY COLUMN `payload_size` INT(11) DEFAULT NULL COMMENT 'payload包大小 | Session组件复用:session size max';
|
||||
ALTER TABLE `app_complex_feature_cfg` MODIFY COLUMN `icmp_identifier` VARCHAR(32) DEFAULT '' COMMENT 'Session组件复用:C2S Payload Size Sequence';
|
||||
ALTER TABLE `app_complex_feature_cfg` MODIFY COLUMN `icmp_type` VARCHAR(32) DEFAULT '' COMMENT 'Session组件复用:S2C Payload Size Sequence';
|
||||
ALTER TABLE `app_complex_feature_cfg` MODIFY COLUMN `icmp_code` VARCHAR(32) DEFAULT '' COMMENT 'Session组件复用:C2S Frequent Payload Size';
|
||||
ALTER TABLE `app_complex_feature_cfg` MODIFY COLUMN `protocol` VARCHAR(32) DEFAULT '' COMMENT 'Session组件复用:S2C Frequent Payload Size';
|
||||
Reference in New Issue
Block a user