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

终端鉴权优化 #394

Open
Naochen2799 opened this issue May 15, 2024 · 4 comments
Open

终端鉴权优化 #394

Naochen2799 opened this issue May 15, 2024 · 4 comments
Labels
enhancement New feature or request question Further information is requested

Comments

@Naochen2799
Copy link

https://yourdomain.com/#/terminal
没有终端相关的鉴权,存在被滥用的风险。
注:包括demo站点!

@Naochen2799 Naochen2799 added the bug Something isn't working label May 15, 2024
@0xJacky
Copy link
Owner

0xJacky commented May 15, 2024

我不清楚您是如何认为我们没有做终端鉴权的

w := root.Group("/", authRequired(), proxyWs())
{
analytic.InitWebSocketRouter(w)
certificate.InitCertificateWebSocketRouter(w)
terminal.InitRouter(w)

后端需要通过 token 验证才可以进入 web 终端,其次,我在文档中有注明使用 login 作为启动命令,这样相当于可以多套一层 linux 的用户认证
https://nginxui.com/zh_CN/guide/config-server.html#startcmd
image

在未登录的情况下,访问 yourdomain.com/#/termainal 也有前端的路由守卫,跳转至 #/login

next({ path: '/login', query: { next: to.fullPath } })

@0xJacky 0xJacky added the question Further information is requested label May 15, 2024
@Naochen2799
Copy link
Author

我没有完整的阅读文档,忽略了Linux默认的用户名和密码进行验证。
但是目前的demo网站似乎也没有添加额外的授权,可能存在风险

@0xJacky
Copy link
Owner

0xJacky commented May 15, 2024

因为 demo 为了展示,所以直接用的 bash 作为启动命令

@0xJacky 0xJacky added enhancement New feature or request and removed bug Something isn't working labels May 15, 2024
@0xJacky
Copy link
Owner

0xJacky commented May 15, 2024

后续会增加设置,禁用 WebTerminal,以及二步验证等

@0xJacky 0xJacky changed the title 终端没有鉴权,存在入侵风险 终端鉴权优化 May 16, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request question Further information is requested
Projects
Status: No status
Development

No branches or pull requests

2 participants