Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

关于增加审计日志功能的构想 #19

Open
renbaoshuo opened this issue Nov 14, 2022 · 0 comments
Open

关于增加审计日志功能的构想 #19

renbaoshuo opened this issue Nov 14, 2022 · 0 comments
Assignees

Comments

@renbaoshuo
Copy link
Owner

背景

在 S2OJ 的使用过程中,有一些敏感操作是不会记录操作者信息的。随着题目管理员数量的日渐增加,增加审计日志的必要性在日渐提升。

需求

为 S2OJ 增加审计日志功能。

实现细节

数据表

新增:audit_logs

列名 数据类型 说明
username varchar(20) COLLATE utf8mb4_unicode_ci NOT NULL 用户名
type varchar(100) COLLATE utf8mb4_unicode_ci NOT NULL 记录类型
target_id int NOT NULL 对应项目的 ID
time datetime DEFAULT CURRENT_TIMESTAMP 时间
remote_addr varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL remote_addr
http_x_forwarded_for varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL http_x_forwarded_for
detail json NOT NULL 详情

记录类型

TODO

@renbaoshuo renbaoshuo self-assigned this Dec 10, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant