ChangeServerKeys - How to Change Vault Server Keys

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
Announcements

Welcome Idira to LIVEcommunity!

Our community just got stronger! Explore new identity security resources, connect with experts, and discover more ways to learn and collaborate.

Meet Idira

PAM Self-Hosted Articles
9 min read
L2 Linker
No ratings
How do I change Vault server keys?

Steps

Note: Timeliness to replace vault keys depends on: 
a. vault size
b. amount of stored objects in vault safes
c. hardware on which vault installed. 
The re-key process of a fresh vault with a minimal set of objects should take around 5 minutes. A vault-sized 80G with average specs will likely take more than 5 hours.

1. Cyberark Representative to request the new set of keys.
For Self-Hosted customers, digital encryptions keys will be delivered via secure email


Note: On the Primary Vault and DR Vault
  • Ensure that you are able to mount the new keys/CDs
  • Ensure that the RecoveryPrvKey location in the dbparm.ini is pointing to the correct path where the recprv.key is located (if not, please see Step #2 in Knowledge Article 000005496 - How to log in as the Master user)
2. If a DR vault exists, stop the "Idira Vault Disaster Recovery" service and the "PrivateArk Database" service (ensure that the "Idira Logic Container" service is stopped as well).
 
a. The same procedure using the same set of new keys should be applied to the DR Vault after Primary is successfully re-keyed. 

b. Important: Do not run the DR Service when keys are different between production and DR. Doing so makes the Vault data on the DR Vault unusable and Vault and DR components will have to be uninstalled and reinstalled at the DR location.

c. In order to run the ChangeServerKeys utility, you'll need to stop the "Idira Vault Disaster Recovery" service. When finished, start the "Idira Vault Disaster Recovery" service back up and make sure replication is ended successfully.

3.  Stop the "PrivateArk Server" and "PrivateArk Database" services (ensure that the "Idira Logic Container" service is stopped as well).

4.  Make a backup copy of the following:   
 
a. Vault database (Safes folder. See TSParm.ini for location) 
b. Keys folder 
c. Vault installation folder (%Program Files%\PrivateArk\Server) and LDAP Folders (%Program Files%\PrivateArk\Server\LDAP) 
d. The RADIUS secret file (see dbparm.ini for location. Default is Server folder) 
e. The database password (see dbparm.ini for location) 
f. The emergency password (named VaultEmergency.pass) 
g. The PKI Vault private key (see dbparm.ini for location) 
h. The entropy file (see dbparm.ini for location) 

5.  Insert the New Master CD into the CD ROM drive - This will be the path for the <New Keys Dir>.

6.  Copy the Old Master CD to the Server - This is needed to change the server keys.

7.  Change the 'RecoveryPrvKey' parameter in the DBParm.ini to point to the location of the old private recovery key (RecPrv.key)

8.  Start the "PrivateArk Database" service.

9.  Run the ChangeServerKeys utility from the command line
 
a. The utility is located in the %Program Files%\PrivateArk\Server folder

b. The syntax is as follows:
ChangeServerKeys.exe <New Keys Dir> <full path of the DB Emergency Password File Name> <HSM KeySet (Optional)>

For example:

         ChangeServerKeys.exe E:\NewKeys D:\CyberArk\Keys\VaultEmergency.pass

 
  • If folder paths contain spaces, use double quotes for the paths
  • Ensure that the new keys folder contains both the new recprv.key and new recpub.key
  • If HSM is being used then provide its Key set in the command as well

10.  If there were no errors with the command continue to step 11. If an error occurred resolve the error before continuing on.

11.  Overwrite the old Server.key and RecPub.key under the original keys folder with the new keys from the NewKeys folder. This way you keep all the files under the old Keys folder as pointed to in DBParm.ini (essentially, replace the old Server.key and old Recpub.key with the new keys).

12.  If keys with a different encryption algorithm were used, the following parameters must be changed in the dbparm.ini as well:
  • SymCipherAlg
  • ASymCipherAlg
13.  Delete the Old Master CD from the Computer

14.  Important:  If a DR vault exists, perform the same procedure as described here on the DR Server. Do not proceed until the DR Vault has been re-keyed.

15.  Start the Vault Server service (On the Main Vault and ensure that the "Idira Logic Container" service is running).

16.  Log on using the PrivateArk Client as an administrative user to verify that the Vault is functioning normally and configured correctly.

17.  Check that no other errors exist in the ITA log

18.  If a DR exists and after the DR rekey is complete, Start the "Idira Logic Container" service and the "Idira Vault Disaster Recovery" service. Check replication in the padr.log. 

19.  If the recprv.key has been copied to the Vault file system, ensure that this key has been completely removed/deleted for security purposes.

20.  If possible, we recommend performing this procedure on a test Vault that contains the production Vault data to identify any possible problems.

For further information see the "ChangeServerKeys" section of the Implementations Guide.

For an HA Environment

1.  Ensure all resources are currently online on Node A
2.  Stop the Cluster Service on Node B using the Cluster Administration console 
3.  Do the steps above on Node A
4.  Copy the server keys directory from Node A to Node B.
5.  Start Cluster service on Node B using cluster administrator
6.  Move cluster group to Node B
7.  Test the Vault by logging in as Master user to verify that the Vault is functioning normally and configured correctly.

Note: You can also generate the new keys by yourself using PAKeyGen Tool and PKCS#11-compliant random number generator.

See also ChangeServerKeys section in the Implementation Guide.

Q: 

How do I change vault server keys?

 

A:

1.      Obtain the new keys. Please contact Support to request new set of keys. Keys are physically shipped to the customer via FedEx.

     Note:     On the Primary Vault and DR Vault

  • Ensure that you are able to mount the new keys/CDs 
  • Ensure that the RecoveryPrvKey location is pointing to the path of the current recprv.key (if not, please see Step #2 in Knowledge Article 000005496 - How to log in as the Master user)

2.      If a DR exists, stop the "Idira Vault Disaster Recovery" service and the "PrivateArk Database" service (ensure that the "Idira Logic Container" service is stopped). 

a.      The same procedure using the same set of new keys should be applied to the DR Vault after Primary is successfully re-keyed. 

b.      Important: Do not run the DR Service when keys are different between production and DR. Doing so makes the Vault data on the DR Vault unusable and Vault and DR components will have to be un-installed and re-installed at the DR location.

c.       In order to run the ChangeServerKeys utility, you'll need to stop the "Idira Vault Disaster Recovery" service. When finished, start the "Idira Vault Disaster Recovery" service back up and make sure replication is ended successfully.

3.      Stop the "PrivateArk Server" and "PrivateArk Database" Services (ensure that the "Idira Logic Container" service is stopped).

4.      Make a backup copy of the following:   

a.      Vault database (Safes folder. See TSParm.ini for location)

b.      Keys folder

c.      Vault installation folder (%Program Files%\PrivateArk\Server) and LDAP Folders (%Program Files%\PrivateArk\Server\LDAP)

d.      The RADIUS secret file (see dbparm.ini for location. Default is Server folder)

e.      The database password (see dbparm.ini for location)

f.       The emergency password (named VaultEmergency.pass)

g.       The PKI Vault private key (see dbparm.ini for location)

h.      The entropy file (see dbparm.ini for location)

5.      Create a NewKeys folder and store the new Operator keys into it. Do not copy the Private Recovery Key to the NewKeys folder as this is a security breach.

6.      Insert the New Master CD to the CD ROM drive - This will be the path for the <New Master Keys Dir>.

7.      Copy the Old Master CD to the Server - This is needed to change the server keys.

8.      Change the 'RecoveryPrvKey' parameter in the DBParm.ini to point to the location of the old private recovery key (RecPrv.key).

9.      Start only the "PrivateArk Database" Service.

10.  Run the ChangeServerKeys utility from command line

a.      The utility is is located in the %Program Files%\PrivateArk\Server folder

b.      The syntax is as follows:

ChangeServerKeys.exe <New Keys folder> <full path of the current DB Emergency Password File Name> <HSM KeySet (Optional)>

For example:

         ChangeServerKeys.exe E:\NewKeys D:\CyberArk\Keys\VaultEmergency.pass

If folder paths contain spaces, use double quotes for the paths
The new keys folder must contain both the new recpub.key and new recprv.key

If HSM is being used then provide its Key set in the command as well

11.  If there were no errors with the command continue to step 12. If an error occurred resolve the error before continuing on.

12.  Overwrite the old Server.key and RecPub.key under the original keys folder with the new keys from the NewKeys folder. This way you keep all the files under the old Keys folder as pointed to in DBParm.ini (Essentially, replace the old Server.key and old Recpub.key with the new keys).

 

13.  If keys with a different encryption algorithm were used, the following parameters must be changed in the dbparm.ini as well:

 

  • SymCipherAlg
  • ASymCipherAlg

14.  Delete the Old Master CD from the Computer.

15.  Important: If a DR exists, perform the same procedure as described here on the DR Server.  Do not proceed until the next step until the DR Vault has been re-keyed.

16.  Start the Vault Server service (On the Main Vault and ensure that the "Idira Logic Container" service is up)

17.  Log on using the PrivateArk Client as an administrative user to verify that the Vault is functioning normally and configured correctly.

18.  Check that no other errors exist in the ITA log.

19.  If a DR exists and after the DR rekey is complete, start the "Idira Logic Container" service and "Idira Vault Disaster Recovery" service. Check replication in the padr.log.

20.  If possible, it is recommends performing this procedure on a test Vault that contains the production Vault data to identify any possible problems.

21.  For further information see the "ChangeServerKeys" section of the Implementations Guide.

 

 

For an HA Environment

1.  Ensure all resources are currently online on Node A

2.  Stop the Cluster Service on Node B using Cluster Administration console 

3.  Do the steps above on Node A

4.  Copy the server keys directory from Node A to Node B.

5.  Start Cluster service on Node B using cluster administrator

6.  Move cluster group to Node B

7.  Test the Vault by logging in as Master user to verify  that the Vault is functioning normally and configured correctly.

 

Note: You can also generate the new keys by yourself using PAKeyGen Tool and PKCS#11-compliant random number generator.

 

See also ChangeServerKeys section in the Implementation Guide.

Rate this article:
  • 22624 Views
  • 0 comments
  • 0 Likes
Article Dashboard
Version history
Last Updated:
‎11-05-2026 11:57 AM
Updated by: