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

Feature: 在日志中记录登陆失败尝试的IP地址 #336

Open
tiehu opened this issue Oct 8, 2024 · 0 comments
Open

Feature: 在日志中记录登陆失败尝试的IP地址 #336

tiehu opened this issue Oct 8, 2024 · 0 comments

Comments

@tiehu
Copy link

tiehu commented Oct 8, 2024

功能描述:

考虑将koishi接入fail2ban,将多次尝试登录WEB管理界面失败的IP地址ban掉,因此希望koishi能在日志中记录失败的登陆尝试(目前登陆失败会输出一条debug级别的日志,但并不会记录IP),最好能为这个功能添加一个开关。
auth自身似乎目前也没有实现类似防止爆破的功能——诚然,在WEB暴露在公网环境下时,给admin账户设置强密码是一个良好的实践,但考虑到进入koishi控制台后,实际上是可以再通过安装spawn插件在服务器上执行终端命令的,多一重保险总是好的。

替代方案:

就像上面提到的,也可以考虑由koishi自身来实现类似的功能,例如用户可以配置在WEB界面失败多少次尝试后禁止登陆(当然,最好是禁止IP而非禁止账号,否则遭遇爆破后用户自己也会被拦在外面),这样也可以顺带解决部分用户只配置了弱密码就把koishi暴露在公网所带来的安全隐患。

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