Skip to content

feat: encrypt login username and password with SM2 - #365

Merged
LordofAvernus merged 2 commits into
release-2.2306.xfrom
feat/yumchina-login-sm2-encryption
Aug 4, 2026
Merged

LordofAvernus merged 2 commits into
release-2.2306.xfrom
feat/yumchina-login-sm2-encryption

Conversation

@LordofAvernus

Copy link
Copy Markdown
Collaborator

关联的 issue

https://github.com/actiontech/sqle-ee/issues/3062

描述你的变更

  • 登录页拉取 GET /v1/login/encryption,启用态对用户名与口令做 SM2/C1C3C2 加密
  • 仅提交 encrypted_username、encrypted_password、key_id;disabled 仍走明文
  • 引入 sm-crypto@0.3.13 与 sm2Encrypt 工具

确认项(pr提交后操作)

Tip

请在指定复审人之前,确认并完成以下事项,完成后✅


  • 我已完成自测
  • 我已记录完整日志方便进行诊断
  • 我已在关联的issue里补充了实现方案
  • 我已在关联的issue里补充了测试影响面
  • 我已确认了变更的兼容性,如果不兼容则在issue里标记 not_compatible
  • 我已确认了是否要更新文档,如果要更新则在issue里标记 need_update_doc

Made with Cursor

Fetch login encryption public key and submit dual ciphertext fields when enabled; keep plaintext path only for disabled mode.

Co-authored-by: Cursor <cursoragent@cursor.com>
@CLAassistant

CLAassistant commented Aug 3, 2026

Copy link
Copy Markdown

CLA assistant check
All committers have signed the CLA.

@github-actions

github-actions Bot commented Aug 3, 2026

Copy link
Copy Markdown

Coverage report

St.
Category Percentage Covered / Total
🟢 Statements
96.18% (-0.2% 🔻)
6497/6755
🟡 Branches
74.21% (-0.27% 🔻)
2273/3063
🟢 Functions
96.11% (-0.04% 🔻)
2073/2157
🟢 Lines
96.17% (-0.21% 🔻)
6397/6652
Show new covered files 🐣
St.
File Statements Branches Functions Lines
🔴 utils/sm2Encrypt.ts 14.29% 0% 0% 14.29%
Show files with reduced coverage 🔻
St.
File Statements Branches Functions Lines
🟢
... / index.tsx
81.48% (-18.52% 🔻)
57.14% (-26.19% 🔻)
100%
80.77% (-19.23% 🔻)

Test suite run success

886 tests passing in 256 suites.

Report generated by 🧪jest coverage report action from 025c3d6

Restore Login unit tests after SM2 encryption mount dependency, and align Header Modal snapshot with current UI_VERSION so PR checks pass.

Co-authored-by: Cursor <cursoragent@cursor.com>
@LordofAvernus
LordofAvernus merged commit 830cc89 into release-2.2306.x Aug 4, 2026
3 of 4 checks passed
@Seechi-Yolo

Copy link
Copy Markdown
image

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

Successfully merging this pull request may close these issues.

3 participants