Skip to content
This repository has been archived by the owner on Dec 30, 2022. It is now read-only.

Encrypted variables

olibanjoli edited this page Jun 25, 2014 · 6 revisions

Variable values such as prod passwords can be encrypted using AES.

To create a key file which is used to encrypt and decrypt those values use the command Create-EncryptionKey C:/temp/keyfile.txt in the package manager console. Keep the keyfile save.

To encrypt specific values in your config file add the do-encrypt attribute to your variables:

prod.xml

<?xml version="1.0"?>
<environment description="local environment">
  <variable name="Firstname" value="Jack " />
  <variable name="db.password" value="secret-password" do-encrypt="true" />
</environment>

Run Encrypt-Environments C:/temp/keyfile.txt to easily perform the encryption using your generated key.

prod.xml

<?xml version="1.0"?>
<environment description="local environment">
  <variable name="Firstname" value="Jack " />
  <variable name="db.password" value="AdwL8p7FFUlzELHJoDKzF6zUbyVYJK3Eq/RPGT3JFOaRlBkPb15tteb0zi3AjScy" encrypted="true" />
</environment>
Clone this wiki locally