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

启用MFA认证,SSH登录,jumpserver记录日志会报错!!! #3080

Open
zhusipu opened this issue Aug 6, 2019 · 2 comments

Comments

@zhusipu
Copy link

commented Aug 6, 2019

[简述你的问题]
启用MFA认证,SSH登录,jumpserver记录日志会报错!!!
11565057242_ pic

audits_userloginlog表不会记录登录日志
因为没有传递remoteAddr、login_type,导致jumpserver报错了

使用版本

1.5.2

问题复现步骤

1.启用MFA
2.ssh登录
3.jumpserver后台报错
报错位置“jumpserver/apps/authentication/utils.py”

具体表现[截图可能会更好些,最好能截全]

报错导致插入登录日志失败

其他

解决办法:

  1. 文件:koko/pgk/auth/server.go
    代码
service.CheckUserOTP(seed, mfaCode)

改为

service.CheckUserOTP(seed, mfaCode, remoteAddr, "T")
  1. 文件:koko/pgk/server/user.go
    方法CheckUserOTP增加相应参数传递
    11565057242_ pic
@LeeEirc

This comment has been minimized.

Copy link
Contributor

commented Aug 7, 2019

@zhusipu 欢迎向koko提pr

@zhusipu

This comment has been minimized.

Copy link
Author

commented Aug 8, 2019

@LeeEirc 等我忙完了,一并提交上去!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
2 participants
You can’t perform that action at this time.