Cipher tool
The Cipher tool enables you to secure your application with NexJ master password encryption.
Password encryption involves creating a master password, placing it in the appropriate directory within your deployment, encrypting the relevant passwords within your deployment so they are not human readable, and linking the master password to these passwords so they can only be decrypted using the master password.
When you create the master password, you also create the master password file that will store the password. The master password file must be placed in the <SERVER_HOME>/conf
directory so that the application can read the master password. You can specify this location directly when creating the master password. If you specify a different location, you must copy the file to this location before deploying the application.
For each password that you want to encrypt, you generate an encrypted string, which you can use instead of the password in your environment or properties file.
The Cipher tool enables you to encrypt individual passwords in an environment. To encrypt all passwords in an environment simultaneously, or to encrypt an entire environment or properties file, use the Encrypt command that displays when you right-click the file. For more information, see Encrypting deployment files and passwords.
Generating a master password file
To generate a master password file:
- In NexJ Studio, click the arrow beside the Run Tool button and select Cipher Tool. The Cipher Tool dialog opens.
- In the Action area, select Create Master Password File.
In the Options area, beside the Master Password File field, click the ellipsis button . The Open dialog opens. - Select the folder in which you want to create your master password file.
In the File name field, enter a name for your master password file.
The default name is
master.pwd
. You must retain the.
pwd
extension the end of the file name.- Click Open to confirm the specified folder and file name. The Open dialog closes.
In the Enter Password and Re-enter Password fields, enter the password to store in your master password file. This password must match the passwords that this file will be used to decrypt in your deployment.
- Click OK to close the Cipher Tool dialog.
You have created a master password file for your deployment. You can now provide it to application servers and users who need to run or edit the encrypted files.
Encrypting passwords
To encrypt passwords:
- In NexJ Studio, click the arrow beside the Run Tool button and select Cipher Tool. The Cipher Tool dialog opens.
- In the Action area, select Encrypt password.
- In the Options area, in the Enter Master Password field, enter the master password stored in your master password file.
- For each password that you want to encrypt:
- In the Enter Password and Re-enter Password fields, enter the password.
- Click the Encrypt button. A string encrypted with NexJ master password encryption is generated.
- Replace the password in your environment or properties file with the encrypted string.
- Click the Close button on the top right corner.
The passwords are encrypted and the Cipher Tool dialog closes.
Related links
Setting up password encryption