From 0a8eeca62969da0fe36f111f97f2c4ee5e8c8953 Mon Sep 17 00:00:00 2001 From: Bai Date: Mon, 11 May 2020 15:12:42 +0800 Subject: [PATCH 1/2] =?UTF-8?q?[Update]=20=E4=BB=AA=E8=A1=A8=E7=9B=98?= =?UTF-8?q?=E7=BC=93=E5=AD=98key=E6=B7=BB=E5=8A=A0=E7=BB=84=E7=BB=87id?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- apps/jumpserver/api.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/apps/jumpserver/api.py b/apps/jumpserver/api.py index e272c9ff3..e98a44d6b 100644 --- a/apps/jumpserver/api.py +++ b/apps/jumpserver/api.py @@ -36,7 +36,7 @@ class MonthLoginMetricMixin: @staticmethod def get_cache_key(date, tp): date_str = date.strftime("%Y%m%d") - key = "SESSION_MONTH_{}_{}".format(tp, date_str) + key = "SESSION_MONTH_{}_{}_{}".format(current_org.id, tp, date_str) return key def __get_data_from_cache(self, date, tp): From 7b3647e78afcd6e7b9a304def196cfdd73f8e21b Mon Sep 17 00:00:00 2001 From: Bai Date: Mon, 11 May 2020 16:56:52 +0800 Subject: [PATCH 2/2] =?UTF-8?q?[Bugfix]=20=E4=BF=AE=E5=A4=8D=E7=94=A8?= =?UTF-8?q?=E6=88=B7=E9=A1=B5=E9=9D=A2=E6=9B=B4=E6=96=B0MFA=E6=97=B6?= =?UTF-8?q?=E8=A7=A3=E9=99=A4=E7=AE=A1=E7=90=86=E5=91=98=E5=BC=BA=E5=88=B6?= =?UTF-8?q?=E5=90=AF=E7=94=A8=E7=9A=84Bug?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- apps/locale/zh/LC_MESSAGES/django.mo | Bin 90004 -> 90055 bytes apps/locale/zh/LC_MESSAGES/django.po | 129 ++++++++++-------- ..._disable_mfa.html => user_verify_mfa.html} | 0 apps/users/views/profile/otp.py | 20 ++- 4 files changed, 87 insertions(+), 62 deletions(-) rename apps/users/templates/users/{user_disable_mfa.html => user_verify_mfa.html} (100%) diff --git a/apps/locale/zh/LC_MESSAGES/django.mo b/apps/locale/zh/LC_MESSAGES/django.mo index a466cf2e82b4c775389f7513945b211882ed2112..954523412d8c88bcbd3686c3002b6b992e61039a 100644 GIT binary patch delta 26441 zcmYk^1$0)|wua#yG-!a}2@rz2Q-TzCcQ39*iWVzB?otR8E$;46T#CCEcPVxXMN13Z z_xso64)z%PJZsLSdu>U`x%W)j6aDa>=)RkYqD}QUPDS&)P#l-h^ZLf{y#J~w>v^}^ zdR{}kgX6JCJJ0KfM{zTjY43UUqIlj1yhvR0d(UeS;CY!kdEOY}L7h1+p(VJS>fIuqGzOrkECcn!jKg;%&&a zc$YB`-oP9f)XTLmhFOT4VQS|0MpMX2Vj1Sd^VkZb^!B_A*cLD2IJ}8%eq=B#)5r5- zV;zi(&CE__U(|v}U@%TbUC%o0_ILNJ80v~jVFIj#iLo(8#~)Bz z-rF3E35myNq6R#NTF`COmOjMH_yjXyFypGe2x1!k_slXiGntF$cM=PJp^+ zp{O0nf@v@h>KUksT1Xqz)7}F$VINe#fv9I`ENZJ~VgX!_x|NSm?R>8&XdrK}tB8;3 z2~(oBx;Sc}N|*y1qMntJr~xLS+Rs7VvI7``7f=u13rvE6Ll_fNqsEOuZk5j~;|g9K z)I_aOPj?T?_d`uE2DS3F<_^@(9Y#%X2DPwQ-z4CbJBQPq?MlE2Txx(CJ?lzC0o`rL$1zy7le1F1-Mhhc~%#$!0~RLqatupB-|ZFT-J?iQ6pEwCx--uAF~2x>>Co2yW_ zVlV2-ub>w2*ka#X3i`yx80)qq1humCs9Ta9wesSYuZo(mE^6mmo4u@l1ZunqsEHS1 z9NdYT_y}tJi%y?+gMtQpU=^=1E%ARCh^fc9TaXDgKpu>P-=f-8LcOM)P~*%)ZTVW% z1#Ce*?MG1yeuVl!y~kj^|B1)Dj+s#v-=Ma-Hpay^sJEj##=PCh%nH<7a}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SU11d&D7Ue}W?L>L9mjF5rBg~ucS>G`u&gge{lZHd4>2W=U&bUoHsaiRHm)|xZvZD?f(D# zehRCI!1(?qd^%$+8czFSl3lddQIXtC%Lft9CcnU6!|!h7HQZftf7-aJibuSe@mg~x zCeEv$(gi8pqrT~mXHPoMwz`Sr({t)5`R@FV9Hk*>ptgta^q=x)ar7PTM$^14@{CbX;_cMb~;58XQcf3 z_?o(WoRciKoB^)WW;*9_?qP_pl@0kjnMSk<#NRlJaO&ubSs0-b<$E}kGm<`Yt=~fO zGbnGR-PfF%znDFeatYe&*ho2s)g`6fK5{9vhyN0cx53mf1!r6p>_|m@Ejo5%ptg9J zGdb=1P`|>}?HJl8njOm_e^t!*P^f zQx2!ipPa>sgKW~#wC%;2mik+m2Y*5x9dQ%wqgmXH1qWMM_1_cM!ez|wKi>1d?Kz(_ z_;wnuvmN;bhmp_88Ok}5xF+7BU0upcDbG@lI5iXA);{v{{1_$iL9+C&>DUt-Wwob5QH z6MuPBw|2^HSF`uAl8wQ0TWW*!TFl= z36oB*jt-9ybrjzkNjX lfOIKC?oJqYZ||hYJM)*`nZM!ouDN%jmTzC2HXx$Z{{dSK4UYf- diff --git a/apps/locale/zh/LC_MESSAGES/django.po b/apps/locale/zh/LC_MESSAGES/django.po index 2a2de30c3..9ea83491f 100644 --- a/apps/locale/zh/LC_MESSAGES/django.po +++ b/apps/locale/zh/LC_MESSAGES/django.po @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: JumpServer 0.3.3\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2020-05-08 15:42+0800\n" +"POT-Creation-Date: 2020-05-11 16:53+0800\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: ibuler \n" "Language-Team: JumpServer team\n" @@ -2769,7 +2769,7 @@ msgid "" msgstr "账号已被锁定(请联系管理员解锁 或 {}分钟后重试)" #: authentication/errors.py:48 users/views/profile/otp.py:63 -#: users/views/profile/otp.py:102 +#: users/views/profile/otp.py:100 users/views/profile/otp.py:116 msgid "MFA code invalid, or ntp sync server time" msgstr "MFA验证码不正确,或者服务器端时间不对" @@ -2832,10 +2832,10 @@ msgid "Show" msgstr "显示" #: authentication/templates/authentication/_access_key_modal.html:66 -#: users/models/user.py:360 users/templates/users/user_disable_mfa.html:32 -#: users/templates/users/user_profile.html:94 +#: users/models/user.py:360 users/templates/users/user_profile.html:94 #: users/templates/users/user_profile.html:163 #: users/templates/users/user_profile.html:166 +#: users/templates/users/user_verify_mfa.html:32 msgid "Disable" msgstr "禁用" @@ -2894,10 +2894,10 @@ msgstr "请打开 Google Authenticator,输入6位动态码" #: authentication/templates/authentication/login_otp.html:26 #: users/templates/users/first_login.html:100 -#: users/templates/users/user_disable_mfa.html:26 #: users/templates/users/user_otp_check_password.html:15 #: users/templates/users/user_otp_enable_bind.html:24 #: users/templates/users/user_otp_enable_install_app.html:29 +#: users/templates/users/user_verify_mfa.html:26 msgid "Next" msgstr "下一步" @@ -5766,26 +5766,6 @@ msgstr "解除用户登录限制后,此用户即可正常登录" msgid "Reset user MFA success" msgstr "重置用户多因子认证成功" -#: users/templates/users/user_disable_mfa.html:6 -#: users/templates/users/user_otp_check_password.html:6 -msgid "Authenticate" -msgstr "验证身份" - -#: users/templates/users/user_disable_mfa.html:11 -msgid "" -"The account protection has been opened, please complete the following " -"operations according to the prompts" -msgstr "账号保护已开启,请根据提示完成以下操作" - -#: users/templates/users/user_disable_mfa.html:13 -msgid "Open Authenticator and enter the 6-bit dynamic code" -msgstr "请打开 验证器,输入6位动态码" - -#: users/templates/users/user_disable_mfa.html:23 -#: users/templates/users/user_otp_enable_bind.html:22 -msgid "Six figures" -msgstr "6位数字" - #: users/templates/users/user_group_detail.html:17 #: users/templates/users/user_group_granted_asset.html:18 #: users/views/group.py:83 @@ -5844,6 +5824,11 @@ msgstr "用户已失效" msgid "User is inactive" msgstr "用户已禁用" +#: users/templates/users/user_otp_check_password.html:6 +#: users/templates/users/user_verify_mfa.html:6 +msgid "Authenticate" +msgstr "验证身份" + #: users/templates/users/user_otp_enable_bind.html:6 msgid "Bind one-time password authenticator" msgstr "绑定一次性密码验证器" @@ -5854,6 +5839,11 @@ msgid "" "code for a 6-bit verification code" msgstr "使用手机 Google Authenticator 应用扫描以下二维码,获取6位验证码" +#: users/templates/users/user_otp_enable_bind.html:22 +#: users/templates/users/user_verify_mfa.html:23 +msgid "Six figures" +msgstr "6位数字" + #: users/templates/users/user_otp_enable_install_app.html:6 msgid "Install app" msgstr "安装应用" @@ -5936,6 +5926,16 @@ msgstr "更新用户" msgid "User auth from {}, go there change password" msgstr "用户认证源来自 {}, 请去相应系统修改密码" +#: users/templates/users/user_verify_mfa.html:11 +msgid "" +"The account protection has been opened, please complete the following " +"operations according to the prompts" +msgstr "账号保护已开启,请根据提示完成以下操作" + +#: users/templates/users/user_verify_mfa.html:13 +msgid "Open Authenticator and enter the 6-bit dynamic code" +msgstr "请打开 验证器,输入6位动态码" + # msgid "Update user" # msgstr "更新用户" #: users/utils.py:24 @@ -6183,19 +6183,19 @@ msgstr "首次登录" msgid "Profile setting" msgstr "个人信息设置" -#: users/views/profile/otp.py:130 +#: users/views/profile/otp.py:144 msgid "MFA enable success" msgstr "多因子认证启用成功" -#: users/views/profile/otp.py:131 +#: users/views/profile/otp.py:145 msgid "MFA enable success, return login page" msgstr "多因子认证启用成功,返回到登录页面" -#: users/views/profile/otp.py:133 +#: users/views/profile/otp.py:147 msgid "MFA disable success" msgstr "多因子认证禁用成功" -#: users/views/profile/otp.py:134 +#: users/views/profile/otp.py:148 msgid "MFA disable success, return login page" msgstr "多因子认证禁用成功,返回登录页面" @@ -6529,11 +6529,11 @@ msgstr "同步实例任务历史" msgid "Instance" msgstr "实例" -#: xpack/plugins/cloud/providers/aliyun.py:16 +#: xpack/plugins/cloud/providers/aliyun.py:19 msgid "Alibaba Cloud" msgstr "阿里云" -#: xpack/plugins/cloud/providers/aws.py:14 +#: xpack/plugins/cloud/providers/aws.py:15 msgid "AWS (International)" msgstr "AWS (国际)" @@ -6541,51 +6541,59 @@ msgstr "AWS (国际)" msgid "AWS (China)" msgstr "AWS (中国)" -#: xpack/plugins/cloud/providers/huaweicloud.py:13 +#: xpack/plugins/cloud/providers/huaweicloud.py:17 msgid "Huawei Cloud" msgstr "华为云" -#: xpack/plugins/cloud/providers/huaweicloud.py:16 -msgid "CN North-Beijing4" -msgstr "华北-北京4" - -#: xpack/plugins/cloud/providers/huaweicloud.py:17 -msgid "CN East-Shanghai1" -msgstr "华东-上海1" - -#: xpack/plugins/cloud/providers/huaweicloud.py:18 -msgid "CN East-Shanghai2" -msgstr "华东-上海2" - -#: xpack/plugins/cloud/providers/huaweicloud.py:19 -msgid "CN South-Guangzhou" -msgstr "华南-广州" - #: xpack/plugins/cloud/providers/huaweicloud.py:20 -msgid "CN Southwest-Guiyang1" -msgstr "西南-贵阳1" +msgid "AF-Johannesburg" +msgstr "非洲-约翰内斯堡" #: xpack/plugins/cloud/providers/huaweicloud.py:21 -msgid "AP-Hong-Kong" -msgstr "亚太-香港" - -#: xpack/plugins/cloud/providers/huaweicloud.py:22 msgid "AP-Bangkok" msgstr "亚太-曼谷" +#: xpack/plugins/cloud/providers/huaweicloud.py:22 +msgid "AP-Hong Kong" +msgstr "亚太-香港" + #: xpack/plugins/cloud/providers/huaweicloud.py:23 msgid "AP-Singapore" msgstr "亚太-新加坡" #: xpack/plugins/cloud/providers/huaweicloud.py:24 -msgid "AF-Johannesburg" -msgstr "非洲-约翰内斯堡" +msgid "CN East-Shanghai1" +msgstr "华东-上海1" #: xpack/plugins/cloud/providers/huaweicloud.py:25 -msgid "LA-Santiago" -msgstr "拉美-圣地亚哥" +msgid "CN East-Shanghai2" +msgstr "华东-上海2" -#: xpack/plugins/cloud/providers/qcloud.py:14 +#: xpack/plugins/cloud/providers/huaweicloud.py:26 +msgid "CN North-Beijing1" +msgstr "华北-北京1" + +#: xpack/plugins/cloud/providers/huaweicloud.py:27 +msgid "CN North-Beijing4" +msgstr "华北-北京4" + +#: xpack/plugins/cloud/providers/huaweicloud.py:28 +msgid "CN Northeast-Dalian" +msgstr "东北-大连" + +#: xpack/plugins/cloud/providers/huaweicloud.py:29 +msgid "CN South-Guangzhou" +msgstr "华南-广州" + +#: xpack/plugins/cloud/providers/huaweicloud.py:30 +msgid "CN Southwest-Guiyang1" +msgstr "西南-贵阳1" + +#: xpack/plugins/cloud/providers/huaweicloud.py:31 +msgid "EU-Paris" +msgstr "" + +#: xpack/plugins/cloud/providers/qcloud.py:17 msgid "Tencent Cloud" msgstr "腾讯云" @@ -6981,6 +6989,9 @@ msgstr "密码匣子" msgid "vault create" msgstr "创建" +#~ msgid "LA-Santiago" +#~ msgstr "拉美-圣地亚哥" + #~ msgid "Total hosts" #~ msgstr "主机总数" diff --git a/apps/users/templates/users/user_disable_mfa.html b/apps/users/templates/users/user_verify_mfa.html similarity index 100% rename from apps/users/templates/users/user_disable_mfa.html rename to apps/users/templates/users/user_verify_mfa.html diff --git a/apps/users/views/profile/otp.py b/apps/users/views/profile/otp.py index 7bae70c58..2d823f5ab 100644 --- a/apps/users/views/profile/otp.py +++ b/apps/users/views/profile/otp.py @@ -83,12 +83,26 @@ class UserOtpEnableBindView(TemplateView, FormView): return super().get_context_data(**kwargs) -class UserDisableMFAView(FormView): - template_name = 'users/user_disable_mfa.html' +class UserVerifyMFAView(FormView): + template_name = 'users/user_verify_mfa.html' form_class = forms.UserCheckOtpCodeForm success_url = reverse_lazy('users:user-otp-settings-success') permission_classes = [IsValidUser] + def form_valid(self, form): + user = self.request.user + otp_code = form.cleaned_data.get('otp_code') + + valid = user.check_mfa(otp_code) + if valid: + return super().form_valid(form) + else: + error = _('MFA code invalid, or ntp sync server time') + form.add_error('otp_code', error) + return super().form_invalid(form) + + +class UserDisableMFAView(UserVerifyMFAView): def form_valid(self, form): user = self.request.user otp_code = form.cleaned_data.get('otp_code') @@ -104,7 +118,7 @@ class UserDisableMFAView(FormView): return super().form_invalid(form) -class UserOtpUpdateView(UserDisableMFAView): +class UserOtpUpdateView(UserVerifyMFAView): success_url = reverse_lazy('users:user-otp-enable-bind')