Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Code Block
languagepy
from cryptography.fernet import Fernet
key = Fernet.generate_key()
print (key)

Key stored in a file

This is very similar to the previous approach but the encryption key is stored in a file instead of an environment variable. For this to work you set SQ_ENCRYPTION_KEY_FILE environment variable to the (absolute) path of a file containing nothing but the encryption key.

...

The file contains commented out versions of these keys by default. Comment out the appropriate key and set the desired value.

...



Code Block
# encrypt passwords using the following settings per
# https://squirro.atlassian.net/wiki/display/DOC/Securing+your+Configuration+Files
# SQ_ENCRYPTION_KEY=
# SQ_ENCRYPTION_KEY_FILE=
# SQ_DECRYPT_COMMAND=
# SQ_ENCRYPT_COMMAND=


...