我正在学习使用 maven password encryption能力,我想知道如何选择参数<password>
.有两件事我不明白:
1) mvn --encrypt-master-password foobar
总会给出不一样的encrypted master password
.
自 encrypted master password
总是不同的,我只看到两种可能性:
encrypted master password
获取 master password
.这意味着我们的 encrypted server passwords
只能在本地使用。 master password
是没用的,根本没有关系。 所以,我的问题是:
What is stored locally? Will my
master password
remain safe? Is there a third possibility I didn't think of?
2)maven网站上是这样写的:
Also note that the encrypted passwords can be decrypted by someone that has the master password and settings security file. Keep this file secure (or stored separately) if you expect the possibility that the settings.xml file may be retrieved.
如果
settings security file
是要保护的东西,我为什么要费心选择强主密码?我不能只使用 foobar 并保留我的 settings security file
安全的?此外,看起来拥有两个文件(
settings security file
和 settings file
)的人不需要 master password
连接到 Maven 服务器。他可以在不知道密码的情况下使用我们的身份。 master password
“仅”需要解密 servers passwords
(让他们纯文本)。但话又说回来,保护settings security file
应该是要走的路和master password
将保持无用。我的问题:
How important is the
master password
? Have I got to remember it? Can I use a long random phrase and forget it forever?
PS:我找不到我的答案 here .
最佳答案
第一个密码仅用于生成主密码,然后您可以忘记它。它是使用加密机制和伪随机组件生成的。因此,应该不可能破译它。除了您的安全设置文件中的主密码之外,本地没有其他任何内容,并且不会再次提示或询问。
此主密码用于在您的设置文件中加密和解密密码。它与用户引入的密码具有相同的值(value),但几乎不可能推断出它。
然后:
我不喜欢这种保护我的密码的方法,我想要一个真正的密码加密机制,而不存储真正的主密码。带有密码策略的公私钥似乎更好。
关于maven - mvn --encrypt-master-password <password> : Good practice for choosing <password>? 它应该是哪个级别的隐私?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/16422016/