完成数据库敏感信息的加密

This commit is contained in:
dushixiang
2021-04-17 17:34:48 +08:00
parent 11f2d8a1f4
commit bceda9a95c
25 changed files with 566 additions and 40 deletions

View File

@ -108,7 +108,7 @@ Mar 5 20:00:16.923 [DEBU] 用户「admin」密码初始化为: next-terminal
/ | \_/ __ \\ \/ /\ __\ | |_/ __ \_ __ \/ \| |/ \\__ \ | |
/ | \ ___/ > < | | | |\ ___/| | \/ Y Y \ | | \/ __ \| |__
\____|__ /\___ >__/\_ \ |__| |____| \___ >__| |__|_| /__|___| (____ /____/
\/ \/ \/ \/ \/ \/ \/ v0.3.0
\/ \/ \/ \/ \/ \/ \/ v0.4.0
当前数据库模式为mysql
Mar 5 20:00:16.923 [DEBU] 用户「admin」已重置TOTP
@ -117,3 +117,32 @@ Mar 5 20:00:16.923 [DEBU] 用户「admin」已重置TOTP
</details>
<details>
<summary>想要修改数据库敏感信息加密的key怎么办</summary>
首先需要进入程序所在目录使用docker安装的程序目录为/usr/local/next-terminal
执行命令
```shell
./next-terminal --encryption-key 旧的加密key new-encryption-key 新的的加密key
```
成功之后会输出
``` shell
_______ __ ___________ .__ .__
\ \ ____ ___ ____/ |_ \__ ___/__________ _____ |__| ____ _____ | |
/ | \_/ __ \\ \/ /\ __\ | |_/ __ \_ __ \/ \| |/ \\__ \ | |
/ | \ ___/ > < | | | |\ ___/| | \/ Y Y \ | | \/ __ \| |__
\____|__ /\___ >__/\_ \ |__| |____| \___ >__| |__|_| /__|___| (____ /____/
\/ \/ \/ \/ \/ \/ \/ v0.4.0
当前数据库模式为mysql
Mar 5 20:00:16.923 [DEBU] encryption key has being changed.
```
最后重新启动程序并且把加密key修改为新的。
</details>