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

你是怎么搞得把密码原文上传gist的,咋能这么想的 #8

Closed
ddv12138 opened this issue Jun 17, 2021 · 9 comments
Closed

Comments

@ddv12138
Copy link
Contributor

ddv12138 commented Jun 17, 2021

噢,原来是中国人,那我直接打字了,为什么要把ssh客户端密码原文上传到gist,你是如何想出这个思路的,这个症状持续多久了?你知道有多吓人吗,我看见我的密码原文就在gist上?你就算不做同步ssh服务器列表这个功能也不能上传密码原文吧?

@ddv12138 ddv12138 changed the title Are you kidding? upload the raw ssh client password to gist?really? 你是怎么搞得把密码原文上传gist的 Jun 17, 2021
@ddv12138 ddv12138 changed the title 你是怎么搞得把密码原文上传gist的 你是怎么搞得把密码原文上传gist的,咋能这么想的 Jun 17, 2021
@starxg
Copy link
Owner

starxg commented Jun 17, 2021

是的,因为我大多场景都是访问内网机器,这个的确没考虑到。后续考虑加密后再上传到gits,或者你提个PR?

@ddv12138
Copy link
Contributor Author

抱歉我看我密码被明文上传有点激动哈,我看你也几个月没更新了,我没写过typescript,你有没有搭建开发调试环境的文章教程啥的我参考下我到时候给你提个PR

@starxg
Copy link
Owner

starxg commented Jun 18, 2021

如果你会JavaScript那么你基本也会使用TypeScript。然后按照官方的指示既可开发。官方文档:https://github.com/Eugeny/terminus/blob/master/HACKING.md#plugins

值得一提的是在1.0.3版本中,密码的数据结构支持扩展,只需要加上部分字段即可。SettingsTab.component.ts

@ddv12138
Copy link
Contributor Author

自己琢磨了下环境搞起来了,PR提了,等你发版

@ddv12138
Copy link
Contributor Author

如果你会JavaScript那么你基本也会使用TypeScript。然后按照官方的指示既可开发。官方文档:https://github.com/Eugeny/terminus/blob/master/HACKING.md#plugins

值得一提的是在1.0.3版本中,密码的数据结构支持扩展,只需要加上部分字段即可。SettingsTab.component.ts

我动手的时候没看见这条,这密码的数据结构支持扩展啥的实在搞不懂,ts语法看着眼镜疼,先这样了

@starxg
Copy link
Owner

starxg commented Jun 18, 2021

{
    host, port, user,
    auth: {
        // add this line
        encryptType: 'NONE' | 'AES' | ... , 
        password: pwd
    }
}

auth 对象里可以添加一个标识,标识密码是否二次加密。

我看 #9 似乎并没有处理向上兼容。现在的密码是没有加密的,恢复的时候如果强行解密会导致很多错误。我觉得你可以根据 auth.encryptType( NONE | AES ...) 判断是否加密。

另外,我觉得不应该强制用户对配置加密,或许可以加个选项让用户选择是否加密。

@ddv12138
Copy link
Contributor Author

标识之后自动加密吗

@starxg
Copy link
Owner

starxg commented Jun 18, 2021

譬如:
我新增一个属性 auth.encryptType ,当我从gits拉下 ssh.auth.json 文件的时候并且在保存之前,我要先判断 auth.encryptType 是否等于(===) AES ,如果不等于表示没有加密则不需要解密,反之亦然。这样可以直接兼容之前没有加密的,后面如果用户不选择加密可以给这个auth.encryptType设置成NONE(默认值)。


另外,我觉得不应该强制用户对配置加密,或许可以加个选项让用户选择是否加密。

我的意思是并不是每个人都需要加密,大多数开发者连接的都是内网机器,我觉得不应该强制给用户做选择。


在这行代码上面,加个复选框(加密配置 or 加密密码),当复选框选中时这个输入框再显示,是否更好呢?

@starxg
Copy link
Owner

starxg commented Jun 19, 2021

Please use version 1.0.4

@starxg starxg closed this as completed Jun 19, 2021
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

No branches or pull requests

2 participants