Skip to content

Commit

Permalink
v1.0.10版本更新
Browse files Browse the repository at this point in the history
  • Loading branch information
smarttang committed May 21, 2022
1 parent 19ff8d0 commit 8c483ab
Show file tree
Hide file tree
Showing 9 changed files with 75,716 additions and 34,805 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -86,10 +86,124 @@ CREATE TABLE `w3_alter_paramets` (
`alter_referer` text COMMENT '配置Referer',
`alter_frequency` bigint(20) DEFAULT '0' COMMENT '访问频率',
`alter_statistics_type` tinyint(1) DEFAULT '0' COMMENT '统计类型,0:巡检统计数据,1:报表处理数据',
`alter_time` tinyint(1) DEFAULT '1' COMMENT '时间类型,1:每分钟,2:每小时,3:每天,4:每周',
`alter_time` tinyint(1) DEFAULT '1' COMMENT '时间类型,1:每分钟,2:每小时',
PRIMARY KEY (`alter_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='告警参数表';

-- ----------------------------
-- Table structure for w3_apps_website
-- ----------------------------
DROP TABLE IF EXISTS `w3_apps_website`;
CREATE TABLE `w3_apps_website` (
`id` bigint(20) NOT NULL AUTO_INCREMENT COMMENT 'id',
`apps_type` tinyint(1) NOT NULL COMMENT '关联的类型,0:关联Git,1:关联容器服务,2:关联云资产',
`apps_string_info` varchar(255) NOT NULL COMMENT '资产内容,字符串型',
`apps_number_info` bigint(20) NOT NULL COMMENT '资产内容,数字型',
`apps_website_id` bigint(20) NOT NULL COMMENT '关联站点的ID',
`apps_updatetime` datetime DEFAULT NULL COMMENT '更新时间',
`apps_createtime` datetime NOT NULL COMMENT '创建时间',
`apps_status` tinyint(1) DEFAULT '1' COMMENT '关联状态,0:取消,1:启用',
`apps_errormsg` varchar(255) DEFAULT NULL COMMENT '异常原因',
PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='应用和站点关联配置表';

-- ----------------------------
-- Table structure for w3_clouds_assets
-- ----------------------------
DROP TABLE IF EXISTS `w3_clouds_assets`;
CREATE TABLE `w3_clouds_assets` (
`id` bigint(20) NOT NULL AUTO_INCREMENT COMMENT 'id',
`cloud_assets_id` varchar(32) DEFAULT NULL COMMENT '云资产实例ID',
`cloud_assets_zone` varchar(30) DEFAULT NULL COMMENT '云资产归属可用区',
`cloud_assets_regions` varchar(30) DEFAULT NULL COMMENT '云资产归属地区',
`cloud_assets_config` varchar(68) DEFAULT NULL COMMENT '云资产配置',
`cloud_assets_intranet_ip` varchar(13) DEFAULT NULL COMMENT '云资产内网IP',
`cloud_assets_public_ip` varchar(13) DEFAULT NULL COMMENT '云资产外网IP',
`cloud_assets_instance_name` varchar(58) DEFAULT NULL COMMENT '云资产实例别名',
`cloud_assets_fingerprint` varchar(255) DEFAULT NULL COMMENT '云资产指纹,如系统版本',
`cloud_assets_createtime` datetime DEFAULT NULL COMMENT '云资产创建时间',
`cloud_assets_expiredtime` datetime DEFAULT NULL COMMENT '云资产释放时间',
`cloud_assets_updatetime` datetime DEFAULT NULL COMMENT '云资产更新时间',
`cloud_assets_securitygroup_id` varchar(255) DEFAULT NULL COMMENT '云资产安全组ID',
`cloud_assets_status` tinyint(1) DEFAULT '1' COMMENT '云资产原生状态,0:停用,1:运行中',
`cloud_assets_security_status` tinyint(1) DEFAULT '0' COMMENT '云资产安全状态,0:待检查,1:相对安全,2:不安全',
`cloud_assets_types` tinyint(1) DEFAULT '0' COMMENT '云资产类型,0:云主机,1:域名,2:redis,3:mysql,4:MariaDB,5:SQLServer,6:MongoDB',
`cloud_assets_ports` varchar(6) DEFAULT '1' COMMENT '云资产端口号',
`cloud_assets_simple_name` varchar(255) DEFAULT '1' COMMENT '云资产通用字段',
`cloud_assets_delete` tinyint(1) DEFAULT '1' COMMENT '云资产删除,0:删除,1:正常',
PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='云资产数据';

-- ----------------------------
-- Table structure for w3_clouds_secrets
-- ----------------------------
DROP TABLE IF EXISTS `w3_clouds_secrets`;
CREATE TABLE `w3_clouds_secrets` (
`id` bigint(20) NOT NULL AUTO_INCREMENT COMMENT 'id',
`cloud_secret_type` tinyint(1) NOT NULL COMMENT '云厂商类型,0:阿里云,1:腾讯云,2:华为云',
`cloud_access_key` varchar(255) NOT NULL COMMENT 'AccessKeyId',
`cloud_access_token` varchar(255) NOT NULL COMMENT 'AccessSecret',
`cloud_secret_status` tinyint(1) DEFAULT '1' COMMENT '状态,0:停用,1:启用',
`cloud_secret_delete` tinyint(1) DEFAULT '1' COMMENT '删除状态,0:删除,1:启用',
`cloud_secret_create_userid` bigint(20) NOT NULL COMMENT '创建的用户ID',
`cloud_secret_updatetime` datetime DEFAULT NULL COMMENT '更新时间',
`cloud_secret_createtime` datetime NOT NULL COMMENT '创建时间',
`cloud_secret_errormsg` varchar(255) DEFAULT NULL COMMENT '异常原因',
`cloud_secret_info` varchar(20) NOT NULL COMMENT '备注',
PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=2 DEFAULT CHARSET=utf8 COMMENT='云厂商配置';

-- ----------------------------
-- Table structure for w3_gitlab_config
-- ----------------------------
DROP TABLE IF EXISTS `w3_gitlab_config`;
CREATE TABLE `w3_gitlab_config` (
`id` bigint(20) NOT NULL AUTO_INCREMENT COMMENT 'id',
`gitlab_config_addr` varchar(255) NOT NULL COMMENT 'gitlab/GITHUB主地址',
`gitlab_config_username` varchar(255) NOT NULL COMMENT '账号',
`gitlab_config_token` varchar(255) NOT NULL COMMENT 'token值',
`gitlab_config_password` varchar(255) DEFAULT '1' COMMENT '密码',
`gitlab_config_status` tinyint(1) DEFAULT '1' COMMENT '状态,0:停用,1:启用',
`gitlab_config_delete_status` tinyint(1) DEFAULT '1' COMMENT '删除状态,0:删除,1:启用',
`gitlab_create_userid` bigint(20) NOT NULL COMMENT '创建的用户ID',
`gitlab_config_updatetime` datetime DEFAULT NULL COMMENT '更新时间',
`gitlab_config_createtime` datetime NOT NULL COMMENT '创建时间',
`gitlab_config_errormsg` varchar(255) DEFAULT NULL COMMENT '异常原因',
PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='git配置';

-- ----------------------------
-- Table structure for w3_kubernetes_assets
-- ----------------------------
DROP TABLE IF EXISTS `w3_kubernetes_assets`;
CREATE TABLE `w3_kubernetes_assets` (
`id` bigint(20) NOT NULL AUTO_INCREMENT COMMENT 'id',
`kubernetes_id` bigint(20) NOT NULL COMMENT '集群配置的ID',
`kubernetes_service_name` varchar(255) NOT NULL COMMENT '集群服务名称',
`kubernetes_namespace` varchar(255) NOT NULL COMMENT '集群namespace',
`kubernetes_tags` varchar(255) DEFAULT NULL COMMENT '集群服务的tags',
`kubernetes_service_updatetime` datetime DEFAULT NULL COMMENT '更新时间',
`kubernetes_service_createtime` datetime NOT NULL COMMENT '创建时间',
`kubernetes_service_delete` tinyint(1) DEFAULT '1' COMMENT '删除状态,0:删除,1:启用',
PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='K8S集群抓取的资产数据';

-- ----------------------------
-- Table structure for w3_kubernetes_config
-- ----------------------------
DROP TABLE IF EXISTS `w3_kubernetes_config`;
CREATE TABLE `w3_kubernetes_config` (
`id` bigint(20) NOT NULL AUTO_INCREMENT COMMENT 'id',
`kubernetes_config_kub` varchar(255) DEFAULT '1' COMMENT 'kubeconfig配置',
`kubernetes_config_status` tinyint(1) DEFAULT '1' COMMENT '状态,0:停用,1:启用',
`kubernetes_config_delete_status` tinyint(1) DEFAULT '1' COMMENT '删除状态,0:删除,1:启用',
`kubernetes_config_updatetime` datetime DEFAULT NULL COMMENT '更新时间',
`kubernetes_config_createtime` datetime NOT NULL COMMENT '创建时间',
`kubernetes_create_userid` bigint(20) NOT NULL COMMENT '创建的用户ID',
`kubernetes_config_errormsg` varchar(255) DEFAULT NULL COMMENT '异常原因',
PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='kubernetes配置';

-- ----------------------------
-- Table structure for w3_license
-- ----------------------------
Expand Down Expand Up @@ -118,6 +232,23 @@ CREATE TABLE `w3_secrets` (
PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=3 DEFAULT CHARSET=utf8 COMMENT='授权秘钥管理';

-- ----------------------------
-- Table structure for w3_spider_config
-- ----------------------------
DROP TABLE IF EXISTS `w3_spider_config`;
CREATE TABLE `w3_spider_config` (
`id` bigint(20) NOT NULL AUTO_INCREMENT COMMENT 'id',
`spider_config` tinyint(1) DEFAULT '0' COMMENT '抓取类型,0:云上资产,1:K8S数据,2:Git数据',
`spider_crontab_type` tinyint(1) DEFAULT '0' COMMENT '抓取频率,0:每分钟,1:每小时,2:每天',
`spider_id` bigint(20) NOT NULL COMMENT '对应的ID',
`spider_status` tinyint(1) DEFAULT '1' COMMENT '抓取状态,0:删除,1:启用',
`spider_updatetime` datetime DEFAULT NULL COMMENT '更新时间',
`spider_createtime` datetime NOT NULL COMMENT '创建时间',
`spider_delete` tinyint(1) DEFAULT '1' COMMENT '删除状态,0:删除,1:启用',
`spider_create_userid` bigint(20) NOT NULL COMMENT '创建的用户ID',
PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=3 DEFAULT CHARSET=utf8 COMMENT='抓取配置表';

-- ----------------------------
-- Table structure for w3_statistics
-- ----------------------------
Expand All @@ -127,8 +258,9 @@ CREATE TABLE `w3_statistics` (
`statis_uptime` datetime DEFAULT NULL COMMENT '创建/更新时间',
`statis_type` tinyint(1) DEFAULT '0' COMMENT '类型,0:审计日志数、1:识别攻击数、2:审计网络请求数,3:识别网络风险数',
`statis_counts` bigint(20) DEFAULT '0' COMMENT '统计数',
`website_id` bigint(20) NOT NULL COMMENT '站点归属ID',
PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=5 DEFAULT CHARSET=utf8 COMMENT='数据统计表';
) ENGINE=InnoDB AUTO_INCREMENT=8 DEFAULT CHARSET=utf8 COMMENT='数据统计表';

-- ----------------------------
-- Table structure for w3_users
Expand Down Expand Up @@ -262,7 +394,7 @@ CREATE TABLE `w3_website` (
`website_updatetime` datetime DEFAULT NULL COMMENT '更新时间',
`website_delete` tinyint(1) DEFAULT '1' COMMENT '逻辑删除,0:删除,1:可用',
PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=3 DEFAULT CHARSET=utf8 COMMENT='站点管理';
) ENGINE=InnoDB AUTO_INCREMENT=4 DEFAULT CHARSET=utf8 COMMENT='站点管理';

-- ----------------------------
-- Table structure for w3_website_config
Expand Down Expand Up @@ -292,21 +424,20 @@ CREATE TABLE `w3_website_service` (
PRIMARY KEY (`id`,`website_types`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='站点管理.服务配置';


/**
* 初始化数据
*/
-- ----------------------------
-- 创建测试账号密码
-- License管理(默认都是社区版)
-- ----------------------------
INSERT INTO `w3a_soc`.`w3_users`(`user_name`,`user_password`,`user_createtime`)VALUES('admin','385ba8ba360a0efbf17c93784323f655', now());
INSERT INTO `w3a_soc`.`w3_license`(`id`, `license_type`, `lincese_info`) VALUES (1, 1, '社区版');
INSERT INTO `w3a_soc`.`w3_license`(`id`, `license_type`, `lincese_info`) VALUES (2, 2, '');
-- ----------------------------
-- 创建测试账号密码
-- ----------------------------
-- 创建统计数据
INSERT INTO `w3a_soc`.`w3_users`(`user_name`,`user_password`,`user_createtime`)VALUES('admin','385ba8ba360a0efbf17c93784323f655', now());
-- ----------------------------
INSERT INTO `w3a_soc`.`w3_statistics`(`id`, `statis_uptime`, `statis_type`, `statis_counts`) VALUES (1, NULL, 0, 0);
INSERT INTO `w3a_soc`.`w3_statistics`(`id`, `statis_uptime`, `statis_type`, `statis_counts`) VALUES (2, NULL, 1, 0);
INSERT INTO `w3a_soc`.`w3_statistics`(`id`, `statis_uptime`, `statis_type`, `statis_counts`) VALUES (3, NULL, 2, 0);
INSERT INTO `w3a_soc`.`w3_statistics`(`id`, `statis_uptime`, `statis_type`, `statis_counts`) VALUES (4, NULL, 3, 0);
-- ----------------------------
-- 创建测试规则数据
-- ----------------------------
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@ services:

# 分析端
w3aAnalysisAgent:
image: registry.cn-beijing.aliyuncs.com/aidolphins_com/w3a-agent:v1.0.9
image: registry.cn-beijing.aliyuncs.com/aidolphins_com/w3a-agent:v1.0.10
environment:
- topic=weblogs
- kafka=kafka:9092
Expand All @@ -90,24 +90,31 @@ services:

# 告警端
w3aAlterAgent:
image: registry.cn-beijing.aliyuncs.com/aidolphins_com/w3a-agent:v1.0.9
image: registry.cn-beijing.aliyuncs.com/aidolphins_com/w3a-agent:v1.0.10
environment:
- topic=weblogs
- kafka=kafka:9092
- openapi=w3aworkapi:8080
- modes=alters

# 资产采集端
w3aAssetsAgent:
image: registry.cn-beijing.aliyuncs.com/aidolphins_com/w3a-agent:v1.0.10
environment:
- openapi=w3aworkapi:8080
- modes=assets

# Web前端
w3aFrotend:
image: registry.cn-beijing.aliyuncs.com/aidolphins_com/w3a-frontend:v1.0.9
image: registry.cn-beijing.aliyuncs.com/aidolphins_com/w3a-frontend:v1.0.10
ports:
- '81:80'
depends_on:
- w3aDashboard

# 平台侧
w3aDashboard:
image: registry.cn-beijing.aliyuncs.com/aidolphins_com/w3a-dashboard:v1.0.9
image: registry.cn-beijing.aliyuncs.com/aidolphins_com/w3a-dashboard:v1.0.10
ports:
- '8081:8080'
environment:
Expand All @@ -117,18 +124,18 @@ services:
- REDIS_HOST=w3aRedis
- REDIS_PORT=6379
- REDIS_DATABASE=5
- COS_ACCESSKEY=XXXX
- COS_ACCESSKEY=XXXXX
- COS_SECRETKEY=XXXXX
- COS_REGIONNAME=XXXXX
- COS_BUCKETNAME=XXXXX
- COS_BASEURL=https://XXXXX.cos.XXXXX.myqcloud.com
- COS_BASEURL=https://XXXX.cos.XXXXX.myqcloud.com
depends_on:
- w3aMysql
- w3aRedis

# workAPI
w3aworkapi:
image: registry.cn-beijing.aliyuncs.com/aidolphins_com/w3a-workapi:v1.0.9
image: registry.cn-beijing.aliyuncs.com/aidolphins_com/w3a-workapi:v1.0.10
ports:
- '8082:8080'
environment:
Expand All @@ -146,7 +153,7 @@ services:

# openAPI
w3aopenapi:
image: registry.cn-beijing.aliyuncs.com/aidolphins_com/w3a-openapi:v1.0.9
image: registry.cn-beijing.aliyuncs.com/aidolphins_com/w3a-openapi:v1.0.10
ports:
- '8083:8080'
environment:
Expand Down Expand Up @@ -177,3 +184,4 @@ services:
image: registry.cn-beijing.aliyuncs.com/aidolphins_com/redis:v1
ports:
- '6379:6379'

File renamed without changes.
File renamed without changes.
File renamed without changes.
Loading

0 comments on commit 8c483ab

Please sign in to comment.