<parent>\r
<groupId>org.onap.optf.cmso</groupId>\r
<artifactId>cmso</artifactId>\r
- <version>2.3.1-SNAPSHOT</version>\r
+ <version>2.3.2-SNAPSHOT</version>\r
</parent>\r
\r
<groupId>org.onap.optf.cmso</groupId>\r
<parent>
<artifactId>cmso</artifactId>
<groupId>org.onap.optf.cmso</groupId>
- <version>2.3.1-SNAPSHOT</version>
+ <version>2.3.2-SNAPSHOT</version>
</parent>
<modelVersion>4.0.0</modelVersion>
<parent>
<groupId>org.onap.optf.cmso</groupId>
<artifactId>cmso</artifactId>
- <version>2.3.1-SNAPSHOT</version>
+ <version>2.3.2-SNAPSHOT</version>
</parent>
<groupId>org.onap.optf.cmso.optimizer</groupId>
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.core.env.Environment;
import org.springframework.stereotype.Component;
-
+import java.security.SecureRandom;
/**
* The Class PropertiesManagement.
*/
private static final String algorithm = "AES";
- private static final String cipherMode = "CBC";
+ private static final String cipherMode = "GCM";
- private static final String paddingScheme = "PKCS5Padding";
+ private static final String paddingScheme = "NoPadding";
private static final String transformation = algorithm + "/" + cipherMode + "/" + paddingScheme;
- private static final String initVector = "ONAPCMSOVECTORIV"; // 16 bytes IV
-
+ private static final SecureRandom random = new SecureRandom();
+
+
@Autowired
Environment env;
public static String getDecryptedValue(String value) {
if (value.startsWith("enc:")) {
String secret = getSecret();
- value = decrypt(secret, initVector, value.substring(4));
+ value = decrypt(secret, value.substring(4));
}
return value;
}
*/
public static String getEncryptedValue(String value) {
String secret = getSecret();
- value = encrypt(secret, initVector, value);
+ value = encrypt(secret, value);
return value;
}
- private static final String encrypt(String key, String initVector, String value) {
+ private static final String encrypt(String key, String value) {
try {
- IvParameterSpec iv = new IvParameterSpec(initVector.getBytes("UTF-8"));
+
+ byte[] bytesIV = new byte[16];
+ random.nextBytes(bytesIV);
+ IvParameterSpec iv = new IvParameterSpec(bytesIV);
SecretKeySpec skeySpec = new SecretKeySpec(key.getBytes("UTF-8"), "AES");
Cipher cipher = Cipher.getInstance(transformation);
cipher.init(Cipher.ENCRYPT_MODE, skeySpec, iv);
return null;
}
- private static final String decrypt(String key, String initVector, String encrypted) {
+ private static final String decrypt(String key, String encrypted) {
try {
- IvParameterSpec iv = new IvParameterSpec(initVector.getBytes("UTF-8"));
+ byte[] bytesIV = new byte[16];
+ random.nextBytes(bytesIV);
+ IvParameterSpec iv = new IvParameterSpec(bytesIV);
SecretKeySpec skeySpec = new SecretKeySpec(key.getBytes("UTF-8"), "AES");
Cipher cipher = Cipher.getInstance(transformation);
cipher.init(Cipher.DECRYPT_MODE, skeySpec, iv);
{
"swagger" : "2.0",
"info" : {
- "version" : "2.3.0-SNAPSHOT",
+ "version" : "2.3.1-SNAPSHOT",
"title" : "cmso-optimizer"
},
"basePath" : "/optimizer",
<parent>\r
<groupId>org.onap.optf.cmso</groupId>\r
<artifactId>cmso</artifactId>\r
- <version>2.3.1-SNAPSHOT</version>\r
+ <version>2.3.2-SNAPSHOT</version>\r
</parent>\r
\r
<groupId>org.onap.optf.cmso</groupId>\r
<parent>\r
<groupId>org.onap.optf.cmso</groupId>\r
<artifactId>cmso</artifactId>\r
- <version>2.3.1-SNAPSHOT</version>\r
+ <version>2.3.2-SNAPSHOT</version>\r
</parent>\r
\r
<groupId>org.onap.optf.cmso.service</groupId>\r
import org.springframework.beans.factory.annotation.Autowired;\r
import org.springframework.core.env.Environment;\r
import org.springframework.stereotype.Component;\r
-\r
+import java.security.SecureRandom;\r
/**\r
* The Class PropertiesManagement.\r
*/\r
private static EELFLogger errors = EELFManager.getInstance().getErrorLogger();\r
\r
private static final String algorithm = "AES";\r
- private static final String cipherMode = "CBC";\r
- private static final String paddingScheme = "PKCS5Padding";\r
+ private static final String cipherMode = "GCM";\r
+ private static final String paddingScheme = "NoPadding";\r
private static final String transformation = algorithm + "/" + cipherMode + "/" + paddingScheme;\r
- private static final String initVector = "ONAPCMSOVECTORIV"; // 16 bytes IV\r
+ private static final SecureRandom random = new SecureRandom();\r
\r
@Autowired\r
Environment env;\r
public static String getDecryptedValue(String value) {\r
if (value.startsWith("enc:")) {\r
String secret = getSecret();\r
- value = decrypt(secret, initVector, value.substring(4));\r
+ value = decrypt(secret, value.substring(4));\r
}\r
return value;\r
}\r
*/\r
public static String getEncryptedValue(String value) {\r
String secret = getSecret();\r
- value = encrypt(secret, initVector, value);\r
+ value = encrypt(secret, value);\r
return value;\r
}\r
\r
- private static final String encrypt(String key, String initVector, String value) {\r
+ private static final String encrypt(String key, String value) {\r
try {\r
- IvParameterSpec iv = new IvParameterSpec(initVector.getBytes("UTF-8"));\r
+ byte[] bytesIV = new byte[16];\r
+ random.nextBytes(bytesIV);\r
+ IvParameterSpec iv = new IvParameterSpec(bytesIV);\r
SecretKeySpec skeySpec = new SecretKeySpec(key.getBytes("UTF-8"), "AES");\r
Cipher cipher = Cipher.getInstance(transformation);\r
cipher.init(Cipher.ENCRYPT_MODE, skeySpec, iv);\r
return null;\r
}\r
\r
- private static final String decrypt(String key, String initVector, String encrypted) {\r
+ private static final String decrypt(String key, String encrypted) {\r
try {\r
- IvParameterSpec iv = new IvParameterSpec(initVector.getBytes("UTF-8"));\r
+ byte[] bytesIV = new byte[16];\r
+ random.nextBytes(bytesIV);\r
+ IvParameterSpec iv = new IvParameterSpec(bytesIV);\r
SecretKeySpec skeySpec = new SecretKeySpec(key.getBytes("UTF-8"), "AES");\r
Cipher cipher = Cipher.getInstance(transformation);\r
cipher.init(Cipher.DECRYPT_MODE, skeySpec, iv);\r
{
"swagger" : "2.0",
"info" : {
- "version" : "2.3.0-SNAPSHOT",
+ "version" : "2.3.1-SNAPSHOT",
"title" : "cmso-service"
},
"basePath" : "/cmso",
"format" : "int32",
"description" : "Maximum number of VNF changes to schedule concurrently"
},
- "policyId" : {
- "type" : "string",
- "description" : "Name of schedule optimization policy used by the change management cmso optimizer to determine available time slot"
+ "changeWindows" : {
+ "type" : "array",
+ "description" : "Lists of desired change windows to schedule the elements.",
+ "items" : {
+ "$ref" : "#/definitions/Change Window"
+ }
+ },
+ "policies" : {
+ "type" : "array",
+ "description" : "List of the policies to control optimization.",
+ "items" : {
+ "$ref" : "#/definitions/Supported Policy Information"
+ }
},
- "vnfDetails" : {
+ "elements" : {
"type" : "array",
"description" : "Lists of the VNFs to be changed and the desired change windows",
"items" : {
- "$ref" : "#/definitions/VNF Details"
+ "$ref" : "#/definitions/Optimizer Element"
}
}
},
"properties" : {
"startTime" : {
"type" : "string",
- "description" : "Earliest time that a set of changes may begin."
+ "format" : "date-time",
+ "description" : "Earliest time for which changes may begin."
},
"endTime" : {
"type" : "string",
- "description" : "Latest time by which all changes must be completed"
+ "format" : "date-time",
+ "description" : "Latest time by which all changes must be completed."
}
},
- "description" : "Time window within which the scheduler optimizer can schedule the changes for the group of NVFs"
+ "description" : "Time window for which tickets are to returned"
},
"CmDetailsMessage" : {
"type" : "object",
<parent>\r
<groupId>org.onap.optf.cmso</groupId>\r
<artifactId>cmso</artifactId>\r
- <version>2.3.1-SNAPSHOT</version>\r
+ <version>2.3.2-SNAPSHOT</version>\r
</parent>\r
\r
<groupId>org.onap.optf.cmso.sonar</groupId>\r
<parent>
<groupId>org.onap.optf.cmso</groupId>
<artifactId>cmso</artifactId>
- <version>2.3.1-SNAPSHOT</version>
+ <version>2.3.2-SNAPSHOT</version>
</parent>
<groupId>org.onap.optf.cmso.ticketmgt</groupId>
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.core.env.Environment;
import org.springframework.stereotype.Component;
-
+import java.security.SecureRandom;
/**
* The Class PropertiesManagement.
*/
private static EELFLogger errors = EELFManager.getInstance().getErrorLogger();
private static final String algorithm = "AES";
- private static final String cipherMode = "CBC";
- private static final String paddingScheme = "PKCS5Padding";
+ private static final String cipherMode = "GCM";
+ private static final String paddingScheme = "NoPadding";
private static final String transformation = algorithm + "/" + cipherMode + "/" + paddingScheme;
-
- private static final String initVector = "ONAPCMSOVECTORIV"; // 16 bytes IV
+ private static final SecureRandom random = new SecureRandom();
@Autowired
Environment env;
public static String getDecryptedValue(String value) {
if (value.startsWith("enc:")) {
String secret = getSecret();
- value = decrypt(secret, initVector, value.substring(4));
+ value = decrypt(secret,value.substring(4));
}
return value;
}
*/
public static String getEncryptedValue(String value) {
String secret = getSecret();
- value = encrypt(secret, initVector, value);
+ value = encrypt(secret, value);
return value;
}
- private static final String encrypt(String key, String initVector, String value) {
+ private static final String encrypt(String key, String value) {
try {
- IvParameterSpec iv = new IvParameterSpec(initVector.getBytes("UTF-8"));
+ byte[] bytesIV = new byte[16];
+ random.nextBytes(bytesIV);
+ IvParameterSpec iv = new IvParameterSpec(bytesIV);
SecretKeySpec skeySpec = new SecretKeySpec(key.getBytes("UTF-8"), "AES");
Cipher cipher = Cipher.getInstance(transformation);
cipher.init(Cipher.ENCRYPT_MODE, skeySpec, iv);
return null;
}
- private static final String decrypt(String key, String initVector, String encrypted) {
+ private static final String decrypt(String key, String encrypted) {
try {
- IvParameterSpec iv = new IvParameterSpec(initVector.getBytes("UTF-8"));
+
+ byte[] bytesIV = new byte[16];
+ random.nextBytes(bytesIV);
+ IvParameterSpec iv = new IvParameterSpec(bytesIV);
SecretKeySpec skeySpec = new SecretKeySpec(key.getBytes("UTF-8"), "AES");
Cipher cipher = Cipher.getInstance(transformation);
cipher.init(Cipher.DECRYPT_MODE, skeySpec, iv);
{
"swagger" : "2.0",
"info" : {
- "version" : "2.3.0-SNAPSHOT",
+ "version" : "2.3.1-SNAPSHOT",
"title" : "cmso-ticketmgt"
},
"basePath" : "/ticketmgt",
<parent>
<groupId>org.onap.optf.cmso</groupId>
<artifactId>cmso</artifactId>
- <version>2.3.1-SNAPSHOT</version>
+ <version>2.3.2-SNAPSHOT</version>
</parent>
<groupId>org.onap.optf.cmso.topology</groupId>
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.core.env.Environment;
import org.springframework.stereotype.Component;
+import java.security.SecureRandom;
@Component
public class PropertiesManagement {
private static EELFLogger errors = EELFManager.getInstance().getErrorLogger();
private static final String algorithm = "AES";
- private static final String cipherMode = "CBC";
- private static final String paddingScheme = "PKCS5Padding";
+ private static final String cipherMode = "GCM";
+ private static final String paddingScheme = "NoPadding";
private static final String transformation = algorithm + "/" + cipherMode + "/" + paddingScheme;
-
- private static final String initVector = "ONAPCMSOVECTORIV"; // 16 bytes IV
+ private static final SecureRandom random = new SecureRandom();
@Autowired
Environment env;
public static String getDecryptedValue(String value) {
if (value.startsWith("enc:")) {
String secret = getSecret();
- value = decrypt(secret, initVector, value.substring(4));
+ value = decrypt(secret, value.substring(4));
}
return value;
}
*/
public static String getEncryptedValue(String value) {
String secret = getSecret();
- value = encrypt(secret, initVector, value);
+ value = encrypt(secret, value);
return value;
}
- private static final String encrypt(String key, String initVector, String value) {
+ private static final String encrypt(String key, String value) {
try {
- IvParameterSpec iv = new IvParameterSpec(initVector.getBytes("UTF-8"));
+ byte[] bytesIV = new byte[16];
+ random.nextBytes(bytesIV);
+ IvParameterSpec iv = new IvParameterSpec(bytesIV);
SecretKeySpec skeySpec = new SecretKeySpec(key.getBytes("UTF-8"), "AES");
Cipher cipher = Cipher.getInstance(transformation);
cipher.init(Cipher.ENCRYPT_MODE, skeySpec, iv);
return null;
}
- private static final String decrypt(String key, String initVector, String encrypted) {
+ private static final String decrypt(String key, String encrypted) {
try {
- IvParameterSpec iv = new IvParameterSpec(initVector.getBytes("UTF-8"));
+ byte[] bytesIV = new byte[16];
+ random.nextBytes(bytesIV);
+ IvParameterSpec iv = new IvParameterSpec(bytesIV);
SecretKeySpec skeySpec = new SecretKeySpec(key.getBytes("UTF-8"), "AES");
Cipher cipher = Cipher.getInstance(transformation);
cipher.init(Cipher.DECRYPT_MODE, skeySpec, iv);
{
"swagger" : "2.0",
"info" : {
- "version" : "2.3.0-SNAPSHOT",
+ "version" : "2.3.1-SNAPSHOT",
"title" : "cmso-topology"
},
"basePath" : "/topology",
<groupId>org.onap.optf.cmso</groupId>
<artifactId>cmso</artifactId>
- <version>2.3.1-SNAPSHOT</version>
+ <version>2.3.2-SNAPSHOT</version>
<packaging>pom</packaging>
<name>optf-cmso</name>
major=2
minor=3
-patch=1
+patch=2
base_version=${major}.${minor}.${patch}