Revision ca8b1c21

b/snf-cyclades-app/Changelog
30 30
	* Replaced GANETI_MAX_LINK_NUMBER with PRIVATE_PHYSICAL_VLAN_MAX_NUMBER
31 31
	* Replaced PRIVATE_MAC_FILTERED_BRIDGE
32 32
	* Add setting ENABLED_NETWORKS
33
	* Add setting ENCRYPTION_KEY
33
	* Add setting SECRET_ENCRYPTION_KEY
34 34
	* Add settings for configuring each network type
35 35

  
36 36

  
b/snf-cyclades-app/synnefo/app_settings/default/api.py
146 146
# Key for password encryption-decryption. After changing this setting, synnefo
147 147
# will be unable to decrypt all existing Backend passwords. You will need to
148 148
# store again the new password by using 'snf-manage backend-modify'
149
ENCRYPTION_KEY= "Password Encryption Key"
149
SECRET_ENCRYPTION_KEY= "Password Encryption Key"
b/snf-cyclades-app/synnefo/db/aes_encrypt.py
2 2
from Crypto.Cipher import AES
3 3
from random import choice
4 4
from string import letters, digits
5
from synnefo.settings import ENCRYPTION_KEY
5
from synnefo.settings import SECRET_ENCRYPTION_KEY
6 6

  
7 7

  
8 8
DB_ENCRYPTED_FIELD_PREFIX = 'encrypted'
......
16 16

  
17 17

  
18 18
def encrypt(s):
19
    obj = AES.new(_pad_secret(ENCRYPTION_KEY), AES.MODE_CFB)
19
    obj = AES.new(_pad_secret(SECRET_ENCRYPTION_KEY), AES.MODE_CFB)
20 20
    return obj.encrypt(s)
21 21

  
22 22

  
23 23
def decrypt(s):
24
    obj = AES.new(_pad_secret(ENCRYPTION_KEY), AES.MODE_CFB)
24
    obj = AES.new(_pad_secret(SECRET_ENCRYPTION_KEY), AES.MODE_CFB)
25 25
    return obj.decrypt(s)
26 26

  
27 27

  

Also available in: Unified diff