How To Store Conjur Master Key In Vault

How To Store Conjur Master Key In Vault

85
Created On 11/10/26 11:02 AM - Last Modified 11/10/26 16:07 PM


Objective


In some specific cases, while encrypting server keys using a "master.key" file there is a requirement to store the Conjur Master Key in the Vault


Due to the difference between the UNIX characters created by the command "openssl rand 32 > /secrets/master.key" and the Windows ones used in the Vault perspective, they can't be copied and pasted correctly



Environment


Conjur

Procedure


To workaround this case, the "master.key" can be encrypted in 'base64' format after its generating:

openssl rand 32 > /secrets/master.key

cat /secrets/master.key | base64

After that, the 'base64' output based on the applicable characters can be added to the Vault as a new Account (for instance, in the Platform cloned from <Application/CyberArk Vault>)

 

Note, when the "master.key" is needed to be fetched from the Vault and to be used on the Conjur hosts, it's necessary to decode it in the same 'base64' format

cat /secrets/master_base64.key | base64 -d > /secrets/master.key


Below there is an example of this process on the conjur host with generating "master.key", encoding in 'base64' and storing it into "master_base64.key", decoding the "master_base64.key" in 'base64' and storing the output into "master2.key", and then comparing the data between the initial "master.key" and newly generated "master2.key"

encrypt.png



Actions
  • Print
  • Copy Link

    https://knowledgebase.paloaltonetworks.com/KCSArticleDetail?id=kA1hj0000001QoWCAU&lang=en_US&refURL=http%3A%2F%2Fknowledgebase.paloaltonetworks.com%2FKCSArticleDetail