Skip to content

Encryption

Sergei Egorov edited this page Feb 15, 2016 · 2 revisions

You can optionally encrypt some configuration values with AES-128 CBC encryption. It also known as Rijndael-128 algorithm.

In that case, CONFIGO_ENCRYPTION_KEY must be set to the valid AES-128 key (16 bytes, aka 32 hex chars).

Encrypt

First, you will have to encrypt your password.

You can use one of the online services for it ( i.e. http://codebeautify.org/encrypt-decrypt ).

Also, it's possible to use Configo to encrypt keys:

$ export CONFIGO_ENCRYPTION_KEY="a very very very very secret key"
$ #
$ TEMP_PROPERTY='CONFIGO:{{encrypt "s3cret"}}' ./bin/configo printenv TEMP_PROPERTY
r2ix1HzYQhASbfvbF+VBvn/wlFUB/ompvmP3DBUqu7Y=

Decrypt

Then, create Templated value with decrypt method call:

app:
  db:
    host: my.super.host.domain.com
    password: CONFIGO:{{decrypt “r2ix1HzYQhASbfvbF+VBvn/wlFUB/ompvmP3DBUqu7Y=”}}

Don't forget to set CONFIGO_ENCRYPTION_KEY, otherwise decrypt method will fail and Configo will exit.

Clone this wiki locally