maven - mvn --encrypt-master-password <password> : Good practice for choosing <password>? 它应该是哪个级别的隐私?

标签 maven password-protection password-encryption password-generator

我正在学习使用 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 filesettings 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/

    相关文章:

    bash - 将 stdout 和 stderr 都重定向到文件,仅打印 stdout

    java - 为什么 Maven 抛出类似 `must be "pom"的错误,但实际上是 "jar"`?

    java - Maven - 添加可在 Java 内部访问的校验和

    maven - jar 中的 ClasNotFound 异常

    php - 如何使用用户名和密码保护 PDF?

    c# - 使用 gzip 密码保护 xml 文件

    android - 如何启动无需解锁屏幕即可单击的对话框(如闹钟关闭/暂停)

    java - SH256 Java 中的登录密码

    Node.js 和密码安全 : three questions

    python - 如何在 python 脚本中隐藏我的登录名和密码?