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¶
-
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.
-
Set the environment variable
EXCHANGE_PRIVATE_KEYto 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. -
Set
enableEncryptPasswdtotrueandpasswdto 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.