01 1 月 2024

部署测试Yearning平台

一、yearning sql审计平台

1.官网介绍

Yearning是一款可满足大部分公司SQL审核需求的web端可视化SQL审核平台。在实现常规的sql审核功能外还添加了诸如数据查询等一系列便捷的功能。
Yearning MYSQL SQL语句审核平台。提供查询审计,SQL审核,SQL回滚,自定义工作流等多种功能。

2.浅浅的研究

go语言开发;

官网https://next.yearning.io/

二、安装过程

1.mysql新建与配置

新建数据库yearning,用户名也是yearning,密码123456

2.docker部署

docker run -d -it -p8000:8000 -e SECRET_KEY=abcdabcdabcdabcd -e MYSQL_USER=yearning -e MYSQL_ADDR=172.17.0.1 -e MYSQL_PASSWORD=123456 -e MYSQL_DB=yearning yeelabs/yearning

3.初始化数据库

use yearning;
INSERT INTO core_accounts (username,password,department,real_name,email,is_recorder) VALUES (‘admin’,’pbkdf2_sha256$120000$LwSop65y17f4$AgXGkzmZLF7Lw3K1gToLkOBHqziBC0Wpf3bBIHoWA5Q=’,’DBA’,’超级管理员’,”,0);

INSERT INTO core_global_configurations (authorization,ldap,message,other,stmt,audit_role,board) VALUES (‘global’,'{“url”:””,”user”:””,”password”:””,”type”:”(\u0026(objectClass=organizationalPerson) (sAMAccountName=%s))”,”sc”:””,”ldaps”:false,”map”:””,”test_user”:””,”test_password”:””}’,'{“web_hook”:””,”host”:””,”port”:25,”user”:””,”password”:””,”to_user”:””,”mail”:false,”ding”:false,”ssl”:false,”push_type”:false,”key”:””}’,'{“limit”:1000,”idc”:[“Aliyun”,”AWS”],”query”:false,”register”:false,”export”:false,”ex_query_time”:60}’,0,'{“DMLAllowLimitSTMT”:false,”DMLInsertColumns”:false,”DMLMaxInsertRows”:10,”DMLWhere”:false,”DMLAllowInsertNull”:false,”DMLOrder”:false,”DMLSelect”:false,”DMLInsertMustExplicitly”:false,”DDLEnablePrimaryKey”:false,”DDLCheckTableComment”:false,”DDlCheckColumnComment”:false,”DDLCheckColumnNullable”:false,”DDLCheckColumnDefault”:false,”DDLEnableAcrossDBRename”:false,”DDLEnableAutoincrementInit”:false,”DDLEnableAutoIncrement”:false,”DDLEnableAutoincrementUnsigned”:false,”DDLEnableDropTable”:false,”DDLEnableDropDatabase”:false,”DDLEnableNullIndexName”:false,”DDLIndexNameSpec”:false,”DDLMaxKeyParts”:5,”DDLMaxKey”:5,”DDLMaxCharLength”:10,”MaxTableNameLen”:10,”MaxAffectRows”:1000,”MaxDDLAffectRows”:0,”SupportCharset”:””,”SupportCollation”:””,”CheckIdentifier”:false,”MustHaveColumns”:””,”DDLMultiToCommit”:false,”DDLPrimaryKeyMust”:false,”DDLAllowColumnType”:false,”DDLImplicitTypeConversion”:false,”DDLAllowPRINotInt”:false,”DDLEnableForeignKey”:false,”DDLTablePrefix”:””,”DDLColumnsMustHaveIndex”:””,”DDLAllowChangeColumnPosition”:false,”DDLCheckFloatDouble”:false,”IsOSC”:false,”OSCExpr”:””,”OscSize”:0,”AllowCreateView”:false,”AllowCrateViewWithSelectStar”:false,”AllowCreatePartition”:false,”AllowSpecialType”:false,”PRIRollBack”:false}’,”);

INSERT INTO core_graineds (username,group) VALUES (‘admin’,'[“admin”]’);

4.登录使用

打开http://IP地址:8000

用户名密码: admin/Yearning_admin

使用流程:

1.管理–设置中添加自定义环境并开启用户注册,其他设置根据实际环境需要配置或启用/关闭
2.管理–流程中创建审核流程
3.管理–审核规则中根据实际情况开启或关闭审核规则
4.创建数据源
5.创建权限组,并添加对应的权限
6.给对应的用户绑定权限组