Skip to content
Developer Edition runs on one host and does not require a product license file. Need multi-host deployment or performance testing at scale? Explore Enterprise Edition

Encrypt passwords

NebulaGraph Exchange supports using encrypted passwords in NebulaGraph Database Developer Edition configurations for enhanced security during data import. This topic introduces how to generate encrypted passwords and use them in the configurations.

Prerequisites

NebulaGraph Exchange is deployed. For more information, see Deploy NebulaGraph Exchange.

Steps

  1. Go to the installation directory of NebulaGraph Exchange, such as nebula-graph-exchange/ and run the following command to encrypt your password:

    java -jar cli-5.3.0.jar -e -password "<your_password>"
    

    Replace <your_password> with the password you want to encrypt. If the password contains shell special characters such as $, wrap it in quotes according to your shell. For example:

    java -jar cli-5.3.0.jar -e -password "Yueshu456$"
    

    The encrypted password is returned along with a public key and a private key.

  2. Set the environment variable EXCHANGE_PRIVATE_KEY to the private key. For example:

    export EXCHANGE_PRIVATE_KEY=<your_private_key>
    

    Replace <your_private_key> with the private key value returned in the previous step.

  3. Set enableEncryptPasswd to true and passwd to the encrypted password in NebulaGraph Database Developer Edition configurations. For example:

    taskType: import
    nebula: {
        graphAddr: "127.0.0.1:9669,127.0.0.1:9670"
        graphName: "movie"
        user: "root"
        enableEncryptPasswd: true
        passwd: "<your_encrypted_password>"
        schema: "/default_schema"
        ...
    }
    

    Replace <your_encrypted_password> with the encrypted password.

More information

Data import configurations