Password Encryption
This page explains how to encrypt your passwords in the primrose config file.
A java tool is provided to encrypt your passwords in the primrose config file.
There are two steps :
- Create a key to encrypt the passwords with
- Encrypt your passwords in the config file
Then run the following :
java uk.org.primrose.ConfigEncrypterIf you do not have a key file already, choose option "1", and follwing the instructions.
Once a key file is created (or you have created one previously), you may choose option "2" to encrypt your passwords.
Below is example output from the tool.
Text in green is your input, text in black is the tool's output.
C:\java\primrose_3.0>java uk.org.primrose.ConfigEncrypter
------- MENU -------
1) Create an encryption key for your pools.
2) Encrypt your primrose config files.
Choose an option (enter '1' or '2' or 'q' to quit) :: 1
Enter the full directory path (eg /usr/local/keys)
to where you would like the encryption key to be stored :: C:\java\primrose_3.0
Enter the filename (eg mykey.key) of the encryption key to be stored :: mykey.key
Successfully created encryption key : C:\java\primrose_3.0\mykey.key
------- MENU -------
1) Create an encryption key for your pools.
2) Encrypt your primrose config files.
Choose an option (enter '1' or '2' or 'q' to quit) :: 2
Enter the full path and filename (eg C:\java\primrose_3.0\mykey.key)
to where the encryption key is stored :: C:\java\primrose_3.0\mykey.key
Enter the full path and filename (eg /usr/tomcat/conf/primrose.config)
to where the primrose config is :: C:\java\primrose_3.0\dummy.conf
Encrypting passwords in file : 'C:\java\primrose_3.0\dummy.conf'
---- examplePool ----
Encrypting from 'dev' to 'jAIrsYp7hi4='
---- anotherPool ----
Encrypting from 'dev' to 'jAIrsYp7hi4='
Done !
C:\java\primrose_3.0>


