You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cloudstack.apache.org by ki...@apache.org on 2014/07/21 11:21:13 UTC
git commit: updated refs/heads/master to b8ddbe8
Repository: cloudstack
Updated Branches:
refs/heads/master fe4e4858c -> b8ddbe8ff
CLOUDSTACK-6239: Encrypt security related config values before inserting into DB
Project: http://git-wip-us.apache.org/repos/asf/cloudstack/repo
Commit: http://git-wip-us.apache.org/repos/asf/cloudstack/commit/b8ddbe8f
Tree: http://git-wip-us.apache.org/repos/asf/cloudstack/tree/b8ddbe8f
Diff: http://git-wip-us.apache.org/repos/asf/cloudstack/diff/b8ddbe8f
Branch: refs/heads/master
Commit: b8ddbe8ffa5718c5ab5c9b3438467c284af0de50
Parents: fe4e485
Author: Kishan Kavala <ki...@cloud.com>
Authored: Fri Mar 28 18:47:05 2014 +0530
Committer: Kishan Kavala <ki...@apache.org>
Committed: Mon Jul 21 14:49:07 2014 +0530
----------------------------------------------------------------------
.../cloudstack/framework/security/keys/KeysManagerImpl.java | 8 +++++---
1 file changed, 5 insertions(+), 3 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/cloudstack/blob/b8ddbe8f/framework/security/src/org/apache/cloudstack/framework/security/keys/KeysManagerImpl.java
----------------------------------------------------------------------
diff --git a/framework/security/src/org/apache/cloudstack/framework/security/keys/KeysManagerImpl.java b/framework/security/src/org/apache/cloudstack/framework/security/keys/KeysManagerImpl.java
index 550bd15..15bb49c 100644
--- a/framework/security/src/org/apache/cloudstack/framework/security/keys/KeysManagerImpl.java
+++ b/framework/security/src/org/apache/cloudstack/framework/security/keys/KeysManagerImpl.java
@@ -61,7 +61,7 @@ public class KeysManagerImpl implements KeysManager, Configurable {
public String getHashKey() {
String value = HashKey.value();
if (value == null) {
- _configDepot.set(HashKey, getBase64EncodedRandomKey(128));
+ _configDao.getValueAndInitIfNotExist(HashKey.key(), HashKey.category(), getBase64EncodedRandomKey(128), HashKey.description());
}
return HashKey.value();
@@ -71,7 +71,8 @@ public class KeysManagerImpl implements KeysManager, Configurable {
public String getEncryptionKey() {
String value = EncryptionKey.value();
if (value == null) {
- _configDepot.set(EncryptionKey, getBase64EncodedRandomKey(128));
+ _configDao.getValueAndInitIfNotExist(EncryptionKey.key(), EncryptionKey.category(), getBase64EncodedRandomKey(128),
+ EncryptionKey.description());
}
return EncryptionKey.value();
}
@@ -80,7 +81,8 @@ public class KeysManagerImpl implements KeysManager, Configurable {
public String getEncryptionIV() {
String value = EncryptionIV.value();
if (value == null) {
- _configDepot.set(EncryptionIV, getBase64EncodedRandomKey(128));
+ _configDao.getValueAndInitIfNotExist(EncryptionIV.key(), EncryptionIV.category(), getBase64EncodedRandomKey(128),
+ EncryptionIV.description());
}
return EncryptionIV.value();
}