Add encryption for passwords 45/21345/1
authorDeterme, Sebastien (sd378r) <sd378r@intl.att.com>
Mon, 30 Oct 2017 17:50:37 +0000 (18:50 +0100)
committerDeterme, Sebastien (sd378r) <sd378r@intl.att.com>
Mon, 30 Oct 2017 18:00:08 +0000 (19:00 +0100)
Add encrypted password on all values specified in the properties files,
unit tests have been reworked.

Change-Id: I619ff67fe1025f69af733b776f055914f949f26a
Issue-ID: CLAMP-64
Signed-off-by: Determe, Sebastien (sd378r) <sd378r@intl.att.com>
19 files changed:
src/main/java/org/onap/clamp/clds/client/DcaeInventoryServices.java
src/main/java/org/onap/clamp/clds/client/SdcCatalogServices.java
src/main/java/org/onap/clamp/clds/client/SdcSendReqDelegate.java
src/main/java/org/onap/clamp/clds/client/req/SdcReq.java
src/main/java/org/onap/clamp/clds/config/CamundaEngineConfiguration.java
src/main/java/org/onap/clamp/clds/config/CldsConfiguration.java
src/main/java/org/onap/clamp/clds/service/CldsService.java
src/main/java/org/onap/clamp/clds/service/SecureServiceBase.java
src/main/java/org/onap/clamp/clds/util/CryptoUtils.java [new file with mode: 0644]
src/main/java/org/onap/clamp/clds/workflow/ProcessRequestDelegate.java
src/main/resources/application.properties
src/main/resources/clds/clds-reference.properties
src/main/resources/logback.xml
src/test/java/org/onap/clamp/clds/it/CryptoUtilsItCase.java [new file with mode: 0644]
src/test/java/org/onap/clamp/clds/it/SdcCatalogServicesItCase.java
src/test/java/org/onap/clamp/clds/it/SdcReqItCase.java [moved from src/test/java/org/onap/clamp/clds/client/req/SdcReqTest.java with 73% similarity]
src/test/resources/application-no-camunda.properties
src/test/resources/example/sdc/sdcCVFCResources.json [new file with mode: 0644]
src/test/resources/https/https-test.properties

index 8f80e07..71e57de 100644 (file)
@@ -32,6 +32,7 @@ import java.io.IOException;
 import java.io.InputStreamReader;\r
 import java.net.HttpURLConnection;\r
 import java.net.URL;\r
+import java.security.GeneralSecurityException;\r
 import java.util.Date;\r
 import java.util.List;\r
 \r
@@ -52,34 +53,37 @@ import org.onap.clamp.clds.util.LoggingUtils;
 import org.springframework.beans.factory.annotation.Autowired;\r
 \r
 /**\r
+ * \r
  * This class implements the communication with DCAE for the service inventory.\r
  *\r
+ * \r
+ * \r
  */\r
 public class DcaeInventoryServices {\r
     protected static final EELFLogger logger        = EELFManager.getInstance().getLogger(DcaeInventoryServices.class);\r
     protected static final EELFLogger auditLogger   = EELFManager.getInstance().getAuditLogger();\r
     protected static final EELFLogger metricsLogger = EELFManager.getInstance().getMetricsLogger();\r
-\r
     @Autowired\r
     private RefProp                   refProp;\r
-\r
     @Autowired\r
     private CldsDao                   cldsDao;\r
-\r
     @Autowired\r
     private SdcCatalogServices        sdcCatalogServices;\r
 \r
     /**\r
+     * \r
      * Set the event inventory.\r
      * \r
      * @param cldsModel\r
      *            The CldsModel\r
      * @param userId\r
      *            The user ID\r
+     * @throws GeneralSecurityException\r
+     *             In case of issue when decryting the DCAE password\r
      * @throws ParseException\r
-     *             In case of issues during the parsing of DCAE answer\r
+     *             In case of DCAE Json parse exception\r
      */\r
-    public void setEventInventory(CldsModel cldsModel, String userId) throws ParseException {\r
+    public void setEventInventory(CldsModel cldsModel, String userId) throws GeneralSecurityException, ParseException {\r
         String artifactName = cldsModel.getControlName();\r
         DcaeEvent dcaeEvent = new DcaeEvent();\r
         String isDcaeInfoAvailable = null;\r
@@ -90,8 +94,11 @@ public class DcaeInventoryServices {
         }\r
         try {\r
             /*\r
+             * \r
              * Below are the properties required for calling the dcae inventory\r
+             * \r
              * url call\r
+             * \r
              */\r
             ModelProperties prop = new ModelProperties(cldsModel.getName(), cldsModel.getControlName(), null, false,\r
                     "{}", cldsModel.getPropText());\r
@@ -105,11 +112,9 @@ public class DcaeInventoryServices {
             }\r
             /* Invemtory service url is called in this method */\r
             isDcaeInfoAvailable = getDcaeInformation(artifactName, serviceUuid, resourceUuid);\r
-\r
             /* set dcae events */\r
             dcaeEvent.setArtifactName(artifactName);\r
             dcaeEvent.setEvent(DcaeEvent.EVENT_DISTRIBUTION);\r
-\r
         } catch (JsonProcessingException e) {\r
             logger.error("Error during JSON decoding", e);\r
         } catch (IOException ex) {\r
@@ -159,6 +164,7 @@ public class DcaeInventoryServices {
      *             In case of issues with the stream\r
      * @throws ParseException\r
      *             In case of issues with the Json parsing\r
+     * \r
      */\r
     public String getDcaeInformation(String artifactName, String serviceUuid, String resourceUuid)\r
             throws IOException, ParseException {\r
@@ -167,28 +173,22 @@ public class DcaeInventoryServices {
         String queryString = "?sdcResourceId=" + resourceUuid + "&sdcServiceId=" + serviceUuid + "&typeName="\r
                 + artifactName;\r
         String fullUrl = refProp.getStringValue("DCAE_INVENTORY_URL") + "/dcae-service-types" + queryString;\r
-\r
         logger.info("Dcae Inventory Service full url - " + fullUrl);\r
         String daceInventoryResponse = null;\r
         URL inventoryUrl = new URL(fullUrl);\r
-\r
         HttpURLConnection conn = (HttpURLConnection) inventoryUrl.openConnection();\r
         conn.setRequestMethod("GET");\r
         String reqid = LoggingUtils.getRequestId();\r
         logger.info("reqid set to " + reqid);\r
         conn.setRequestProperty("X-ECOMP-RequestID", reqid);\r
-\r
         boolean requestFailed = true;\r
         int responseCode = conn.getResponseCode();\r
         if (responseCode == 200) {\r
             requestFailed = false;\r
         }\r
-\r
         StringBuilder response = new StringBuilder();\r
-\r
         try (BufferedReader in = new BufferedReader(new InputStreamReader(conn.getInputStream()))) {\r
             String inputLine = null;\r
-\r
             while ((inputLine = in.readLine()) != null) {\r
                 response.append(inputLine);\r
             }\r
@@ -203,11 +203,8 @@ public class DcaeInventoryServices {
         String jsonResponseString = response.toString();\r
         JSONParser parser = new JSONParser();\r
         Object obj0 = parser.parse(jsonResponseString);\r
-\r
         JSONObject jsonObj = (JSONObject) obj0;\r
-\r
         Long totalCount = (Long) jsonObj.get("totalCount");\r
-\r
         int numServices = totalCount.intValue();\r
         if (numServices == 0) {\r
             daceInventoryResponse = null;\r
@@ -221,5 +218,4 @@ public class DcaeInventoryServices {
         metricsLogger.info("getDcaeInformation complete: number services returned=" + numServices);\r
         return daceInventoryResponse;\r
     }\r
-\r
 }\r
index 56f2961..36265e8 100644 (file)
@@ -40,6 +40,7 @@ import java.io.Reader;
 import java.io.StringReader;\r
 import java.net.HttpURLConnection;\r
 import java.net.URL;\r
+import java.security.GeneralSecurityException;\r
 import java.util.ArrayList;\r
 import java.util.Collections;\r
 import java.util.Date;\r
@@ -71,14 +72,16 @@ import org.onap.clamp.clds.util.LoggingUtils;
 import org.springframework.beans.factory.annotation.Autowired;\r
 \r
 public class SdcCatalogServices {\r
-    protected static final EELFLogger logger            = EELFManager.getInstance().getLogger(SdcCatalogServices.class);\r
-    protected static final EELFLogger metricsLogger     = EELFManager.getInstance().getMetricsLogger();\r
-\r
-    private static final String       RESOURCE_VF_TYPE  = "VF";\r
-    private static final String       RESOURCE_VFC_TYPE = "VFC";\r
-\r
+    protected static final EELFLogger logger             = EELFManager.getInstance()\r
+            .getLogger(SdcCatalogServices.class);\r
+    protected static final EELFLogger metricsLogger      = EELFManager.getInstance().getMetricsLogger();\r
+    private static final String       RESOURCE_VF_TYPE   = "VF";\r
+    private static final String       RESOURCE_VFC_TYPE  = "VFC";\r
+    private static final String       RESOURCE_CVFC_TYPE = "CVFC";\r
     @Autowired\r
     private RefProp                   refProp;\r
+    @Autowired\r
+    private SdcReq                    sdcReq;\r
 \r
     /**\r
      * This method get the SDC services Information with the corresponding\r
@@ -87,31 +90,29 @@ public class SdcCatalogServices {
      * @param uuid\r
      *            The service UUID\r
      * @return A Json String with all the service list\r
+     * @throws GeneralSecurityException\r
+     *             In case of issue when decryting the SDC password\r
      */\r
-    public String getSdcServicesInformation(String uuid) {\r
+    public String getSdcServicesInformation(String uuid) throws GeneralSecurityException {\r
         Date startTime = new Date();\r
         String baseUrl = refProp.getStringValue("sdc.serviceUrl");\r
-        String basicAuth = SdcReq.getSdcBasicAuth(refProp);\r
+        String basicAuth = sdcReq.getSdcBasicAuth();\r
         LoggingUtils.setTargetContext("SDC", "getSdcServicesInformation");\r
-\r
         try {\r
             String url = baseUrl;\r
             if (uuid != null) {\r
                 url = baseUrl + "/" + uuid + "/metadata";\r
             }\r
             URL urlObj = new URL(url);\r
-\r
             HttpURLConnection conn = (HttpURLConnection) urlObj.openConnection();\r
-\r
             conn.setRequestProperty(refProp.getStringValue("sdc.InstanceID"), "CLAMP-Tool");\r
             conn.setRequestProperty("Authorization", basicAuth);\r
             conn.setRequestProperty("Content-Type", "application/json;charset=UTF-8");\r
             conn.setRequestProperty("X-ECOMP-RequestID", LoggingUtils.getRequestId());\r
             conn.setRequestMethod("GET");\r
-\r
             String resp = getResponse(conn);\r
             if (resp != null) {\r
-                logger.info(resp);
+                logger.info(resp);\r
                 // metrics log\r
                 LoggingUtils.setResponseContext("0", "Get sdc services success", this.getClass().getName());\r
                 return resp;\r
@@ -124,13 +125,12 @@ public class SdcCatalogServices {
             LoggingUtils.setTimeContext(startTime, new Date());\r
             metricsLogger.info("getSdcServicesInformation complete");\r
         }\r
-\r
         return "";\r
     }\r
 \r
     /**\r
      * To remove duplicate serviceUUIDs from sdc services List.\r
-     *\r
+     * \r
      * @param rawCldsSdcServiceList\r
      *            A list of CldsSdcServiceInfo\r
      * @return A list of CldsSdcServiceInfo without duplicate service UUID\r
@@ -159,7 +159,7 @@ public class SdcCatalogServices {
 \r
     /**\r
      * To remove duplicate serviceUUIDs from sdc resources List.\r
-     *\r
+     * \r
      * @param rawCldsSdcResourceList\r
      * @return\r
      */\r
@@ -187,7 +187,7 @@ public class SdcCatalogServices {
 \r
     /**\r
      * To remove duplicate basic resources with same resourceUUIDs.\r
-     *\r
+     * \r
      * @param rawCldsSdcResourceListBasicList\r
      * @return\r
      */\r
@@ -217,12 +217,14 @@ public class SdcCatalogServices {
 \r
     /**\r
      * To get ServiceUUID by using serviceInvariantUUID.\r
-     *\r
+     * \r
      * @param invariantId\r
      *            The invariant ID\r
      * @return The service UUID\r
+     * @throws GeneralSecurityException\r
+     *             In case of issue when decryting the SDC password\r
      */\r
-    public String getServiceUuidFromServiceInvariantId(String invariantId) {\r
+    public String getServiceUuidFromServiceInvariantId(String invariantId) throws GeneralSecurityException {\r
         String serviceUuid = "";\r
         String responseStr = getSdcServicesInformation(null);\r
         List<CldsSdcServiceInfo> rawCldsSdcServicesList = getCldsSdcServicesListFromJson(responseStr);\r
@@ -241,7 +243,7 @@ public class SdcCatalogServices {
 \r
     /**\r
      * To get CldsAsdsServiceInfo class by parsing json string.\r
-     *\r
+     * \r
      * @param jsonStr\r
      *            The Json string that must be decoded\r
      * @return The list of CldsSdcServiceInfo, if there is a failure it return\r
@@ -274,7 +276,6 @@ public class SdcCatalogServices {
         if (StringUtils.isBlank(jsonStr)) {\r
             return new ArrayList<>();\r
         }\r
-\r
         try {\r
             return objectMapper.readValue(jsonStr,\r
                     objectMapper.getTypeFactory().constructCollectionType(List.class, CldsSdcResourceBasicInfo.class));\r
@@ -286,7 +287,7 @@ public class SdcCatalogServices {
 \r
     /**\r
      * To get CldsAsdsResource class by parsing json string.\r
-     *\r
+     * \r
      * @param jsonStr\r
      * @return\r
      * @throws IOException\r
@@ -298,7 +299,7 @@ public class SdcCatalogServices {
 \r
     /**\r
      * To get CldsSdcServiceDetail by parsing json string.\r
-     *\r
+     * \r
      * @param jsonStr\r
      * @return\r
      */\r
@@ -314,22 +315,24 @@ public class SdcCatalogServices {
 \r
     /**\r
      * To upload artifact to sdc based on serviceUUID and resource name on url.\r
-     *\r
+     * \r
      * @param prop\r
      * @param userid\r
      * @param url\r
      * @param formattedSdcReq\r
      * @return\r
+     * @throws GeneralSecurityException\r
      */\r
-    public String uploadArtifactToSdc(ModelProperties prop, String userid, String url, String formattedSdcReq) {
+    public String uploadArtifactToSdc(ModelProperties prop, String userid, String url, String formattedSdcReq)\r
+            throws GeneralSecurityException {\r
         // Verify whether it is triggered by Validation Test button from UI\r
         if (prop.isTest()) {\r
             return "sdc artifact upload not executed for test action";\r
         }\r
         try {\r
             logger.info("userid=" + userid);\r
-            String md5Text = SdcReq.calculateMD5ByString(formattedSdcReq);\r
-            byte[] postData = SdcReq.stringToByteArray(formattedSdcReq);\r
+            String md5Text = sdcReq.calculateMD5ByString(formattedSdcReq);\r
+            byte[] postData = sdcReq.stringToByteArray(formattedSdcReq);\r
             int postDataLength = postData.length;\r
             HttpURLConnection conn = getSdcHttpUrlConnection(userid, postDataLength, url, md5Text);\r
             try (DataOutputStream wr = new DataOutputStream(conn.getOutputStream())) {\r
@@ -341,7 +344,6 @@ public class SdcCatalogServices {
             if (responseCode == 200) {\r
                 requestFailed = false;\r
             }\r
-\r
             String responseStr = getResponse(conn);\r
             if (responseStr != null && requestFailed) {\r
                 logger.error("requestFailed - responseStr=" + responseStr);\r
@@ -352,13 +354,13 @@ public class SdcCatalogServices {
             logger.error("Exception when attempting to communicate with SDC", e);\r
             throw new SdcCommunicationException("Exception when attempting to communicate with SDC", e);\r
         }\r
-\r
     }\r
 \r
-    private HttpURLConnection getSdcHttpUrlConnection(String userid, int postDataLength, String url, String md5Text) {\r
+    private HttpURLConnection getSdcHttpUrlConnection(String userid, int postDataLength, String url, String md5Text)\r
+            throws GeneralSecurityException {\r
         try {\r
             logger.info("userid=" + userid);\r
-            String basicAuth = SdcReq.getSdcBasicAuth(refProp);\r
+            String basicAuth = sdcReq.getSdcBasicAuth();\r
             String sdcXonapInstanceId = refProp.getStringValue("sdc.sdcX-InstanceID");\r
             URL urlObj = new URL(url);\r
             HttpURLConnection conn = (HttpURLConnection) urlObj.openConnection();\r
@@ -426,7 +428,14 @@ public class SdcCatalogServices {
         }\r
     }\r
 \r
-    public boolean isCldsSdcCacheDataExpired(CldsServiceData cldsServiceData) {\r
+    /**\r
+     * Check if the SDC Info in cache has expired.\r
+     * \r
+     * @param cldsServiceData\r
+     * @return\r
+     * @throws GeneralSecurityException\r
+     */\r
+    public boolean isCldsSdcCacheDataExpired(CldsServiceData cldsServiceData) throws GeneralSecurityException {\r
         boolean expired = false;\r
         if (cldsServiceData != null && cldsServiceData.getServiceUUID() != null) {\r
             String cachedServiceUuid = cldsServiceData.getServiceUUID();\r
@@ -442,7 +451,16 @@ public class SdcCatalogServices {
         return expired;\r
     }\r
 \r
-    public CldsServiceData getCldsServiceDataWithAlarmConditions(String invariantServiceUuid) {\r
+    /**\r
+     * Get the Service Data with Alarm Conditions for a given\r
+     * invariantServiceUuid.\r
+     * \r
+     * @param invariantServiceUuid\r
+     * @return\r
+     * @throws GeneralSecurityException\r
+     */\r
+    public CldsServiceData getCldsServiceDataWithAlarmConditions(String invariantServiceUuid)\r
+            throws GeneralSecurityException {\r
         String url = refProp.getStringValue("sdc.serviceUrl");\r
         String catalogUrl = refProp.getStringValue("sdc.catalog.url");\r
         String serviceUuid = getServiceUuidFromServiceInvariantId(invariantServiceUuid);\r
@@ -460,7 +478,6 @@ public class SdcCatalogServices {
             }\r
             cldsServiceData.setServiceUUID(cldsSdcServiceDetail.getUuid());\r
             cldsServiceData.setServiceInvariantUUID(cldsSdcServiceDetail.getInvariantUUID());\r
-\r
             // To remove duplicate resources from serviceDetail and add valid\r
             // vfs to service\r
             if (cldsSdcServiceDetail != null && cldsSdcServiceDetail.getResources() != null) {\r
@@ -488,13 +505,15 @@ public class SdcCatalogServices {
         return cldsServiceData;\r
     }\r
 \r
-    private void getAllVfcForVfList(List<CldsVfData> cldsVfDataList, String catalogUrl) {\r
+    private void getAllVfcForVfList(List<CldsVfData> cldsVfDataList, String catalogUrl)\r
+            throws GeneralSecurityException {\r
         // todo : refact this..\r
         if (cldsVfDataList != null && !cldsVfDataList.isEmpty()) {\r
             List<CldsSdcResourceBasicInfo> allVfResources = getAllSdcVForVfcResourcesBasedOnResourceType(\r
                     RESOURCE_VF_TYPE);\r
             List<CldsSdcResourceBasicInfo> allVfcResources = getAllSdcVForVfcResourcesBasedOnResourceType(\r
                     RESOURCE_VFC_TYPE);\r
+            allVfcResources.addAll(getAllSdcVForVfcResourcesBasedOnResourceType(RESOURCE_CVFC_TYPE));\r
             for (CldsVfData currCldsVfData : cldsVfDataList) {\r
                 if (currCldsVfData != null && currCldsVfData.getVfInvariantResourceUUID() != null) {\r
                     String resourceUuid = getResourceUuidFromResourceInvariantUuid(\r
@@ -507,7 +526,6 @@ public class SdcCatalogServices {
                             // associated with the VF's\r
                             List<CldsVfKPIData> cldsVfKPIDataList = getFieldPathFromVF(vfResponse);\r
                             currCldsVfData.setCldsKPIList(cldsVfKPIDataList);\r
-\r
                             List<CldsVfcData> vfcDataListFromVfResponse = getVfcDataListFromVfResponse(vfResponse);\r
                             if (vfcDataListFromVfResponse != null) {\r
                                 currCldsVfData.setCldsVfcs(vfcDataListFromVfResponse);\r
@@ -547,7 +565,7 @@ public class SdcCatalogServices {
         }\r
     }\r
 \r
-    private List<CldsVfcData> getVfcDataListFromVfResponse(String vfResponse) {\r
+    private List<CldsVfcData> getVfcDataListFromVfResponse(String vfResponse) throws GeneralSecurityException {\r
         ObjectMapper mapper = new ObjectMapper();\r
         ObjectNode vfResponseNode;\r
         try {\r
@@ -570,6 +588,11 @@ public class SdcCatalogServices {
                     currCldsVfcData.setVfcInvariantResourceUUID(vfcInvariantResourceUuid.textValue());\r
                     cldsVfcDataList.add(currCldsVfcData);\r
                 } else if (resourceTypeNode != null && "CVFC".equalsIgnoreCase(resourceTypeNode.textValue())) {\r
+                    TextNode vfcResourceName = (TextNode) currVfcNode.get("resourceInstanceName");\r
+                    TextNode vfcInvariantResourceUuid = (TextNode) currVfcNode.get("resourceInvariantUUID");\r
+                    currCldsVfcData.setVfcName(vfcResourceName.textValue());\r
+                    currCldsVfcData.setVfcInvariantResourceUUID(vfcInvariantResourceUuid.textValue());\r
+                    cldsVfcDataList.add(currCldsVfcData);\r
                     cldsVfcDataList.addAll(getVFCfromCVFC(currVfcNode.get("resourceUUID").textValue()));\r
                 }\r
             }\r
@@ -577,10 +600,9 @@ public class SdcCatalogServices {
         return cldsVfcDataList;\r
     }\r
 \r
-    private List<CldsVfcData> getVFCfromCVFC(String resourceUUID) {\r
+    private List<CldsVfcData> getVFCfromCVFC(String resourceUUID) throws GeneralSecurityException {\r
         String catalogUrl = refProp.getStringValue("sdc.catalog.url");\r
         List<CldsVfcData> cldsVfcDataList = new ArrayList<>();\r
-\r
         if (resourceUUID != null) {\r
             String vfcResourceUUIDUrl = catalogUrl + "resources" + "/" + resourceUUID + "/metadata";\r
             try {\r
@@ -588,7 +610,6 @@ public class SdcCatalogServices {
                 ObjectMapper mapper = new ObjectMapper();\r
                 ObjectNode vfResponseNode = (ObjectNode) mapper.readTree(vfcResponse);\r
                 ArrayNode vfcArrayNode = (ArrayNode) vfResponseNode.get("resources");\r
-\r
                 if (vfcArrayNode != null) {\r
                     for (JsonNode vfcjsonNode : vfcArrayNode) {\r
                         CldsVfcData currCldsVfcData = new CldsVfcData();\r
@@ -614,7 +635,7 @@ public class SdcCatalogServices {
         return (id != null) ? id.replaceAll("\"", "") : "";\r
     }\r
 \r
-    private List<CldsAlarmCondition> getAlarmCondtionsFromVfc(String vfcResponse) {\r
+    private List<CldsAlarmCondition> getAlarmCondtionsFromVfc(String vfcResponse) throws GeneralSecurityException {\r
         List<CldsAlarmCondition> cldsAlarmConditionList = new ArrayList<>();\r
         ObjectMapper mapper = new ObjectMapper();\r
         ObjectNode vfcResponseNode;\r
@@ -625,7 +646,6 @@ public class SdcCatalogServices {
             return cldsAlarmConditionList;\r
         }\r
         ArrayNode artifactsArrayNode = (ArrayNode) vfcResponseNode.get("artifacts");\r
-\r
         if (artifactsArrayNode != null && artifactsArrayNode.size() > 0) {\r
             for (int index = 0; index < artifactsArrayNode.size(); index++) {\r
                 ObjectNode currArtifactNode = (ObjectNode) artifactsArrayNode.get(index);\r
@@ -660,7 +680,7 @@ public class SdcCatalogServices {
     }\r
 \r
     // Method to get the artifact for any particular VF\r
-    private List<CldsVfKPIData> getFieldPathFromVF(String vfResponse) {\r
+    private List<CldsVfKPIData> getFieldPathFromVF(String vfResponse) throws GeneralSecurityException {\r
         List<CldsVfKPIData> cldsVfKPIDataList = new ArrayList<>();\r
         ObjectMapper mapper = new ObjectMapper();\r
         ObjectNode vfResponseNode;\r
@@ -671,7 +691,6 @@ public class SdcCatalogServices {
             return cldsVfKPIDataList;\r
         }\r
         ArrayNode artifactsArrayNode = (ArrayNode) vfResponseNode.get("artifacts");\r
-\r
         if (artifactsArrayNode != null && artifactsArrayNode.size() > 0) {\r
             for (int index = 0; index < artifactsArrayNode.size(); index++) {\r
                 ObjectNode currArtifactNode = (ObjectNode) artifactsArrayNode.get(index);\r
@@ -682,7 +701,7 @@ public class SdcCatalogServices {
                     artifactName = artifactNameNode.textValue();\r
                     artifactName = artifactName.substring(artifactName.lastIndexOf('.') + 1);\r
                 }\r
-                if (artifactUrlNode != null && "csv".equalsIgnoreCase(artifactName)) {
+                if (artifactUrlNode != null && "csv".equalsIgnoreCase(artifactName)) {\r
                     String responsesFromArtifactUrl = getResponsesFromArtifactUrl(artifactUrlNode.textValue());\r
                     cldsVfKPIDataList.addAll(parseCsvToGetFieldPath(responsesFromArtifactUrl));\r
                     logger.info(responsesFromArtifactUrl);\r
@@ -697,24 +716,19 @@ public class SdcCatalogServices {
             logger.debug("invalid csv field path Record,total columns less than 6: " + record);\r
             return null;\r
         }\r
-\r
         if (StringUtils.isBlank(record.get(1)) || StringUtils.isBlank(record.get(3))\r
                 || StringUtils.isBlank(record.get(5))) {\r
             logger.debug("Invalid csv field path Record,one of column is having blank value : " + record);\r
             return null;\r
         }\r
-\r
         CldsVfKPIData cldsVfKPIData = new CldsVfKPIData();\r
         cldsVfKPIData.setNfNamingCode(record.get(0).trim());\r
         cldsVfKPIData.setNfNamingValue(record.get(1).trim());\r
-\r
         cldsVfKPIData.setFieldPath(record.get(2).trim());\r
         cldsVfKPIData.setFieldPathValue(record.get(3).trim());\r
-\r
         cldsVfKPIData.setThresholdName(record.get(4).trim());\r
         cldsVfKPIData.setThresholdValue(record.get(5).trim());\r
         return cldsVfKPIData;\r
-\r
     }\r
 \r
     // Method to get the artifactURL Data and set the CldsVfKPIData node\r
@@ -759,7 +773,14 @@ public class SdcCatalogServices {
         cldsAlarmConditionList.add(cldsAlarmCondition);\r
     }\r
 \r
-    public String getResponsesFromArtifactUrl(String artifactsUrl) {\r
+    /**\r
+     * Get the responses for the current artifact from the artifacts URL.\r
+     * \r
+     * @param artifactsUrl\r
+     * @return\r
+     * @throws GeneralSecurityException\r
+     */\r
+    public String getResponsesFromArtifactUrl(String artifactsUrl) throws GeneralSecurityException {\r
         String hostUrl = refProp.getStringValue("sdc.hostUrl");\r
         String artifactsUrlReworked = artifactsUrl.replaceAll("\"", "");\r
         String artifactUrl = hostUrl + artifactsUrlReworked;\r
@@ -771,27 +792,29 @@ public class SdcCatalogServices {
 \r
     /**\r
      * Service to services/resources/artifacts from sdc.Pass alarmConditions as\r
-     * true to get alarmconditons from artifact url and else it is false\r
-     *\r
+     * true to get alarm conditons from artifact url and else it is false\r
+     * \r
      * @param url\r
      * @param alarmConditions\r
      * @return\r
+     * @throws GeneralSecurityException\r
+     *             In case of issue when decrypting the SDC password\r
+     * \r
      */\r
-    public String getCldsServicesOrResourcesBasedOnURL(String url, boolean alarmConditions) {\r
+    public String getCldsServicesOrResourcesBasedOnURL(String url, boolean alarmConditions)\r
+            throws GeneralSecurityException {\r
         Date startTime = new Date();\r
         try {\r
             LoggingUtils.setTargetContext("SDC", "getCldsServicesOrResourcesBasedOnURL");\r
             String urlReworked = removeUnwantedBracesFromString(url);\r
             URL urlObj = new URL(urlReworked);\r
-\r
             HttpURLConnection conn = (HttpURLConnection) urlObj.openConnection();\r
-            String basicAuth = SdcReq.getSdcBasicAuth(refProp);\r
+            String basicAuth = sdcReq.getSdcBasicAuth();\r
             conn.setRequestProperty(refProp.getStringValue("sdc.InstanceID"), "CLAMP-Tool");\r
             conn.setRequestProperty("Authorization", basicAuth);\r
             conn.setRequestProperty("Content-Type", "application/json;charset=UTF-8");\r
             conn.setRequestProperty("X-ECOMP-RequestID", LoggingUtils.getRequestId());\r
             conn.setRequestMethod("GET");\r
-\r
             int responseCode = conn.getResponseCode();\r
             logger.info("Sdc resource url - " + urlReworked + " , responseCode=" + responseCode);\r
             StringBuilder response;\r
@@ -818,7 +841,6 @@ public class SdcCatalogServices {
             LoggingUtils.setTimeContext(startTime, new Date());\r
             metricsLogger.info("getCldsServicesOrResourcesBasedOnURL completed");\r
         }\r
-\r
     }\r
 \r
     /**\r
@@ -833,19 +855,15 @@ public class SdcCatalogServices {
         ObjectMapper mapper = new ObjectMapper();\r
         ObjectNode globalPropsJson;\r
         if (cldsServiceData != null && cldsServiceData.getServiceUUID() != null) {\r
-\r
             // Objectnode to save all byservice, byvf , byvfc and byalarm nodes\r
             ObjectNode byIdObjectNode = mapper.createObjectNode();\r
-\r
             // To create vf ResourceUUID node with serviceInvariantUUID\r
             ObjectNode invariantUuidObjectNodeWithVf = createVfObjectNodeByServiceInvariantUuid(mapper,\r
                     cldsServiceData);\r
             byIdObjectNode.putPOJO("byService", invariantUuidObjectNodeWithVf);\r
-\r
             // To create byVf and vfcResourceNode with vfResourceUUID\r
             ObjectNode vfcObjectNodeByVfUuid = createVfcObjectNodeByVfUuid(mapper, cldsServiceData.getCldsVfs());\r
             byIdObjectNode.putPOJO("byVf", vfcObjectNodeByVfUuid);\r
-\r
             // To create byKpi\r
             ObjectNode kpiObjectNode = mapper.createObjectNode();\r
             if (cldsServiceData.getCldsVfs() != null && !cldsServiceData.getCldsVfs().isEmpty()) {\r
@@ -856,7 +874,6 @@ public class SdcCatalogServices {
                 }\r
             }\r
             byIdObjectNode.putPOJO("byKpi", kpiObjectNode);\r
-\r
             // To create byVfc and alarmCondition with vfcResourceUUID\r
             ObjectNode vfcResourceUuidObjectNode = mapper.createObjectNode();\r
             if (cldsServiceData.getCldsVfs() != null && !cldsServiceData.getCldsVfs().isEmpty()) {\r
@@ -868,23 +885,17 @@ public class SdcCatalogServices {
                 }\r
             }\r
             byIdObjectNode.putPOJO("byVfc", vfcResourceUuidObjectNode);\r
-\r
             // To create byAlarmCondition with alarmConditionKey\r
             List<CldsAlarmCondition> allAlarmConditions = getAllAlarmConditionsFromCldsServiceData(cldsServiceData,\r
                     "alarmCondition");\r
             ObjectNode alarmCondObjectNodeByAlarmKey = createAlarmCondObjectNodeByAlarmKey(mapper, allAlarmConditions);\r
-\r
             byIdObjectNode.putPOJO("byAlarmCondition", alarmCondObjectNodeByAlarmKey);\r
-\r
             // To create byAlertDescription with AlertDescription\r
             List<CldsAlarmCondition> allAlertDescriptions = getAllAlarmConditionsFromCldsServiceData(cldsServiceData,\r
                     "alertDescription");\r
             ObjectNode alertDescObjectNodeByAlert = createAlarmCondObjectNodeByAlarmKey(mapper, allAlertDescriptions);\r
-\r
             byIdObjectNode.putPOJO("byAlertDescription", alertDescObjectNodeByAlert);\r
-\r
             globalPropsJson = decodeGlobalProp(globalProps, mapper);\r
-\r
             globalPropsJson.putPOJO("shared", byIdObjectNode);\r
             logger.info("value of objNode:" + globalPropsJson);\r
         } else {\r
@@ -940,7 +951,6 @@ public class SdcCatalogServices {
      */\r
     private List<CldsAlarmCondition> getAllAlarmConditionsFromCldsVfData(CldsVfData currCldsVfData, String eventName) {\r
         List<CldsAlarmCondition> alarmCondList = new ArrayList<>();\r
-\r
         if (currCldsVfData != null && currCldsVfData.getCldsVfcs() != null && !currCldsVfData.getCldsVfcs().isEmpty()) {\r
             for (CldsVfcData currCldsVfcData : currCldsVfData.getCldsVfcs()) {\r
                 alarmCondList.addAll(getAllAlarmConditionsFromCldsVfcData(currCldsVfcData, eventName));\r
@@ -962,7 +972,6 @@ public class SdcCatalogServices {
     private List<CldsAlarmCondition> getAllAlarmConditionsFromCldsVfcData(CldsVfcData currCldsVfcData,\r
             String eventName) {\r
         List<CldsAlarmCondition> alarmCondList = new ArrayList<>();\r
-\r
         if (currCldsVfcData != null && currCldsVfcData.getCldsAlarmConditions() != null\r
                 && !currCldsVfcData.getCldsAlarmConditions().isEmpty()) {\r
             for (CldsAlarmCondition currCldsAlarmCondition : currCldsVfcData.getCldsAlarmConditions()) {\r
@@ -978,7 +987,6 @@ public class SdcCatalogServices {
     private ObjectNode createAlarmCondObjectNodeByAlarmKey(ObjectMapper mapper,\r
             List<CldsAlarmCondition> cldsAlarmCondList) {\r
         ObjectNode alarmCondKeyNode = mapper.createObjectNode();\r
-\r
         if (cldsAlarmCondList != null && !cldsAlarmCondList.isEmpty()) {\r
             for (CldsAlarmCondition currCldsAlarmCondition : cldsAlarmCondList) {\r
                 if (currCldsAlarmCondition != null) {\r
@@ -1022,17 +1030,13 @@ public class SdcCatalogServices {
             for (CldsVfKPIData currCldsVfKpiData : cldsVfKpiDataList) {\r
                 if (currCldsVfKpiData != null) {\r
                     ObjectNode thresholdNameObjectNode = mapper.createObjectNode();\r
-\r
                     ObjectNode fieldPathObjectNode = mapper.createObjectNode();\r
                     ObjectNode nfNamingCodeNode = mapper.createObjectNode();\r
-\r
                     fieldPathObjectNode.put(currCldsVfKpiData.getFieldPathValue(),\r
                             currCldsVfKpiData.getFieldPathValue());\r
                     nfNamingCodeNode.put(currCldsVfKpiData.getNfNamingValue(), currCldsVfKpiData.getNfNamingValue());\r
-\r
                     thresholdNameObjectNode.putPOJO("fieldPath", fieldPathObjectNode);\r
                     thresholdNameObjectNode.putPOJO("nfNamingCode", nfNamingCodeNode);\r
-\r
                     vfResourceUuidObjectNode.putPOJO(currCldsVfKpiData.getThresholdValue(), thresholdNameObjectNode);\r
                 }\r
             }\r
@@ -1050,9 +1054,7 @@ public class SdcCatalogServices {
                     if (currCldsVfcData.getCldsAlarmConditions() != null\r
                             && !currCldsVfcData.getCldsAlarmConditions().isEmpty()) {\r
                         for (CldsAlarmCondition currCldsAlarmCondition : currCldsVfcData.getCldsAlarmConditions()) {\r
-                            alarmCondNode.put(currCldsAlarmCondition.getAlarmConditionKey(),\r
-                                    currCldsAlarmCondition.getAlarmConditionKey());\r
-                            if ("alarmCondition".equalsIgnoreCase(currCldsAlarmCondition.getEventName())) {
+                            if ("alarmCondition".equalsIgnoreCase(currCldsAlarmCondition.getEventName())) {\r
                                 alarmCondNode.put(currCldsAlarmCondition.getAlarmConditionKey(),\r
                                         currCldsAlarmCondition.getAlarmConditionKey());\r
                             } else {\r
@@ -1061,7 +1063,6 @@ public class SdcCatalogServices {
                             }\r
                         }\r
                     }\r
-\r
                     vfcObjectNode.putPOJO("alarmCondition", alarmCondNode);\r
                     vfcObjectNode.putPOJO("alertDescription", alertDescNode);\r
                     vfcResourceUuidObjectNode.putPOJO(currCldsVfcData.getVfcInvariantResourceUUID(), vfcObjectNode);\r
@@ -1085,7 +1086,6 @@ public class SdcCatalogServices {
      */\r
     private ObjectNode createVfcObjectNodeByVfUuid(ObjectMapper mapper, List<CldsVfData> cldsVfDataList) {\r
         ObjectNode vfUuidObjectNode = mapper.createObjectNode();\r
-\r
         if (cldsVfDataList != null && !cldsVfDataList.isEmpty()) {\r
             for (CldsVfData currCldsVfData : cldsVfDataList) {\r
                 if (currCldsVfData != null) {\r
@@ -1094,8 +1094,11 @@ public class SdcCatalogServices {
                     ObjectNode kpiObjectNode = mapper.createObjectNode();\r
                     if (currCldsVfData.getCldsVfcs() != null && !currCldsVfData.getCldsVfcs().isEmpty()) {\r
                         for (CldsVfcData currCldsVfcData : currCldsVfData.getCldsVfcs()) {\r
-                            vfcUuidNode.put(currCldsVfcData.getVfcInvariantResourceUUID(),\r
-                                    currCldsVfcData.getVfcName());\r
+                            if (currCldsVfcData.getCldsAlarmConditions() != null\r
+                                    && !currCldsVfcData.getCldsAlarmConditions().isEmpty()) {\r
+                                vfcUuidNode.put(currCldsVfcData.getVfcInvariantResourceUUID(),\r
+                                        currCldsVfcData.getVfcName());\r
+                            }\r
                         }\r
                     } else {\r
                         vfcUuidNode.put("", "");\r
@@ -1159,9 +1162,9 @@ public class SdcCatalogServices {
     }\r
 \r
     public String updateControlLoopStatusToDcae(String dcaeUrl, String invariantResourceUuid,\r
-            String invariantServiceUuid, String artifactName) {\r
+            String invariantServiceUuid, String artifactName) throws GeneralSecurityException {\r
         String baseUrl = refProp.getStringValue("sdc.serviceUrl");\r
-        String basicAuth = SdcReq.getSdcBasicAuth(refProp);\r
+        String basicAuth = sdcReq.getSdcBasicAuth();\r
         String postStatusData = "{ \n" + "\"event\" : \"" + "Created" + "\",\n" + "\"serviceUUID\" : \""\r
                 + invariantServiceUuid + "\",\n" + "\"resourceUUID\" :\"" + invariantResourceUuid + "\",\n"\r
                 + "\"artifactName\" : \"" + artifactName + "\",\n" + "} \n";\r
@@ -1171,22 +1174,18 @@ public class SdcCatalogServices {
                 url = dcaeUrl + "/closed-loops";\r
             }\r
             URL urlObj = new URL(url);\r
-\r
             HttpURLConnection conn = (HttpURLConnection) urlObj.openConnection();\r
             conn.setRequestProperty(refProp.getStringValue("sdc.InstanceID"), "CLAMP-Tool");\r
             conn.setRequestProperty("Authorization", basicAuth);\r
             conn.setRequestProperty("Content-Type", "application/json;charset=UTF-8");\r
             conn.setRequestProperty("X-ECOMP-RequestID", LoggingUtils.getRequestId());\r
             conn.setRequestMethod("POST");\r
-\r
-            byte[] postData = SdcReq.stringToByteArray(postStatusData);\r
+            byte[] postData = sdcReq.stringToByteArray(postStatusData);\r
             try (DataOutputStream wr = new DataOutputStream(conn.getOutputStream())) {\r
                 wr.write(postData);\r
             }\r
-\r
             int responseCode = conn.getResponseCode();\r
             logger.info("responseCode=" + responseCode);\r
-\r
             String resp = getResponse(conn);\r
             if (resp != null) {\r
                 return resp;\r
@@ -1203,8 +1202,12 @@ public class SdcCatalogServices {
      * @param resourceType\r
      *            The resourceType\r
      * @return The list of CldsSdcResourceBasicInfo\r
+     * @throws GeneralSecurityException\r
+     *             In case of issue when decryting the SDC password\r
+     * \r
      */\r
-    private List<CldsSdcResourceBasicInfo> getAllSdcVForVfcResourcesBasedOnResourceType(String resourceType) {\r
+    private List<CldsSdcResourceBasicInfo> getAllSdcVForVfcResourcesBasedOnResourceType(String resourceType)\r
+            throws GeneralSecurityException {\r
         String catalogUrl = refProp.getStringValue("sdc.catalog.url");\r
         String resourceUrl = catalogUrl + "resources?resourceType=" + resourceType;\r
         String allSdcVfcResources = getCldsServicesOrResourcesBasedOnURL(resourceUrl, false);\r
@@ -1260,10 +1263,12 @@ public class SdcCatalogServices {
      * @param locationArtifactName\r
      *            The location artifact name from where we can get the Artifact\r
      *            UUID\r
-     * \r
+     * @throws GeneralSecurityException\r
+     *             In case of issues to decrypt the SDC password\r
      */\r
     public void uploadToSdc(ModelProperties prop, String userid, List<String> sdcReqUrlsList, String formattedSdcReq,\r
-            String formattedSdcLocationReq, String artifactName, String locationArtifactName) {\r
+            String formattedSdcLocationReq, String artifactName, String locationArtifactName)\r
+            throws GeneralSecurityException {\r
         logger.info("userid=" + userid);\r
         String serviceInvariantUuid = getServiceInvariantUuidFromProps(prop);\r
         if (sdcReqUrlsList != null && !sdcReqUrlsList.isEmpty()) {\r
index 2d327f5..90bdcb3 100644 (file)
@@ -23,6 +23,9 @@
 
 package org.onap.clamp.clds.client;
 
+import com.att.eelf.configuration.EELFLogger;
+import com.att.eelf.configuration.EELFManager;
+
 import java.util.List;
 
 import org.camunda.bpm.engine.delegate.DelegateExecution;
@@ -33,27 +36,23 @@ import org.onap.clamp.clds.model.prop.ModelProperties;
 import org.onap.clamp.clds.model.refprop.RefProp;
 import org.springframework.beans.factory.annotation.Autowired;
 
-import com.att.eelf.configuration.EELFLogger;
-import com.att.eelf.configuration.EELFManager;
-
 /**
  * Send control loop model to dcae proxy.
  */
 public class SdcSendReqDelegate implements JavaDelegate {
     protected static final EELFLogger logger        = EELFManager.getInstance().getLogger(SdcSendReqDelegate.class);
     protected static final EELFLogger metricsLogger = EELFManager.getInstance().getMetricsLogger();
-
     @Autowired
-    private RefProp                 refProp;
-
+    private SdcReq                    sdcReq;
     @Autowired
-    private SdcCatalogServices      sdcCatalogServices;
-
-    private String                  baseUrl;
-    private String                  artifactType;
-    private String                  locationArtifactType;
-    private String                  artifactLabel;
-    private String                  locationArtifactLabel;
+    private RefProp                   refProp;
+    @Autowired
+    private SdcCatalogServices        sdcCatalogServices;
+    private String                    baseUrl;
+    private String                    artifactType;
+    private String                    locationArtifactType;
+    private String                    artifactLabel;
+    private String                    locationArtifactLabel;
 
     /**
      * Perform activity. Send to sdc proxy.
@@ -69,36 +68,37 @@ public class SdcSendReqDelegate implements JavaDelegate {
         execution.setVariable("artifactName", artifactName);
         getSdcAttributes((String) execution.getVariable("controlName"));
         ModelProperties prop = ModelProperties.create(execution);
-        String bluprintPayload = SdcReq.formatBlueprint(refProp, prop, docText);
-        // no need to upload blueprint for Holmes, thus blueprintPayload for Holmes is empty
+        String bluprintPayload = sdcReq.formatBlueprint(prop, docText);
+        // no need to upload blueprint for Holmes, thus blueprintPayload for
+        // Holmes is empty
         if (!bluprintPayload.isEmpty()) {
-            String formattedSdcReq = SdcReq.formatSdcReq(bluprintPayload, artifactName, artifactLabel, artifactType);
+            String formattedSdcReq = sdcReq.formatSdcReq(bluprintPayload, artifactName, artifactLabel, artifactType);
             if (formattedSdcReq != null) {
                 execution.setVariable("formattedArtifactReq", formattedSdcReq.getBytes());
             }
-            List<String> sdcReqUrlsList = SdcReq.getSdcReqUrlsList(prop, baseUrl, sdcCatalogServices, execution);
-
-            String sdcLocationsPayload = SdcReq.formatSdcLocationsReq(prop, artifactName);
+            List<String> sdcReqUrlsList = sdcReq.getSdcReqUrlsList(prop, baseUrl, sdcCatalogServices, execution);
+            String sdcLocationsPayload = sdcReq.formatSdcLocationsReq(prop, artifactName);
             String locationArtifactName = (String) execution.getVariable("controlName") + "-location.json";
-            String formattedSdcLocationReq = SdcReq.formatSdcReq(sdcLocationsPayload, locationArtifactName,
-                locationArtifactLabel, locationArtifactType);
+            String formattedSdcLocationReq = sdcReq.formatSdcReq(sdcLocationsPayload, locationArtifactName,
+                    locationArtifactLabel, locationArtifactType);
             if (formattedSdcLocationReq != null) {
                 execution.setVariable("formattedLocationReq", formattedSdcLocationReq.getBytes());
             }
             sdcCatalogServices.uploadToSdc(prop, userid, sdcReqUrlsList, formattedSdcReq, formattedSdcLocationReq,
-                artifactName, locationArtifactName);
+                    artifactName, locationArtifactName);
         }
     }
 
     /**
      * Method to get sdc service values from properties file.
+     * 
      * @param controlName
      */
     private void getSdcAttributes(String controlName) {
         baseUrl = refProp.getStringValue("sdc.serviceUrl");
-        artifactLabel = SdcReq
+        artifactLabel = sdcReq
                 .normalizeResourceInstanceName(refProp.getStringValue("sdc.artifactLabel") + "-" + controlName);
-        locationArtifactLabel = SdcReq
+        locationArtifactLabel = sdcReq
                 .normalizeResourceInstanceName(refProp.getStringValue("sdc.locationArtifactLabel") + "-" + controlName);
         artifactType = refProp.getStringValue("sdc.artifactType");
         locationArtifactType = refProp.getStringValue("sdc.locationArtifactType");
index 640d3b0..38e3b15 100644 (file)
@@ -31,15 +31,14 @@ import com.fasterxml.jackson.databind.JsonNode;
 import com.fasterxml.jackson.databind.ObjectMapper;
 import com.fasterxml.jackson.databind.node.ArrayNode;
 import com.fasterxml.jackson.databind.node.ObjectNode;
-import com.fasterxml.jackson.dataformat.yaml.snakeyaml.Yaml;
 
 import java.io.IOException;
 import java.nio.charset.StandardCharsets;
+import java.security.GeneralSecurityException;
 import java.util.ArrayList;
 import java.util.Base64;
 import java.util.Iterator;
 import java.util.List;
-import java.util.Map;
 import java.util.Map.Entry;
 
 import org.apache.commons.codec.digest.DigestUtils;
@@ -51,19 +50,23 @@ import org.onap.clamp.clds.model.prop.Global;
 import org.onap.clamp.clds.model.prop.ModelProperties;
 import org.onap.clamp.clds.model.prop.Tca;
 import org.onap.clamp.clds.model.refprop.RefProp;
+import org.onap.clamp.clds.util.CryptoUtils;
+import org.springframework.beans.factory.annotation.Autowired;
 
 /**
  * Construct a Sdc request given CLDS objects.
  */
 public class SdcReq {
+    @Autowired
+    protected CryptoUtils             cryptoUtils;
     protected static final EELFLogger logger        = EELFManager.getInstance().getLogger(SdcReq.class);
     protected static final EELFLogger metricsLogger = EELFManager.getInstance().getMetricsLogger();
+    @Autowired
+    protected RefProp                 refProp;
 
     /**
      * Format the Blueprint from a Yaml
      *
-     * @param refProp
-     *            The RefProp instance containing the Clds config
      * @param prop
      *            The ModelProperties describing the clds model
      * @param docText
@@ -77,14 +80,9 @@ public class SdcReq {
      * @throws IOException
      *             In case of issues
      */
-    public static String formatBlueprint(RefProp refProp, ModelProperties prop, String docText)
+    public String formatBlueprint(ModelProperties prop, String docText)
             throws JsonParseException, JsonMappingException, IOException {
-
-        Global globalProp = prop.getGlobal();
-        String service = globalProp.getService();
-
         String yamlvalue = getYamlvalue(docText);
-
         String updatedBlueprint = "";
         Tca tca = prop.getType(Tca.class);
         if (tca.isFound()) {
@@ -94,7 +92,17 @@ public class SdcReq {
         return updatedBlueprint;
     }
 
-    public static String formatSdcLocationsReq(ModelProperties prop, String artifactName) {
+    /**
+     * Format the SDC Locations Request in the JSON Format
+     *
+     * @param prop
+     *            The ModelProperties describing the clds model
+     * @param artifactName
+     *            The name of the artifact
+     *
+     * @return SDC Locations request in the JSON Format
+     */
+    public String formatSdcLocationsReq(ModelProperties prop, String artifactName) {
         ObjectMapper objectMapper = new ObjectMapper();
         Global global = prop.getGlobal();
         List<String> locationsList = global.getLocation();
@@ -106,12 +114,27 @@ public class SdcReq {
         locationObject.put("artifactName", artifactName);
         locationObject.putPOJO("locations", locationsArrayNode);
         String locationJsonFormat = locationObject.toString();
-        logger.info("Value of locaation Json Artifact:" + locationsArrayNode);
+        logger.info("Value of location Json Artifact:" + locationsArrayNode);
         return locationJsonFormat;
     }
 
-    public static String formatSdcReq(String payloadData, String artifactName, String artifactLabel,
-            String artifactType) throws IOException {
+    /**
+     * Format the SDC Request
+     *
+     * @param payloadData
+     *            The ModelProperties describing the clds model
+     * @param artifactName
+     *            The name of the artifact
+     * @param artifactLabel
+     *            The Label of the artifact
+     * @param artifactType
+     *            The type of the artifact
+     * @return formatted SDC Request
+     * @throws IOException
+     *             In case of issues
+     */
+    public String formatSdcReq(String payloadData, String artifactName, String artifactLabel, String artifactType)
+            throws IOException {
         logger.info("artifact=" + payloadData);
         String base64Artifact = base64Encode(payloadData);
         return "{ \n" + "\"payloadData\" : \"" + base64Artifact + "\",\n" + "\"artifactLabel\" : \"" + artifactLabel
@@ -120,7 +143,16 @@ public class SdcReq {
                 + "} \n";
     }
 
-    public static String getSdcReqUrl(ModelProperties prop, String url) {
+    /**
+     * Get the SDC Request URL
+     *
+     * @param prop
+     *            The ModelProperties describing the clds model
+     * @param url
+     *            url
+     * @return SDC Request URL
+     */
+    public String getSdcReqUrl(ModelProperties prop, String url) {
         Global globalProps = prop.getGlobal();
         String serviceUUID = "";
         String resourceInstanceName = "";
@@ -143,13 +175,14 @@ public class SdcReq {
      * @param prop
      * @param baseUrl
      * @param sdcCatalogServices
+     * @param execution
      * @return
+     * @throws GeneralSecurityException
      */
-    public static List<String> getSdcReqUrlsList(ModelProperties prop, String baseUrl,
-            SdcCatalogServices sdcCatalogServices, DelegateExecution execution) {
+    public List<String> getSdcReqUrlsList(ModelProperties prop, String baseUrl, SdcCatalogServices sdcCatalogServices,
+            DelegateExecution execution) throws GeneralSecurityException {
         // TODO : refact and regroup with very similar code
         List<String> urlList = new ArrayList<>();
-
         Global globalProps = prop.getGlobal();
         if (globalProps != null) {
             if (globalProps.getService() != null) {
@@ -178,7 +211,6 @@ public class SdcReq {
                 }
             }
         }
-
         return urlList;
     }
 
@@ -190,7 +222,7 @@ public class SdcReq {
      * @param inText
      * @return
      */
-    public static String normalizeResourceInstanceName(String inText) {
+    public String normalizeResourceInstanceName(String inText) {
         return inText.replace(" ", "").replace("-", "").replace(".", "").toLowerCase();
     }
 
@@ -200,7 +232,7 @@ public class SdcReq {
      * @param data
      * @return
      */
-    public static String calculateMD5ByString(String data) {
+    public String calculateMD5ByString(String data) {
         String calculatedMd5 = DigestUtils.md5Hex(data);
         // encode base-64 result
         return base64Encode(calculatedMd5.getBytes());
@@ -212,7 +244,7 @@ public class SdcReq {
      * @param inText
      * @return
      */
-    public static String base64Encode(String inText) {
+    public String base64Encode(String inText) {
         return base64Encode(stringToByteArray(inText));
     }
 
@@ -222,7 +254,7 @@ public class SdcReq {
      * @param inText
      * @return
      */
-    public static byte[] stringToByteArray(String inText) {
+    public byte[] stringToByteArray(String inText) {
         return inText.getBytes(StandardCharsets.UTF_8);
     }
 
@@ -232,7 +264,7 @@ public class SdcReq {
      * @param bytes
      * @return
      */
-    public static String base64Encode(byte[] bytes) {
+    public String base64Encode(byte[] bytes) {
         Base64.Encoder encoder = Base64.getEncoder();
         return encoder.encodeToString(bytes);
     }
@@ -241,12 +273,15 @@ public class SdcReq {
      * Return SDC id and pw as a HTTP Basic Auth string (for example: Basic
      * dGVzdDoxMjM0NTY=).
      *
-     * @return
+     * @return The String with Basic Auth and password
+     * @throws GeneralSecurityException
+     *             In case of issue when decryting the SDC password
      */
-    public static String getSdcBasicAuth(RefProp refProp) {
+    public String getSdcBasicAuth() throws GeneralSecurityException {
         String sdcId = refProp.getStringValue("sdc.serviceUsername");
         String sdcPw = refProp.getStringValue("sdc.servicePassword");
-        String idPw = base64Encode(sdcId + ":" + sdcPw);
+        String password = cryptoUtils.decrypt(sdcPw);
+        String idPw = base64Encode(sdcId + ":" + password);
         return "Basic " + idPw;
     }
 
@@ -257,7 +292,7 @@ public class SdcReq {
      * @return
      * @throws IOException
      */
-    public static String getYamlvalue(String docText) throws IOException {
+    public String getYamlvalue(String docText) throws IOException {
         ObjectMapper objectMapper = new ObjectMapper();
         String yamlFileValue = "";
         ObjectNode root = objectMapper.readValue(docText, ObjectNode.class);
index a27cc69..3790e23 100644 (file)
 
 package org.onap.clamp.clds.config;
 
+import java.security.GeneralSecurityException;
+
 import javax.sql.DataSource;
 
-import org.springframework.boot.autoconfigure.jdbc.DataSourceBuilder;
 import org.springframework.boot.context.properties.ConfigurationProperties;
 import org.springframework.context.annotation.Bean;
 import org.springframework.context.annotation.Configuration;
@@ -33,15 +34,17 @@ import org.springframework.context.annotation.Primary;
 
 @Configuration
 public class CamundaEngineConfiguration {
-
     /**
-     * Camunda Identity databse DataSource configuration
+     * Camunda Identity database DataSource configuration
+     * 
+     * @return
+     * @throws GeneralSecurityException
+     *             In case of issue during the decoding of the password
      */
     @Primary
     @Bean(name = "camundaBpmDataSource")
     @ConfigurationProperties(prefix = "spring.datasource.camunda")
     public DataSource dataSource() {
-        return DataSourceBuilder.create().build();
+        return new EncodedPasswordBasicDataSource();
     }
-
 }
index 6b7d337..0c73ac7 100644 (file)
@@ -26,6 +26,7 @@ package org.onap.clamp.clds.config;
 import com.att.ajsc.common.AjscProvider;
 import com.att.ajsc.common.AjscService;
 
+import java.security.GeneralSecurityException;
 import java.util.ArrayList;
 import java.util.List;
 
@@ -44,12 +45,12 @@ import org.onap.clamp.clds.client.SdcCatalogServices;
 import org.onap.clamp.clds.client.SdcSendReqDelegate;
 import org.onap.clamp.clds.client.TcaPolicyDelegate;
 import org.onap.clamp.clds.client.TcaPolicyDeleteDelegate;
+import org.onap.clamp.clds.client.req.SdcReq;
 import org.onap.clamp.clds.dao.CldsDao;
 import org.onap.clamp.clds.model.refprop.RefProp;
 import org.onap.clamp.clds.transform.XslTransformer;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.beans.factory.annotation.Qualifier;
-import org.springframework.boot.autoconfigure.jdbc.DataSourceBuilder;
 import org.springframework.boot.context.properties.ConfigurationProperties;
 import org.springframework.context.ApplicationContext;
 import org.springframework.context.annotation.Bean;
@@ -59,17 +60,18 @@ import org.springframework.context.annotation.Profile;
 @Configuration
 @Profile("clamp-default")
 public class CldsConfiguration {
-
     @Autowired
     private ApplicationContext context;
 
     /**
      * Clds Identity database DataSource configuration
+     * 
+     * @return
      */
     @Bean(name = "cldsDataSource")
     @ConfigurationProperties(prefix = "spring.datasource.cldsdb")
     public DataSource cldsDataSource() {
-        return DataSourceBuilder.create().build();
+        return new EncodedPasswordBasicDataSource();
     }
 
     @Bean(name = "jaxrsProviders")
@@ -101,6 +103,11 @@ public class CldsConfiguration {
         return new RefProp();
     }
 
+    @Bean
+    public SdcReq getSdcReq() {
+        return new SdcReq();
+    }
+
     @Bean
     public PolicyClient getPolicyClient() {
         return new PolicyClient();
@@ -160,5 +167,4 @@ public class CldsConfiguration {
     public HolmesPolicyDeleteDelegate getHolmesPolicyDeleteDelegate() {
         return new HolmesPolicyDeleteDelegate();
     }
-
 }
\ No newline at end of file
index 19e3caa..1570634 100644 (file)
 package org.onap.clamp.clds.service;
 
 import com.att.ajsc.common.AjscService;
+import com.att.eelf.configuration.EELFLogger;
+import com.att.eelf.configuration.EELFManager;
 import com.fasterxml.jackson.databind.JsonNode;
 import com.fasterxml.jackson.databind.ObjectMapper;
 import com.fasterxml.jackson.databind.node.ObjectNode;
 
 import java.io.IOException;
 import java.io.InputStream;
+import java.security.GeneralSecurityException;
 import java.util.Date;
 import java.util.HashMap;
 import java.util.List;
@@ -39,6 +42,7 @@ import java.util.UUID;
 import java.util.concurrent.TimeUnit;
 
 import javax.annotation.PostConstruct;
+import javax.ws.rs.BadRequestException;
 import javax.ws.rs.Consumes;
 import javax.ws.rs.DefaultValue;
 import javax.ws.rs.GET;
@@ -62,11 +66,13 @@ import org.onap.clamp.clds.client.SdcCatalogServices;
 import org.onap.clamp.clds.dao.CldsDao;
 import org.onap.clamp.clds.exception.CldsConfigException;
 import org.onap.clamp.clds.exception.SdcCommunicationException;
+import org.onap.clamp.clds.exception.policy.PolicyClientException;
 import org.onap.clamp.clds.model.CldsDBServiceCache;
 import org.onap.clamp.clds.model.CldsEvent;
 import org.onap.clamp.clds.model.CldsHealthCheck;
 import org.onap.clamp.clds.model.CldsInfo;
 import org.onap.clamp.clds.model.CldsModel;
+import org.onap.clamp.clds.model.CldsModelProp;
 import org.onap.clamp.clds.model.CldsSdcResource;
 import org.onap.clamp.clds.model.CldsSdcServiceDetail;
 import org.onap.clamp.clds.model.CldsSdcServiceInfo;
@@ -74,6 +80,7 @@ import org.onap.clamp.clds.model.CldsServiceData;
 import org.onap.clamp.clds.model.CldsTemplate;
 import org.onap.clamp.clds.model.DcaeEvent;
 import org.onap.clamp.clds.model.ValueItem;
+import org.onap.clamp.clds.model.prop.AbstractModelElement;
 import org.onap.clamp.clds.model.prop.ModelProperties;
 import org.onap.clamp.clds.model.refprop.RefProp;
 import org.onap.clamp.clds.transform.XslTransformer;
@@ -94,37 +101,26 @@ import io.swagger.annotations.ApiOperation;
 @Api(value = "/clds")
 @Path("/clds")
 public class CldsService extends SecureServiceBase {
-
+    protected static final EELFLogger securityLogger = EELFManager.getInstance().getSecurityLogger();
     @Autowired
-    private ApplicationContext      appContext;
-
-    private static final String     RESOURCE_NAME = "clds-version.properties";
-
+    private ApplicationContext        appContext;
+    private static final String       RESOURCE_NAME  = "clds-version.properties";
     @Value("${CLDS_PERMISSION_TYPE_CL:permission-type-cl}")
-    private String                  cldsPersmissionTypeCl;
-
+    private String                    cldsPersmissionTypeCl;
     @Value("${CLDS_PERMISSION_TYPE_CL_MANAGE:permission-type-cl-manage}")
-    private String                  cldsPermissionTypeClManage;
-
+    private String                    cldsPermissionTypeClManage;
     @Value("${CLDS_PERMISSION_TYPE_CL_EVENT:permission-type-cl-event}")
-    private String                  cldsPermissionTypeClEvent;
-
+    private String                    cldsPermissionTypeClEvent;
     @Value("${CLDS_PERMISSION_TYPE_FILTER_VF:permission-type-filter-vf}")
-    private String                  cldsPermissionTypeFilterVf;
-
+    private String                    cldsPermissionTypeFilterVf;
     @Value("${CLDS_PERMISSION_TYPE_TEMPLATE:permission-type-template}")
-    private String                  cldsPermissionTypeTemplate;
-
+    private String                    cldsPermissionTypeTemplate;
     @Value("${CLDS_PERMISSION_INSTANCE:dev}")
-    private String                  cldsPermissionInstance;
-
-    private SecureServicePermission permissionReadCl;
-
-    private SecureServicePermission permissionUpdateCl;
-
-    private SecureServicePermission permissionReadTemplate;
-
-    private SecureServicePermission permissionUpdateTemplate;
+    private String                    cldsPermissionInstance;
+    private SecureServicePermission   permissionReadCl;
+    private SecureServicePermission   permissionUpdateCl;
+    private SecureServicePermission   permissionReadTemplate;
+    private SecureServicePermission   permissionUpdateTemplate;
 
     @PostConstruct
     private final void afterConstruction() {
@@ -138,25 +134,19 @@ public class CldsService extends SecureServiceBase {
 
     @Value("${org.onap.clamp.config.files.globalClds:'classpath:/clds/globalClds.properties'}")
     private String                 globalClds;
-
     private Properties             globalCldsProperties;
-
     @Autowired
     private CldsDao                cldsDao;
     @Autowired
     private RuntimeService         runtimeService;
     @Autowired
     private XslTransformer         cldsBpmnTransformer;
-
     @Autowired
     private RefProp                refProp;
-
     @Autowired
     private SdcCatalogServices     sdcCatalogServices;
-
     @Autowired
     private DcaeDispatcherServices dcaeDispatcherServices;
-
     @Autowired
     private DcaeInventoryServices  dcaeInventoryServices;
 
@@ -173,23 +163,20 @@ public class CldsService extends SecureServiceBase {
      * that is currently installed from pom.xml file 3. User permissions
      *
      */
-
     @GET
     @Path("/cldsInfo")
     @Produces(MediaType.APPLICATION_JSON)
     public CldsInfo getCldsInfo() {
-
         CldsInfo cldsInfo = new CldsInfo();
-
+        Date startTime = new Date();
+        LoggingUtils.setRequestContext("CldsService: GET cldsInfo", getPrincipalName());
+        LoggingUtils.setTimeContext(startTime, new Date());
         // Get the user info
         cldsInfo.setUserName(getUserName());
-
         // Get CLDS application version
         String cldsVersion = "";
         Properties props = new Properties();
-
         ClassLoader loader = Thread.currentThread().getContextClassLoader();
-
         try (InputStream resourceStream = loader.getResourceAsStream(RESOURCE_NAME)) {
             props.load(resourceStream);
             cldsVersion = props.getProperty("clds.version");
@@ -197,22 +184,31 @@ public class CldsService extends SecureServiceBase {
             logger.error("Exception caught during the clds.version reading", ex);
         }
         cldsInfo.setCldsVersion(cldsVersion);
-
         // Get the user list of permissions
         cldsInfo.setPermissionReadCl(isAuthorizedNoException(permissionReadCl));
         cldsInfo.setPermissionUpdateCl(isAuthorizedNoException(permissionUpdateCl));
         cldsInfo.setPermissionReadTemplate(isAuthorizedNoException(permissionReadTemplate));
         cldsInfo.setPermissionUpdateTemplate(isAuthorizedNoException(permissionUpdateTemplate));
+        // audit log
+        LoggingUtils.setTimeContext(startTime, new Date());
+        LoggingUtils.setResponseContext("0", "Get cldsInfo success", this.getClass().getName());
+        securityLogger.info("GET cldsInfo completed");
         return cldsInfo;
     }
 
+    /**
+     * REST service that retrieves clds healthcheck information.
+     * 
+     * @return CldsHealthCheck class containing healthcheck info
+     */
     @GET
     @Path("/healthcheck")
     @Produces(MediaType.APPLICATION_JSON)
     public CldsHealthCheck gethealthcheck() {
-
         CldsHealthCheck cldsHealthCheck = new CldsHealthCheck();
-
+        Date startTime = new Date();
+        LoggingUtils.setRequestContext("CldsService: GET healthcheck", getPrincipalName());
+        LoggingUtils.setTimeContext(startTime, new Date());
         try {
             cldsDao.doHealthCheck();
             cldsHealthCheck.setHealthCheckComponent("CLDS-APP");
@@ -224,8 +220,11 @@ public class CldsService extends SecureServiceBase {
             cldsHealthCheck.setHealthCheckStatus("DOWN");
             cldsHealthCheck.setDescription("NOT-OK");
         }
+        // audit log
+        LoggingUtils.setTimeContext(startTime, new Date());
+        LoggingUtils.setResponseContext("0", "Get healthcheck success", this.getClass().getName());
+        securityLogger.info("GET healthcheck completed");
         return cldsHealthCheck;
-
     }
 
     /**
@@ -253,32 +252,6 @@ public class CldsService extends SecureServiceBase {
         return model.getBpmnText();
     }
 
-    /**
-     * REST service that saves BPMN for a CLDS model by name in the database.
-     * This is subset of the json putModel. This is only expected to be used for
-     * testing purposes, not by the UI.
-     *
-     * @param modelName
-     */
-    @ApiOperation(value = "Saves BPMN for a CLDS model by name in the database", notes = "This is only expected to be used for testing purposes, not by the UI", response = String.class)
-    @PUT
-    @Path("/model/bpmn/{modelName}")
-    @Consumes(MediaType.TEXT_XML)
-    public String putBpmnXml(@PathParam("modelName") String modelName, String bpmnText) {
-        LoggingUtils.setRequestContext("CldsService: PUT model bpmn", getPrincipalName());
-        isAuthorized(permissionUpdateCl);
-        logger.info("PUT bpmnText for modelName={}", modelName);
-        logger.info("PUT bpmnText={}", bpmnText);
-        CldsModel cldsModel = CldsModel.retrieve(cldsDao, modelName, true);
-        cldsModel.setBpmnText(bpmnText);
-        cldsModel.save(cldsDao, getUserId());
-        // audit log
-        LoggingUtils.setTimeContext(new Date(), new Date());
-        LoggingUtils.setResponseContext("0", "Put model bpmn success", this.getClass().getName());
-        auditLogger.info("PUT model bpmn completed");
-        return "wrote bpmnText for modelName=" + modelName;
-    }
-
     /**
      * REST service that retrieves image for a CLDS model name from the
      * database. This is subset of the json getModel. This is only expected to
@@ -304,33 +277,6 @@ public class CldsService extends SecureServiceBase {
         return model.getImageText();
     }
 
-    /**
-     * REST service that saves image for a CLDS model by name in the database.
-     * This is subset of the json putModel. This is only expected to be used for
-     * testing purposes, not by the UI.
-     *
-     * @param modelName
-     */
-    @ApiOperation(value = "Saves image for a CLDS model by name in the database", notes = "This is only expected to be used for testing purposes, not by the UI", response = String.class)
-    @PUT
-    @Path("/model/image/{modelName}")
-    @Consumes(MediaType.TEXT_XML)
-    public String putImageXml(@PathParam("modelName") String modelName, String imageText) {
-        Date startTime = new Date();
-        LoggingUtils.setRequestContext("CldsService: PUT model image", getPrincipalName());
-        isAuthorized(permissionUpdateCl);
-        logger.info("PUT iamgeText for modelName={}", modelName);
-        logger.info("PUT imageText={}", imageText);
-        CldsModel cldsModel = CldsModel.retrieve(cldsDao, modelName, true);
-        cldsModel.setImageText(imageText);
-        cldsModel.save(cldsDao, getUserId());
-        // audit log
-        LoggingUtils.setTimeContext(startTime, new Date());
-        LoggingUtils.setResponseContext("0", "Put model image success", this.getClass().getName());
-        auditLogger.info("PUT model image completed");
-        return "wrote imageText for modelName=" + modelName;
-    }
-
     /**
      * REST service that retrieves a CLDS model by name from the database.
      *
@@ -349,7 +295,6 @@ public class CldsService extends SecureServiceBase {
         CldsModel cldsModel = CldsModel.retrieve(cldsDao, modelName, false);
         isAuthorizedForVf(cldsModel);
         cldsModel.setUserAuthorizedToUpdate(isAuthorizedNoException(permissionUpdateCl));
-
         /**
          * Checking condition whether our CLDS model can call INventory Method
          */
@@ -392,7 +337,12 @@ public class CldsService extends SecureServiceBase {
         logger.info("PUT propText={}", cldsModel.getPropText());
         logger.info("PUT imageText={}", cldsModel.getImageText());
         cldsModel.setName(modelName);
-
+        try {
+            duplicateCheckforServiceVf(modelName, cldsModel.getPropText());
+        } catch (IOException | BadRequestException e) {
+            logger.error("Exception occured during duplicate check for service and VF", e);
+            throw new CldsConfigException(e.getMessage(), e);
+        }
         if (cldsModel.getTemplateName() != null) {
             CldsTemplate template = cldsDao.getTemplate(cldsModel.getTemplateName());
             if (template != null) {
@@ -441,6 +391,7 @@ public class CldsService extends SecureServiceBase {
      * @return
      * @throws TransformerException
      * @throws ParseException
+     * @throws GeneralSecurityException
      */
     @ApiOperation(value = "Saves and processes an action for a CLDS model by name", notes = "", response = String.class)
     @PUT
@@ -449,7 +400,7 @@ public class CldsService extends SecureServiceBase {
     @Produces(MediaType.APPLICATION_JSON)
     public CldsModel putModelAndProcessAction(@PathParam("action") String action,
             @PathParam("modelName") String modelName, @QueryParam("test") String test, CldsModel model)
-            throws TransformerException, ParseException {
+            throws TransformerException, ParseException, GeneralSecurityException {
         Date startTime = new Date();
         LoggingUtils.setRequestContext("CldsService: Process model action", getPrincipalName());
         String actionCd = action.toUpperCase();
@@ -460,7 +411,6 @@ public class CldsService extends SecureServiceBase {
         String userid = getUserId();
         String actionStateCd = CldsEvent.ACTION_STATE_INITIATED;
         String processDefinitionKey = "clds-process-action-wf";
-
         logger.info("PUT actionCd={}", actionCd);
         logger.info("PUT actionStateCd={}", actionStateCd);
         logger.info("PUT processDefinitionKey={}", processDefinitionKey);
@@ -471,7 +421,6 @@ public class CldsService extends SecureServiceBase {
         logger.info("PUT userid={}", userid);
         logger.info("PUT getTypeId={}", model.getTypeId());
         logger.info("PUT deploymentId={}", model.getDeploymentId());
-
         if (model.getTemplateName() != null) {
             CldsTemplate template = cldsDao.getTemplate(model.getTemplateName());
             if (template != null) {
@@ -483,16 +432,13 @@ public class CldsService extends SecureServiceBase {
         // save model to db
         model.setName(modelName);
         model.save(cldsDao, getUserId());
-
         // get vars and format if necessary
         String prop = model.getPropText();
         String bpmn = model.getBpmnText();
         String docText = model.getDocText();
         String controlName = model.getControlName();
-
         String bpmnJson = cldsBpmnTransformer.doXslTransformToString(bpmn);
         logger.info("PUT bpmnJson={}", bpmnJson);
-
         // Flag indicates whether it is triggered by Validation Test button from
         // UI
         boolean isTest = false;
@@ -507,17 +453,14 @@ public class CldsService extends SecureServiceBase {
             }
         }
         logger.info("PUT isTest={}", isTest);
-
         boolean isInsertTestEvent = false;
         String insertTestEvent = refProp.getStringValue("action.insert.test.event");
         if (insertTestEvent != null && insertTestEvent.equalsIgnoreCase("true")) {
             isInsertTestEvent = true;
         }
         logger.info("PUT isInsertTestEvent={}", isInsertTestEvent);
-
         // determine if requested action is permitted
         model.validateAction(actionCd);
-
         // input variables to camunda process
         Map<String, Object> variables = new HashMap<>();
         variables.put("actionCd", actionCd);
@@ -531,17 +474,18 @@ public class CldsService extends SecureServiceBase {
         variables.put("isInsertTestEvent", isInsertTestEvent);
         logger.info("modelProp - " + prop);
         logger.info("docText - " + docText);
-
-        // start camunda process
-        ProcessInstance pi = runtimeService.startProcessInstanceByKey(processDefinitionKey, variables);
-
-        // log process info
-        logger.info("Started processDefinitionId={}, processInstanceId={}", pi.getProcessDefinitionId(),
-                pi.getProcessInstanceId());
-
+        try {
+            // start camunda process
+            ProcessInstance pi = runtimeService.startProcessInstanceByKey(processDefinitionKey, variables);
+            // log process info
+            logger.info("Started processDefinitionId={}, processInstanceId={}", pi.getProcessDefinitionId(),
+                    pi.getProcessInstanceId());
+        } catch (SdcCommunicationException | PolicyClientException | BadRequestException e) {
+            logger.error("Exception occured during invoking bpmn process", e);
+            throw new CldsConfigException(e.getMessage(), e);
+        }
         // refresh model info from db (get fresh event info)
         CldsModel retreivedModel = CldsModel.retrieve(cldsDao, modelName, false);
-
         if (actionCd.equalsIgnoreCase(CldsEvent.ACTION_SUBMIT)
                 || actionCd.equalsIgnoreCase(CldsEvent.ACTION_RESUBMIT)) {
             // To verify inventory status and modify model status to distribute
@@ -552,7 +496,6 @@ public class CldsService extends SecureServiceBase {
         LoggingUtils.setTimeContext(startTime, new Date());
         LoggingUtils.setResponseContext("0", "Process model action success", this.getClass().getName());
         auditLogger.info("Process model action completed");
-
         return retreivedModel;
     }
 
@@ -579,14 +522,12 @@ public class CldsService extends SecureServiceBase {
             isAuthorized(permissionEvent);
             userid = getUserId();
         }
-
         // Flag indicates whether it is triggered by Validation Test button from
         // UI
         boolean isTest = false;
         if (test != null && test.equalsIgnoreCase("true")) {
             isTest = true;
         }
-
         int instanceCount = 0;
         if (dcaeEvent.getInstances() != null) {
             instanceCount = dcaeEvent.getInstances().size();
@@ -595,7 +536,6 @@ public class CldsService extends SecureServiceBase {
                 + " resourceUUID=" + dcaeEvent.getResourceUUID() + " artifactName=" + dcaeEvent.getArtifactName()
                 + " instance count=" + instanceCount + " isTest=" + isTest;
         logger.info("POST dcae event {}", msgInfo);
-
         if (isTest) {
             logger.warn("Ignorning test event from DCAE");
         } else {
@@ -610,24 +550,24 @@ public class CldsService extends SecureServiceBase {
         LoggingUtils.setTimeContext(startTime, new Date());
         LoggingUtils.setResponseContext("0", "Post dcae event success", this.getClass().getName());
         auditLogger.info("Post dcae event completed");
-
         return msgInfo;
     }
 
     /**
      * REST service that retrieves sdc services
+     * 
+     * @throws GeneralSecurityException
+     *             In case of issue when decryting the SDC password
      *
-     * @throws Exception
      */
     @ApiOperation(value = "Retrieves sdc services", notes = "", response = String.class)
     @GET
     @Path("/sdc/services")
     @Produces(MediaType.APPLICATION_JSON)
-    public String getSdcServices() {
+    public String getSdcServices() throws GeneralSecurityException {
         Date startTime = new Date();
         LoggingUtils.setRequestContext("CldsService: GET sdc services", getPrincipalName());
         String retStr;
-
         String responseStr = sdcCatalogServices.getSdcServicesInformation(null);
         try {
             retStr = createUiServiceFormatJson(responseStr);
@@ -635,7 +575,6 @@ public class CldsService extends SecureServiceBase {
             logger.error("IOException during SDC communication", e);
             throw new SdcCommunicationException("IOException during SDC communication", e);
         }
-
         logger.info("value of sdcServices : {}", retStr);
         // audit log
         LoggingUtils.setTimeContext(startTime, new Date());
@@ -663,6 +602,9 @@ public class CldsService extends SecureServiceBase {
      * REST service that retrieves total properties by using invariantUUID based
      * on refresh and non refresh
      * 
+     * @throws GeneralSecurityException
+     *             In case of issue when decryting the SDC password
+     * 
      */
     @ApiOperation(value = "Retrieves total properties by using invariantUUID based on refresh and non refresh", notes = "", response = String.class)
     @GET
@@ -670,12 +612,11 @@ public class CldsService extends SecureServiceBase {
     @Produces(MediaType.APPLICATION_JSON)
     public String getSdcPropertiesByServiceUUIDForRefresh(
             @PathParam("serviceInvariantUUID") String serviceInvariantUUID,
-            @DefaultValue("false") @QueryParam("refresh") String refresh) {
+            @DefaultValue("false") @QueryParam("refresh") String refresh) throws GeneralSecurityException {
         Date startTime = new Date();
         LoggingUtils.setRequestContext("CldsService: GET sdc properties by uuid", getPrincipalName());
         CldsServiceData cldsServiceData = new CldsServiceData();
         cldsServiceData.setServiceInvariantUUID(serviceInvariantUUID);
-
         boolean isCldsSdcDataExpired = true;
         // To getcldsService information from database cache using invariantUUID
         // only when refresh = false
@@ -698,18 +639,14 @@ public class CldsService extends SecureServiceBase {
                 cldsServiceData.setCldsServiceCache(cldsDao, cldsDBServiceCache);
             }
         }
-
         // filter out VFs the user is not authorized for
         cldsServiceData.filterVfs(this);
-
         // format retrieved data into properties json
         String sdcProperties = sdcCatalogServices.createPropertiesObjectByUUID(getGlobalCldsString(), cldsServiceData);
-
         // audit log
         LoggingUtils.setTimeContext(startTime, new Date());
         LoggingUtils.setResponseContext("0", "Get sdc properties by uuid success", this.getClass().getName());
         auditLogger.info("GET sdc properties by uuid completed");
-
         return sdcProperties;
     }
 
@@ -763,7 +700,6 @@ public class CldsService extends SecureServiceBase {
         logger.info("value of cldsserviceiNfolist: {}", rawList);
         if (rawList != null && !rawList.isEmpty()) {
             List<CldsSdcServiceInfo> cldsSdcServiceInfoList = sdcCatalogServices.removeDuplicateServices(rawList);
-
             for (CldsSdcServiceInfo currCldsSdcServiceInfo : cldsSdcServiceInfoList) {
                 if (currCldsSdcServiceInfo != null) {
                     invariantIdServiceNode.put(currCldsSdcServiceInfo.getInvariantUUID(),
@@ -785,7 +721,6 @@ public class CldsService extends SecureServiceBase {
              */
             ObjectNode serviceObjectNode = createEmptyVfAlarmObject(mapper);
             ObjectNode vfObjectNode = mapper.createObjectNode();
-
             /**
              * to create json with vf and vfresourceId
              */
@@ -793,7 +728,6 @@ public class CldsService extends SecureServiceBase {
             serviceObjectNode.putPOJO(cldsSdcServiceDetail.getInvariantUUID(), vfObjectNode);
             ObjectNode byServiceBasicObjetNode = mapper.createObjectNode();
             byServiceBasicObjetNode.putPOJO("byService", serviceObjectNode);
-
             /**
              * to create json with VFC Node
              */
@@ -827,7 +761,6 @@ public class CldsService extends SecureServiceBase {
             List<CldsSdcResource> rawCldsSdcResourceList) {
         ObjectNode vfNode = mapper.createObjectNode();
         vfNode.put("", "");
-
         // To remove repeated resource instance name from
         // resourceInstanceList
         List<CldsSdcResource> cldsSdcResourceList = sdcCatalogServices
@@ -843,7 +776,6 @@ public class CldsService extends SecureServiceBase {
             }
         }
         vfObjectNode2.putPOJO("vf", vfNode);
-
         /**
          * creating location json object using properties file value
          */
@@ -857,7 +789,6 @@ public class CldsService extends SecureServiceBase {
                     "Unable to load ui.location.default JSON in clds-references.properties properly", e);
         }
         vfObjectNode2.putPOJO("location", locationJsonNode);
-
         /**
          * creating alarm json object using properties file value
          */
@@ -872,7 +803,6 @@ public class CldsService extends SecureServiceBase {
                     e);
         }
         vfObjectNode2.putPOJO("alarmCondition", alarmStringJsonNode);
-
     }
 
     private ObjectNode createByVFCObjectNode(ObjectMapper mapper, List<CldsSdcResource> cldsSdcResourceList) {
@@ -901,7 +831,13 @@ public class CldsService extends SecureServiceBase {
             @QueryParam("test") String test, CldsModel model) throws IOException {
         Date startTime = new Date();
         LoggingUtils.setRequestContext("CldsService: Deploy model", getPrincipalName());
-        String deploymentId = "closedLoop_" + UUID.randomUUID() + "_deploymentId";
+        String deploymentId = "";
+        // If model is already deployed then pass same deployment id
+        if (model.getDeploymentId() != null && !model.getDeploymentId().isEmpty()) {
+            deploymentId = model.getDeploymentId();
+        } else {
+            deploymentId = "closedLoop_" + UUID.randomUUID() + "_deploymentId";
+        }
         String createNewDeploymentStatusUrl = dcaeDispatcherServices.createNewDeployment(deploymentId,
                 model.getTypeId());
         String operationStatus = "processing";
@@ -995,4 +931,27 @@ public class CldsService extends SecureServiceBase {
             throw new CldsConfigException("Unable to load the globalClds due to an exception", e);
         }
     }
+
+    private void duplicateCheckforServiceVf(String modelName, String modelPropText) throws IOException {
+        JsonNode modelJson = new ObjectMapper().readTree(modelPropText);
+        JsonNode globalNode = modelJson.get("global");
+        String service = AbstractModelElement.getValueByName(globalNode, "service");
+        List<String> resourceVf = AbstractModelElement.getValuesByName(globalNode, "vf");
+        if (resourceVf != null && !resourceVf.isEmpty()) {
+            List<CldsModelProp> cldsModelPropList = cldsDao.getAllModelProperties();
+            for (CldsModelProp cldsModelProp : cldsModelPropList) {
+                JsonNode currentJson = new ObjectMapper().readTree(cldsModelProp.getPropText());
+                JsonNode currentNode = currentJson.get("global");
+                String currentService = AbstractModelElement.getValueByName(currentNode, "service");
+                List<String> currentVf = AbstractModelElement.getValuesByName(currentNode, "vf");
+                if (currentVf != null && !currentVf.isEmpty()) {
+                    if (!modelName.equalsIgnoreCase(cldsModelProp.getName()) && service.equalsIgnoreCase(currentService)
+                            && resourceVf.get(0).equalsIgnoreCase(currentVf.get(0))) {
+                        throw new BadRequestException("Same service/VF already exists in " + cldsModelProp.getName()
+                                + " model, please select different service/VF.");
+                    }
+                }
+            }
+        }
+    }
 }
index acbd8bb..70ba32f 100644 (file)
@@ -27,6 +27,7 @@ import com.att.eelf.configuration.EELFLogger;
 import com.att.eelf.configuration.EELFManager;
 
 import java.security.Principal;
+import java.util.Date;
 
 import javax.ws.rs.NotAuthorizedException;
 import javax.ws.rs.core.Context;
@@ -40,6 +41,7 @@ import org.onap.clamp.clds.util.LoggingUtils;
 public abstract class SecureServiceBase {
     protected static final EELFLogger logger          = EELFManager.getInstance().getLogger(SecureServiceBase.class);
     protected static final EELFLogger auditLogger     = EELFManager.getInstance().getAuditLogger();
+    protected static final EELFLogger securityLogger  = EELFManager.getInstance().getSecurityLogger();
 
     // By default we'll set it to a default handler
     private static UserNameHandler    userNameHandler = new DefaultUserNameHandler();
@@ -63,7 +65,10 @@ public abstract class SecureServiceBase {
      */
     public String getUserName() {
         String name = userNameHandler.retrieveUserName(securityContext);
-        logger.debug("userName={}", name);
+        Date startTime = new Date();
+        LoggingUtils.setTargetContext("CLDS", "getUserName");
+        LoggingUtils.setTimeContext(startTime, new Date());
+        securityLogger.debug("User logged into the CLDS system={}", name);
         return name;
     }
 
@@ -100,30 +105,33 @@ public abstract class SecureServiceBase {
      */
     public boolean isAuthorized(SecureServicePermission inPermission) throws NotAuthorizedException {
         boolean authorized = false;
-        logger.debug("checking if {} has permission: {}", getPrincipalName(), inPermission);
+       
+        Date startTime = new Date();
+        LoggingUtils.setTargetContext("CLDS", "isAuthorized");
+        LoggingUtils.setTimeContext(startTime, new Date());
+        
+        securityLogger.debug("checking if {} has permission: {}", getPrincipalName(), inPermission);
+        
         // check if the user has the permission key or the permission key with a
         // combination of all instance and/or all action.
         if (securityContext.isUserInRole(inPermission.getKey())) {
-            logger.info("{} authorized for permission: {}", getPrincipalName(), inPermission.getKey());
+            securityLogger.info("{} authorized for permission: {}", getPrincipalName(), inPermission.getKey());            
             authorized = true;
             // the rest of these don't seem to be required - isUserInRole method
             // appears to take * as a wildcard
         } else if (securityContext.isUserInRole(inPermission.getKeyAllInstance())) {
-            logger.info("{} authorized because user has permission with * for instance: {}", getPrincipalName(),
-                    inPermission.getKey());
+            securityLogger.info("{} authorized because user has permission with * for instance: {}", getPrincipalName(), inPermission.getKey());
             authorized = true;
         } else if (securityContext.isUserInRole(inPermission.getKeyAllInstanceAction())) {
-            logger.info("{} authorized because user has permission with * for instance and * for action: {}",
-                    getPrincipalName(), inPermission.getKey());
+             securityLogger.info("{} authorized because user has permission with * for instance and * for action: {}", getPrincipalName(), inPermission.getKey());            
             authorized = true;
         } else if (securityContext.isUserInRole(inPermission.getKeyAllAction())) {
-            logger.info("{} authorized because user has permission with * for action: {}", getPrincipalName(),
-                    inPermission.getKey());
+            securityLogger.info("{} authorized because user has permission with * for action: {}", getPrincipalName(), inPermission.getKey());            
             authorized = true;
         } else {
             String msg = getPrincipalName() + " does not have permission: " + inPermission;
             LoggingUtils.setErrorContext("100", "Authorization Error");
-            logger.warn(msg);
+            securityLogger.warn(msg);
             throw new NotAuthorizedException(msg);
         }
         return authorized;
@@ -144,29 +152,32 @@ public abstract class SecureServiceBase {
      */
     public boolean isAuthorizedNoException(SecureServicePermission inPermission) {
         boolean authorized = false;
-        logger.debug("checking if {} has permission: {}", getPrincipalName(), inPermission);
+        
+        securityLogger.debug("checking if {} has permission: {}", getPrincipalName(), inPermission);
+        Date startTime = new Date();
+        LoggingUtils.setTargetContext("CLDS", "isAuthorizedNoException");
+        LoggingUtils.setTimeContext(startTime, new Date());
+        
         // check if the user has the permission key or the permission key with a
         // combination of all instance and/or all action.
         if (securityContext.isUserInRole(inPermission.getKey())) {
-            logger.info("{} authorized for permission: {}", getPrincipalName(), inPermission.getKey());
+            securityLogger.info("{} authorized for permission: {}", getPrincipalName(), inPermission.getKey());
             authorized = true;
             // the rest of these don't seem to be required - isUserInRole method
             // appears to take * as a wildcard
         } else if (securityContext.isUserInRole(inPermission.getKeyAllInstance())) {
-            logger.info("{} authorized because user has permission with * for instance: {}", getPrincipalName(),
-                    inPermission.getKey());
+            securityLogger.info("{} authorized because user has permission with * for instance: {}", getPrincipalName(),inPermission.getKey());
             authorized = true;
         } else if (securityContext.isUserInRole(inPermission.getKeyAllInstanceAction())) {
-            logger.info("{} authorized because user has permission with * for instance and * for action: {}",
-                    getPrincipalName(), inPermission.getKey());
+            securityLogger.info("{} authorized because user has permission with * for instance and * for action: {}", getPrincipalName(), inPermission.getKey());
             authorized = true;
         } else if (securityContext.isUserInRole(inPermission.getKeyAllAction())) {
-            logger.info("{} authorized because user has permission with * for action: {}", getPrincipalName(),
-                    inPermission.getKey());
+            securityLogger.info("{} authorized because user has permission with * for action: {}", getPrincipalName(), inPermission.getKey());
             authorized = true;
         } else {
             String msg = getPrincipalName() + " does not have permission: " + inPermission;
             LoggingUtils.setErrorContext("100", "Authorization Error");
+            securityLogger.warn(msg);
             logger.warn(msg);
         }
         return authorized;
diff --git a/src/main/java/org/onap/clamp/clds/util/CryptoUtils.java b/src/main/java/org/onap/clamp/clds/util/CryptoUtils.java
new file mode 100644 (file)
index 0000000..fd4d1b1
--- /dev/null
@@ -0,0 +1,116 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * ONAP CLAMP
+ * ================================================================================
+ * Copyright (C) 2017 AT&T Intellectual Property. All rights
+ *                             reserved.
+ * ================================================================================
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * ============LICENSE_END============================================
+ * ===================================================================
+ * ECOMP is a trademark and service mark of AT&T Intellectual Property.
+ */
+
+package org.onap.clamp.clds.util;
+
+import java.security.GeneralSecurityException;
+
+import javax.annotation.PostConstruct;
+import javax.crypto.Cipher;
+import javax.crypto.spec.SecretKeySpec;
+
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.core.env.Environment;
+import org.springframework.stereotype.Component;
+
+/**
+ * CryptoUtils for encrypting/decrypting string based on a Key defined in
+ * application.properties (Spring config file).
+ * 
+ */
+@Component("CryptoUtils")
+public final class CryptoUtils {
+    public static final String AES       = "AES";
+    public static final String KEY_PARAM = "org.onap.clamp.encryption.aes.key";
+    @Autowired
+    private Environment        springEnv;
+    private SecretKeySpec      secretKeySpec;
+
+    /**
+     * Initialize Method
+     * 
+     */
+    @PostConstruct
+    public void init() {
+        secretKeySpec = getSecretKeySpec(springEnv.getProperty(KEY_PARAM));
+    }
+
+    /**
+     * Encrypt a value based on the Clamp Encryption Key.
+     * 
+     * @param value
+     * @return The encrypted string
+     * @throws GeneralSecurityException
+     *             In case of issue with the encryption
+     */
+    public String encrypt(String value) throws GeneralSecurityException {
+        Cipher cipher = Cipher.getInstance(CryptoUtils.AES);
+        cipher.init(Cipher.ENCRYPT_MODE, secretKeySpec, cipher.getParameters());
+        byte[] encrypted = cipher.doFinal(value.getBytes());
+        return byteArrayToHexString(encrypted);
+    }
+
+    /**
+     * Decrypt a value.
+     * 
+     * @param message
+     *            The encrypted string that must be decrypted using the Clamp
+     *            Encryption Key
+     * @return The String decrypted
+     * @throws GeneralSecurityException
+     *             In case of issue with the encryption
+     */
+    public String decrypt(String message) throws GeneralSecurityException {
+        Cipher cipher = Cipher.getInstance(CryptoUtils.AES);
+        cipher.init(Cipher.DECRYPT_MODE, secretKeySpec);
+        byte[] decrypted = cipher.doFinal(hexStringToByteArray(message));
+        return new String(decrypted);
+    }
+
+    private SecretKeySpec getSecretKeySpec(String keyString) {
+        byte[] key = hexStringToByteArray(keyString);
+        return new SecretKeySpec(key, CryptoUtils.AES);
+    }
+
+    private String byteArrayToHexString(byte[] b) {
+        StringBuilder sb = new StringBuilder(b.length * 2);
+        for (int i = 0; i < b.length; i++) {
+            int v = b[i] & 0xff;
+            if (v < 16) {
+                sb.append('0');
+            }
+            sb.append(Integer.toHexString(v));
+        }
+        return sb.toString().toUpperCase();
+    }
+
+    private byte[] hexStringToByteArray(String s) {
+        byte[] b = new byte[s.length() / 2];
+        for (int i = 0; i < b.length; i++) {
+            int index = i * 2;
+            int v = Integer.parseInt(s.substring(index, index + 2), 16);
+            b[i] = (byte) v;
+        }
+        return b;
+    }
+}
index 19bdcaf..a5d84bb 100644 (file)
  * ECOMP is a trademark and service mark of AT&T Intellectual Property.
  */
 
-/* Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
 package org.onap.clamp.clds.workflow;
 
+import com.att.eelf.configuration.EELFLogger;
+import com.att.eelf.configuration.EELFManager;
+
 import org.camunda.bpm.engine.delegate.DelegateExecution;
 import org.camunda.bpm.engine.delegate.JavaDelegate;
 import org.springframework.stereotype.Component;
 
-import com.att.eelf.configuration.EELFLogger;
-import com.att.eelf.configuration.EELFManager;
-
 @Component
 public class ProcessRequestDelegate implements JavaDelegate {
 
-    protected static final EELFLogger       logger      = EELFManager.getInstance().getLogger(ProcessRequestDelegate.class);
+    protected static final EELFLogger logger      = EELFManager.getInstance().getLogger(ProcessRequestDelegate.class);
     protected static final EELFLogger auditLogger = EELFManager.getInstance().getAuditLogger();
 
-    // @Override
     @Override
     public void execute(DelegateExecution execution) throws Exception {
         logger.info("Processing request by '" + execution.getVariable("customerId") + "'...");
index ae5d31a..8155cb2 100644 (file)
@@ -96,7 +96,7 @@ kubernetes.namespace=com-att-ajsc
 spring.datasource.camunda.driverClassName=org.mariadb.jdbc.Driver\r
 spring.datasource.camunda.url=jdbc:mariadb:sequential://localhost:${docker.mariadb.port.host}/camundabpm?autoReconnect=true&retriesAllDown=2147483647&failoverLoopRetries=2147483647\r
 spring.datasource.camunda.username=camunda\r
-spring.datasource.camunda.password=ndMSpw4CAM\r
+spring.datasource.camunda.password=D75B89195FD913848EA11416F755390E\r
 spring.datasource.camunda.validationQuery=SELECT 1\r
 spring.datasource.camunda.validationQueryTimeout=20000\r
 spring.datasource.camunda.validationInterval=30000\r
@@ -117,7 +117,7 @@ camunda.bpm.database.schema-update=false
 spring.datasource.cldsdb.driverClassName=org.mariadb.jdbc.Driver\r
 spring.datasource.cldsdb.url=jdbc:mariadb:sequential://localhost:${docker.mariadb.port.host}/cldsdb4?autoReconnect=true&retriesAllDown=2147483647&failoverLoopRetries=2147483647\r
 spring.datasource.cldsdb.username=clds\r
-spring.datasource.cldsdb.password=sidnnd83K\r
+spring.datasource.cldsdb.password=035F8819FEBB754F3C99ECCCC1259850\r
 spring.datasource.cldsdb.validationQuery=SELECT 1\r
 spring.datasource.cldsdb.validationQueryTimeout=20000\r
 spring.datasource.cldsdb.validationInterval=30000\r
@@ -144,6 +144,7 @@ org.onap.clamp.config.files.cldsReference=classpath:/clds/clds-reference.propert
 org.onap.clamp.config.files.cldsPolicyConfig=classpath:/clds/clds-policy-config.properties\r
 org.onap.clamp.config.files.cldsUsers=classpath:/clds/clds-users.json\r
 org.onap.clamp.config.files.globalClds=classpath:/clds/globalClds.properties\r
+org.onap.clamp.encryption.aes.key=aa3871669d893c7fb8abbcda31b88b4f\r
 \r
 #Define user permission related parameters, the permission type can be changed but MUST be redefined in clds-users.properties in that case !\r
 CLDS_PERMISSION_TYPE_CL=permission-type-cl\r
index 94f6dd2..3bf018d 100644 (file)
@@ -80,7 +80,7 @@ sdc.catalog.url=http://sdc.api.simpledemo.onap.org:8080/sdc/v1/catalog/
 sdc.hostUrl=http://sdc.api.simpledemo.onap.org:8080
 sdc.serviceUrl=http://sdc.api.simpledemo.onap.org:8080/sdc/v1/catalog/services
 sdc.serviceUsername=test\r
-sdc.servicePassword=123456\r
+sdc.servicePassword=A7CADD84A22398C980847A54D23E24E9\r
 sdc.artifactLabel=blueprintclampcockpit\r
 sdc.sdcX-InstanceID=CLAMP\r
 sdc.artifactType=DCAE_INVENTORY_BLUEPRINT\r
index 8470313..a1330e3 100644 (file)
-<configuration scan="true" scanPeriod="3 seconds" debug="false">
-       <contextName>${module.ajsc.namespace.name}</contextName>
-       <jmxConfigurator />
-       <property name="logDirectory" value="log" />
-       <!-- Example evaluator filter applied against console appender -->
-       <appender name="STDOUT" class="ch.qos.logback.core.ConsoleAppender">
-               <!-- filter class="ch.qos.logback.classic.filter.LevelFilter">
-                       <level>ERROR</level>
-                       <onMatch>ACCEPT</onMatch>
-                       <onMismatch>DENY</onMismatch>
-               </filter -->
-               <!-- deny all events with a level below INFO, that is TRACE and DEBUG -->
-               <filter class="ch.qos.logback.classic.filter.ThresholdFilter">
-                       <level>INFO</level>
-               </filter>
-               <encoder>
-                       <pattern>%d{HH:mm:ss.SSS} [%thread] %-5level %logger{1024} - %msg%n
-                       </pattern>
-               </encoder>
-       </appender>
-  
-       <appender name="ERROR"
-               class="ch.qos.logback.core.rolling.RollingFileAppender">
-               <filter class="ch.qos.logback.classic.filter.ThresholdFilter">
-                       <level>WARN</level>
-               </filter>
-       <file>${logDirectory}/CLAMP/error.log</file>
-    <append>true</append>
-    <encoder>
-      <pattern>%date{"yyyy-MM-dd'T'HH:mm:ss,SSSXXX", UTC}|%X{RequestId}|%.20thread|%X{ServiceName}|%X{PartnerName}|%X{TargetEntity}|%X{TargetServiceName}|%.-5level|%X{ErrorCode}|%X{ErrorDescription}|%msg%n</pattern>
-    </encoder>
-    <rollingPolicy class="ch.qos.logback.core.rolling.FixedWindowRollingPolicy">
-      <maxIndex>10</maxIndex>
-      <FileNamePattern>${logDirectory}/CLAMP/error.%i.log.zip</FileNamePattern>
-    </rollingPolicy>
-    <triggeringPolicy class="ch.qos.logback.core.rolling.SizeBasedTriggeringPolicy">
-      <maxFileSize>10MB</maxFileSize>
-    </triggeringPolicy>
-  </appender>
-  
-  <appender name="DEBUG"
-               class="ch.qos.logback.core.rolling.RollingFileAppender">
-       <file>${logDirectory}/CLAMP/debug.log</file>
-    <append>true</append>
-    <encoder>
-      <pattern>%date{"yyyy-MM-dd'T'HH:mm:ss,SSSXXX", UTC}|%X{RequestId}|%.20thread|%.-5level|%logger{36}|%msg%n</pattern>
-    </encoder>
-    <rollingPolicy class="ch.qos.logback.core.rolling.FixedWindowRollingPolicy">
-      <maxIndex>10</maxIndex>
-      <FileNamePattern>${logDirectory}/CLAMP/debug.%i.log.zip</FileNamePattern>
-    </rollingPolicy>
-    <triggeringPolicy class="ch.qos.logback.core.rolling.SizeBasedTriggeringPolicy">
-      <maxFileSize>10MB</maxFileSize>
-    </triggeringPolicy>
-  </appender>
-
-  <appender name="AUDIT"
-               class="ch.qos.logback.core.rolling.RollingFileAppender">
-       <file>${logDirectory}/CLAMP/audit.log</file>
-    <append>true</append>
-    <encoder>
-      <pattern>%X{BeginTimestamp}|%X{EndTimestamp}|%X{RequestId}|%X{ServiceInstanceId}|%.20thread|%X{VirtualServerName}|%X{ServiceName}|%X{PartnerName}|%X{StatusCode}|%X{ResponseCode}|%X{ResponseDescription}|%X{InstanceUUID}|%.-5level|%X{AlertSeverity}|%X{ServerIPAddress}|%X{ElapsedTime}|%X{ServerFQDN}|%X{RemoteHost}|%X{ClassName}|%X{Unused}|%X{ProcessKey}|%X{CustomField1}|%X{CustomField2}|%X{CustomField3}|%X{CustomField4}|%msg%n</pattern>
-    </encoder>
-    <rollingPolicy class="ch.qos.logback.core.rolling.FixedWindowRollingPolicy">
-      <maxIndex>10</maxIndex>
-      <FileNamePattern>${logDirectory}/CLAMP/audit.%i.log.zip</FileNamePattern>
-    </rollingPolicy>
-    <triggeringPolicy class="ch.qos.logback.core.rolling.SizeBasedTriggeringPolicy">
-      <maxFileSize>10MB</maxFileSize>
-    </triggeringPolicy>
-  </appender>
-  <appender name="asyncEELFAudit" class="ch.qos.logback.classic.AsyncAppender">
-    <queueSize>256</queueSize>
-    <appender-ref ref="AUDIT" />
-  </appender>
-  
-  <appender name="METRIC"
-               class="ch.qos.logback.core.rolling.RollingFileAppender">
-       <file>${logDirectory}/CLAMP/metric.log</file>
-    <append>true</append>
-    <encoder>
-      <pattern>%X{BeginTimestamp}|%X{EndTimestamp}|%X{RequestId}|%X{ServiceInstanceId}|%.20thread|%X{VirtualServerName}|%X{ServiceName}|%X{PartnerName}|%X{TargetEntity}|%X{TargetServiceName}|%X{StatusCode}|%X{ResponseCode}|%X{ResponseDescription}|%X{InstanceUUID}|%.-5level|%X{AlertSeverity}|%X{ServerIPAddress}|%X{ElapsedTime}|%X{ServerFQDN}|%X{RemoteHost}|%X{ClassName}|%X{Unused}|%X{ProcessKey}|%X{TargetVirtualEntity}|%X{CustomField1}|%X{CustomField2}|%X{CustomField3}|%X{CustomField4}| %msg%n</pattern>
-    </encoder>
-    <rollingPolicy class="ch.qos.logback.core.rolling.FixedWindowRollingPolicy">
-      <maxIndex>10</maxIndex>
-      <FileNamePattern>${logDirectory}/CLAMP/metric.%i.log.zip</FileNamePattern>
-    </rollingPolicy>
-    <triggeringPolicy class="ch.qos.logback.core.rolling.SizeBasedTriggeringPolicy">
-      <maxFileSize>10MB</maxFileSize>
-    </triggeringPolicy>
-  </appender>
-  <appender name="asyncEELFMetrics" class="ch.qos.logback.classic.AsyncAppender">
-    <queueSize>256</queueSize>
-    <appender-ref ref="METRIC"/>
-  </appender>
-
-       <!-- CLDS related loggers -->
-       <logger name="org.onap.clamp.clds" level="INFO" />
-       
-       <!-- EELF related loggers -->
-       <logger name="com.att.eelf.audit" level="INFO" additivity="false">
-       <appender-ref ref="asyncEELFAudit" />
-       </logger>
-       <logger name="com.att.eelf.metrics" level="DEBUG" additivity="false">
-       <appender-ref ref="asyncEELFMetrics" />
-       </logger>
-       
-
-       <!-- Spring related loggers -->
-       <logger name="org.springframework" level="WARN" />
-       <logger name="org.springframework.beans" level="WARN" />
-       <logger name="org.springframework.web" level="WARN" />
-       <logger name="com.blog.spring.jms" level="WARN" />
-
-       <!-- AJSC Services (bootstrap services) -->
-       <logger name="ajsc" level="WARN" />
-       <logger name="ajsc.RouteMgmtService" level="INFO" />
-       <logger name="ajsc.ComputeService" level="INFO" />
-       <logger name="ajsc.VandelayService" level="WARN" />
-       <logger name="ajsc.FilePersistenceService" level="WARN" />
-       <logger name="ajsc.UserDefinedJarService" level="WARN" />
-       <logger name="ajsc.UserDefinedBeansDefService" level="WARN" />
-       <logger name="ajsc.LoggingConfigurationService" level="WARN" />
-
-       <!-- AJSC related loggers (DME2 Registration, csi logging, restlet, servlet 
-               logging) -->
-       <logger name="ajsc.utils" level="WARN" />
-       <logger name="ajsc.utils.DME2Helper" level="INFO" />
-       <logger name="ajsc.filters" level="DEBUG" />
-       <logger name="ajsc.beans.interceptors" level="DEBUG" />
-       <logger name="ajsc.restlet" level="DEBUG" />
-       <logger name="ajsc.servlet" level="DEBUG" />
-       <logger name="com.att" level="WARN" />
-       <logger name="com.att.ajsc.csi.logging" level="DEBUG" />
-       <logger name="com.att.ajsc.filemonitor" level="WARN" />
-       <logger name="com.att.ajsc.introscope" level="info" />
-
-       <!-- Other Loggers that may help troubleshoot -->
-       <logger name="net.sf" level="WARN" />
-       <logger name="org.apache.commons.httpclient" level="WARN" />
-       <logger name="org.apache.commons" level="WARN" />
-       <logger name="org.apache.coyote" level="WARN" />
-       <logger name="org.apache.jasper" level="WARN" />
-
-       <!-- Camel Related Loggers (including restlet/servlet/jaxrs/cxf logging. 
-               May aid in troubleshooting) -->
-       <logger name="org.apache.camel" level="WARN" />
-       <logger name="org.apache.cxf" level="WARN" />
-       <logger name="org.apache.camel.processor.interceptor" level="WARN" />
-       <logger name="org.apache.cxf.jaxrs.interceptor" level="WARN" />
-       <logger name="org.apache.cxf.service" level="WARN" />
-       <logger name="org.restlet" level="DEBUG" />
-       <logger name="org.apache.camel.component.restlet" level="DEBUG" />
-
-       <!-- logback internals logging -->
-       <logger name="ch.qos.logback.classic" level="INFO" />
-       <logger name="ch.qos.logback.core" level="INFO" />
-
-       <!-- logback jms appenders & loggers definition starts here -->
-       <!-- logback jms appenders & loggers definition starts here -->
-       <appender name="auditLogs"
-               class="ch.qos.logback.core.rolling.RollingFileAppender">
-               <filter class="ch.qos.logback.classic.filter.ThresholdFilter">
-               </filter>
-               <file>${logDirectory}/Audit-${lrmRVer}-${lrmRO}-${Pid}.log</file>
-               <rollingPolicy class="ch.qos.logback.core.rolling.FixedWindowRollingPolicy">
-                       <fileNamePattern>${logDirectory}/Audit-${lrmRVer}-${lrmRO}-${Pid}.%i.log.zip
-                       </fileNamePattern>
-                       <minIndex>1</minIndex>
-                       <maxIndex>9</maxIndex>
-               </rollingPolicy>
-               <triggeringPolicy
-                       class="ch.qos.logback.core.rolling.SizeBasedTriggeringPolicy">
-                       <maxFileSize>5MB</maxFileSize>
-               </triggeringPolicy>
-               <encoder>
-                       <pattern>"%d [%thread] %-5level %logger{1024} - %msg%n"</pattern>
-               </encoder>
-       </appender>
-       <appender name="perfLogs"
-               class="ch.qos.logback.core.rolling.RollingFileAppender">
-               <filter class="ch.qos.logback.classic.filter.ThresholdFilter">
-               </filter>
-               <file>${logDirectory}/Perform-${lrmRVer}-${lrmRO}-${Pid}.log</file>
-               <rollingPolicy class="ch.qos.logback.core.rolling.FixedWindowRollingPolicy">
-                       <fileNamePattern>${logDirectory}/Perform-${lrmRVer}-${lrmRO}-${Pid}.%i.log.zip
-                       </fileNamePattern>
-                       <minIndex>1</minIndex>
-                       <maxIndex>9</maxIndex>
-               </rollingPolicy>
-               <triggeringPolicy
-                       class="ch.qos.logback.core.rolling.SizeBasedTriggeringPolicy">
-                       <maxFileSize>5MB</maxFileSize>
-               </triggeringPolicy>
-               <encoder>
-                       <pattern>"%d [%thread] %-5level %logger{1024} - %msg%n"</pattern>
-               </encoder>
-       </appender>
-       <logger name="AuditRecord" level="INFO" additivity="FALSE">
-               <appender-ref ref="auditLogs" />
-       </logger>
-       <logger name="AuditRecord_DirectCall" level="INFO" additivity="FALSE">
-               <appender-ref ref="auditLogs" />
-       </logger>
-       <logger name="PerfTrackerRecord" level="INFO" additivity="FALSE">
-               <appender-ref ref="perfLogs" />
-       </logger>
-       <!-- logback jms appenders & loggers definition ends here -->
-       <root level="WARN">
-               <appender-ref ref="DEBUG" />
-               <appender-ref ref="ERROR" />
-               <appender-ref ref="STDOUT" />
-       </root>
+<configuration scan="true" scanPeriod="10 seconds" debug="false">
+               <contextName>${module.ajsc.namespace.name}</contextName>
+               <jmxConfigurator />
+               <property name="logDirectory" value="log" />
+               <!-- Example evaluator filter applied against console appender -->
+               <appender name="STDOUT" class="ch.qos.logback.core.ConsoleAppender">
+                               <!-- filter class="ch.qos.logback.classic.filter.LevelFilter"> <level>ERROR</level> 
+                                               <onMatch>ACCEPT</onMatch> <onMismatch>DENY</onMismatch> </filter -->
+                               <!-- deny all events with a level below INFO, that is TRACE and DEBUG -->
+                               <filter class="ch.qos.logback.classic.filter.ThresholdFilter">
+                                               <level>INFO</level>
+                               </filter>
+                               <encoder>
+                                               <pattern>%d{HH:mm:ss.SSS} [%thread] %-5level %logger{1024} - %msg%n
+                                               </pattern>
+                               </encoder>
+               </appender>
+
+               <appender name="ERROR"
+                               class="ch.qos.logback.core.rolling.RollingFileAppender">
+                               <filter class="ch.qos.logback.classic.filter.ThresholdFilter">
+                                               <level>WARN</level>
+                               </filter>
+                               <file>${logDirectory}/CLAMP/error.log</file>
+                               <append>true</append>
+                               <encoder>
+                                               <pattern>%date{"yyyy-MM-dd'T'HH:mm:ss,SSSXXX", UTC}|%X{RequestId}|%.20thread|%X{ServiceName}|%X{PartnerName}|%X{TargetEntity}|%X{TargetServiceName}|%.-5level|%X{ErrorCode}|%X{ErrorDescription}|%msg%n</pattern>
+                               </encoder>
+                               <rollingPolicy
+                                               class="ch.qos.logback.core.rolling.FixedWindowRollingPolicy">
+                                               <maxIndex>10</maxIndex>
+                                               <FileNamePattern>${logDirectory}/CLAMP/error.%i.log.zip
+                                               </FileNamePattern>
+                               </rollingPolicy>
+                               <triggeringPolicy
+                                               class="ch.qos.logback.core.rolling.SizeBasedTriggeringPolicy">
+                                               <maxFileSize>10MB</maxFileSize>
+                               </triggeringPolicy>
+               </appender>
+
+               <appender name="DEBUG"
+                               class="ch.qos.logback.core.rolling.RollingFileAppender">
+                               <file>${logDirectory}/CLAMP/debug.log</file>
+                               <append>true</append>
+                               <encoder>
+                                               <pattern>%date{"yyyy-MM-dd'T'HH:mm:ss,SSSXXX",UTC}|%X{RequestId}|%.20thread|%.-5level|%logger{36}|%msg%n</pattern>
+                               </encoder>
+                               <rollingPolicy
+                                               class="ch.qos.logback.core.rolling.FixedWindowRollingPolicy">
+                                               <maxIndex>10</maxIndex>
+                                               <FileNamePattern>${logDirectory}/CLAMP/debug.%i.log.zip
+                                               </FileNamePattern>
+                               </rollingPolicy>
+                               <triggeringPolicy
+                                               class="ch.qos.logback.core.rolling.SizeBasedTriggeringPolicy">
+                                               <maxFileSize>10MB</maxFileSize>
+                               </triggeringPolicy>
+               </appender>
+
+               <appender name="AUDIT"
+                               class="ch.qos.logback.core.rolling.RollingFileAppender">
+                               <file>${logDirectory}/CLAMP/audit.log</file>
+                               <append>true</append>
+                               <encoder>
+                                               <pattern>%X{BeginTimestamp}|%X{EndTimestamp}|%X{RequestId}|%X{ServiceInstanceId}|%.20thread|%X{VirtualServerName}|%X{ServiceName}|%X{PartnerName}|%X{StatusCode}|%X{ResponseCode}|%X{ResponseDescription}|%X{InstanceUUID}|%.-5level|%X{AlertSeverity}|%X{ServerIPAddress}|%X{ElapsedTime}|%X{ServerFQDN}|%X{RemoteHost}|%X{ClassName}|%X{Unused}|%X{ProcessKey}|%X{CustomField1}|%X{CustomField2}|%X{CustomField3}|%X{CustomField4}|%msg%n
+                                               </pattern>
+                               </encoder>
+                               <rollingPolicy
+                                               class="ch.qos.logback.core.rolling.FixedWindowRollingPolicy">
+                                               <maxIndex>10</maxIndex>
+                                               <FileNamePattern>${logDirectory}/CLAMP/audit.%i.log.zip
+                                               </FileNamePattern>
+                               </rollingPolicy>
+                               <triggeringPolicy
+                                               class="ch.qos.logback.core.rolling.SizeBasedTriggeringPolicy">
+                                               <maxFileSize>10MB</maxFileSize>
+                               </triggeringPolicy>
+               </appender>
+               <appender name="asyncEELFAudit" class="ch.qos.logback.classic.AsyncAppender">
+                               <queueSize>256</queueSize>
+                               <appender-ref ref="AUDIT" />
+               </appender>
+
+               <appender name="METRIC"
+                               class="ch.qos.logback.core.rolling.RollingFileAppender">
+                               <file>${logDirectory}/CLAMP/metric.log</file>
+                               <append>true</append>
+                               <encoder>
+                                               <pattern>%X{BeginTimestamp}|%X{EndTimestamp}|%X{RequestId}|%X{ServiceInstanceId}|%.20thread|%X{VirtualServerName}|%X{ServiceName}|%X{PartnerName}|%X{TargetEntity}|%X{TargetServiceName}|%X{StatusCode}|%X{ResponseCode}|%X{ResponseDescription}|%X{InstanceUUID}|%.-5level|%X{AlertSeverity}|%X{ServerIPAddress}|%X{ElapsedTime}|%X{ServerFQDN}|%X{RemoteHost}|%X{ClassName}|%X{Unused}|%X{ProcessKey}|%X{TargetVirtualEntity}|%X{CustomField1}|%X{CustomField2}|%X{CustomField3}|%X{CustomField4}|
+                                                               %msg%n</pattern>
+                               </encoder>
+                               <rollingPolicy
+                                               class="ch.qos.logback.core.rolling.FixedWindowRollingPolicy">
+                                               <maxIndex>10</maxIndex>
+                                               <FileNamePattern>${logDirectory}/CLAMP/metric.%i.log.zip
+                                               </FileNamePattern>
+                               </rollingPolicy>
+                               <triggeringPolicy
+                                               class="ch.qos.logback.core.rolling.SizeBasedTriggeringPolicy">
+                                               <maxFileSize>10MB</maxFileSize>
+                               </triggeringPolicy>
+               </appender>
+               <appender name="asyncEELFMetrics" class="ch.qos.logback.classic.AsyncAppender">
+                               <queueSize>256</queueSize>
+                               <appender-ref ref="METRIC" />
+               </appender>
+
+               <!-- SECURITY related loggers -->
+               <appender name="SECURITY"
+                               class="ch.qos.logback.core.rolling.RollingFileAppender">
+                               <file>${logDirectory}/CLAMP/security.log</file>
+                               <append>true</append>
+                               <encoder>
+                                               <pattern>%X{BeginTimestamp}|%X{EndTimestamp}|%X{RequestId}|%X{ServiceInstanceId}|%.20thread|%X{VirtualServerName}|%X{ServiceName}|%X{PartnerName}|%X{StatusCode}|%X{ResponseCode}|%X{ResponseDescription}|%X{InstanceUUID}|%.-5level|%X{AlertSeverity}|%X{ServerIPAddress}|%X{ElapsedTime}|%X{ServerFQDN}|%X{RemoteHost}|%X{ClassName}|%X{Unused}|%X{ProcessKey}|%X{CustomField1}|%X{CustomField2}|%X{CustomField3}|%X{CustomField4}|%msg%n
+                                               </pattern>
+                               </encoder>
+                               <rollingPolicy
+                                               class="ch.qos.logback.core.rolling.FixedWindowRollingPolicy">
+                                               <maxIndex>10</maxIndex>
+                                               <FileNamePattern>${logDirectory}/CLAMP/security.%i.log.zip
+                                               </FileNamePattern>
+                               </rollingPolicy>
+                               <triggeringPolicy
+                                               class="ch.qos.logback.core.rolling.SizeBasedTriggeringPolicy">
+                                               <maxFileSize>10MB</maxFileSize>
+                               </triggeringPolicy>
+               </appender>
+               <appender name="asyncEELFSecurity" class="ch.qos.logback.classic.AsyncAppender">
+                               <queueSize>256</queueSize>
+                               <appender-ref ref="SECURITY" />
+               </appender>
+
+               <!-- CLDS related loggers -->
+               <logger name="org.onap.clamp.clds" level="INFO" />
+
+               <!-- EELF related loggers -->
+               <logger name="com.att.eelf.audit" level="INFO" additivity="false">
+                               <appender-ref ref="asyncEELFAudit" />
+               </logger>
+               <logger name="com.att.eelf.metrics" level="DEBUG" additivity="false">
+                               <appender-ref ref="asyncEELFMetrics" />
+               </logger>
+               <logger name="com.att.eelf.security" level="DEBUG" additivity="false">
+                               <appender-ref ref="asyncEELFSecurity" />
+               </logger>
+
+
+               <!-- Spring related loggers -->
+               <logger name="org.springframework" level="WARN" />
+               <logger name="org.springframework.beans" level="WARN" />
+               <logger name="org.springframework.web" level="WARN" />
+               <logger name="com.blog.spring.jms" level="WARN" />
+
+               <!-- AJSC Services (bootstrap services) -->
+               <logger name="ajsc" level="WARN" />
+               <logger name="ajsc.RouteMgmtService" level="INFO" />
+               <logger name="ajsc.ComputeService" level="INFO" />
+               <logger name="ajsc.VandelayService" level="WARN" />
+               <logger name="ajsc.FilePersistenceService" level="WARN" />
+               <logger name="ajsc.UserDefinedJarService" level="WARN" />
+               <logger name="ajsc.UserDefinedBeansDefService" level="WARN" />
+               <logger name="ajsc.LoggingConfigurationService" level="WARN" />
+
+               <!-- AJSC related loggers (DME2 Registration, csi logging, restlet, servlet 
+                               logging) -->
+               <logger name="ajsc.utils" level="WARN" />
+               <logger name="ajsc.utils.DME2Helper" level="INFO" />
+               <logger name="ajsc.filters" level="DEBUG" />
+               <logger name="ajsc.beans.interceptors" level="DEBUG" />
+               <logger name="ajsc.restlet" level="DEBUG" />
+               <logger name="ajsc.servlet" level="DEBUG" />
+               <logger name="com.att" level="WARN" />
+               <logger name="com.att.ajsc.csi.logging" level="DEBUG" />
+               <logger name="com.att.ajsc.filemonitor" level="WARN" />
+               <logger name="com.att.ajsc.introscope" level="info" />
+
+               <!-- Other Loggers that may help troubleshoot -->
+               <logger name="net.sf" level="WARN" />
+               <logger name="org.apache.commons.httpclient" level="WARN" />
+               <logger name="org.apache.commons" level="WARN" />
+               <logger name="org.apache.coyote" level="WARN" />
+               <logger name="org.apache.jasper" level="WARN" />
+
+               <!-- Camel Related Loggers (including restlet/servlet/jaxrs/cxf logging. 
+                               May aid in troubleshooting) -->
+               <logger name="org.apache.camel" level="WARN" />
+               <logger name="org.apache.cxf" level="WARN" />
+               <logger name="org.apache.camel.processor.interceptor" level="WARN" />
+               <logger name="org.apache.cxf.jaxrs.interceptor" level="WARN" />
+               <logger name="org.apache.cxf.service" level="WARN" />
+               <logger name="org.restlet" level="DEBUG" />
+               <logger name="org.apache.camel.component.restlet" level="DEBUG" />
+
+               <!-- logback internals logging -->
+               <logger name="ch.qos.logback.classic" level="INFO" />
+               <logger name="ch.qos.logback.core" level="INFO" />
+
+               <!-- logback jms appenders & loggers definition starts here -->
+               <!-- logback jms appenders & loggers definition starts here -->
+               <appender name="auditLogs"
+                               class="ch.qos.logback.core.rolling.RollingFileAppender">
+                               <filter class="ch.qos.logback.classic.filter.ThresholdFilter">
+                               </filter>
+                               <file>${logDirectory}/Audit-${lrmRVer}-${lrmRO}-${Pid}.log</file>
+                               <rollingPolicy
+                                               class="ch.qos.logback.core.rolling.FixedWindowRollingPolicy">
+                                               <fileNamePattern>${logDirectory}/Audit-${lrmRVer}-${lrmRO}-${Pid}.%i.log.zip
+                                               </fileNamePattern>
+                                               <minIndex>1</minIndex>
+                                               <maxIndex>9</maxIndex>
+                               </rollingPolicy>
+                               <triggeringPolicy
+                                               class="ch.qos.logback.core.rolling.SizeBasedTriggeringPolicy">
+                                               <maxFileSize>5MB</maxFileSize>
+                               </triggeringPolicy>
+                               <encoder>
+                                               <pattern>"%d [%thread] %-5level %logger{1024} - %msg%n"</pattern>
+                               </encoder>
+               </appender>
+               <appender name="perfLogs"
+                               class="ch.qos.logback.core.rolling.RollingFileAppender">
+                               <filter class="ch.qos.logback.classic.filter.ThresholdFilter">
+                               </filter>
+                               <file>${logDirectory}/Perform-${lrmRVer}-${lrmRO}-${Pid}.log</file>
+                               <rollingPolicy
+                                               class="ch.qos.logback.core.rolling.FixedWindowRollingPolicy">
+                                               <fileNamePattern>${logDirectory}/Perform-${lrmRVer}-${lrmRO}-${Pid}.%i.log.zip
+                                               </fileNamePattern>
+                                               <minIndex>1</minIndex>
+                                               <maxIndex>9</maxIndex>
+                               </rollingPolicy>
+                               <triggeringPolicy
+                                               class="ch.qos.logback.core.rolling.SizeBasedTriggeringPolicy">
+                                               <maxFileSize>5MB</maxFileSize>
+                               </triggeringPolicy>
+                               <encoder>
+                                               <pattern>"%d [%thread] %-5level %logger{1024} - %msg%n"</pattern>
+                               </encoder>
+               </appender>
+               <logger name="AuditRecord" level="INFO" additivity="FALSE">
+                               <appender-ref ref="auditLogs" />
+               </logger>
+               <logger name="AuditRecord_DirectCall" level="INFO" additivity="FALSE">
+                               <appender-ref ref="auditLogs" />
+               </logger>
+               <logger name="PerfTrackerRecord" level="INFO" additivity="FALSE">
+                               <appender-ref ref="perfLogs" />
+               </logger>
+               <!-- logback jms appenders & loggers definition ends here -->
+
+               <root level="WARN">
+                               <appender-ref ref="DEBUG" />
+                               <appender-ref ref="ERROR" />
+                               <appender-ref ref="STDOUT" />
+               </root>
 
 </configuration>
\ No newline at end of file
diff --git a/src/test/java/org/onap/clamp/clds/it/CryptoUtilsItCase.java b/src/test/java/org/onap/clamp/clds/it/CryptoUtilsItCase.java
new file mode 100644 (file)
index 0000000..f03fe83
--- /dev/null
@@ -0,0 +1,76 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * ONAP CLAMP
+ * ================================================================================
+ * Copyright (C) 2017 AT&T Intellectual Property. All rights
+ *                             reserved.
+ * ================================================================================
+ * Licensed under the Apache License, Version 2.0 (the "License"); 
+ * you may not use this file except in compliance with the License. 
+ * You may obtain a copy of the License at
+ * 
+ * http://www.apache.org/licenses/LICENSE-2.0
+ * 
+ * Unless required by applicable law or agreed to in writing, software 
+ * distributed under the License is distributed on an "AS IS" BASIS, 
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 
+ * See the License for the specific language governing permissions and 
+ * limitations under the License.
+ * ============LICENSE_END============================================
+ * ===================================================================
+ * ECOMP is a trademark and service mark of AT&T Intellectual Property.
+ */
+
+package org.onap.clamp.clds.it;
+
+import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.assertNotNull;
+
+import java.security.GeneralSecurityException;
+
+import org.junit.Test;
+import org.junit.runner.RunWith;
+import org.onap.clamp.clds.util.CryptoUtils;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.boot.test.context.SpringBootTest;
+import org.springframework.test.context.TestPropertySource;
+import org.springframework.test.context.junit4.SpringRunner;
+
+/**
+ * Test Crypto Utils with Spring.
+ */
+@RunWith(SpringRunner.class)
+@SpringBootTest
+@TestPropertySource(locations = "classpath:application-no-camunda.properties")
+public class CryptoUtilsItCase {
+    @Autowired
+    private CryptoUtils cryptoUtils;
+
+    /**
+     * This method tests encryption.
+     * 
+     * @throws GeneralSecurityException
+     */
+    @Test
+    public final void testEncryption() throws GeneralSecurityException {
+        final String testData = "This is a test string";
+        final String encodedStringExpected = "A5CB112C9F608A220B35AFED08024D98B9653333AF4C9527C2E934DE473F6145";
+        String encodedString = cryptoUtils.encrypt(testData);
+        assertNotNull(encodedString);
+        assertEquals(encodedStringExpected, encodedString);
+    }
+
+    /**
+     * This method tests decryption.
+     * 
+     * @throws GeneralSecurityException
+     */
+    @Test
+    public final void testDecryption() throws GeneralSecurityException {
+        final String decodedStringExpected = "This is a test string";
+        final String encodedString = "A5CB112C9F608A220B35AFED08024D98B9653333AF4C9527C2E934DE473F6145";
+        String decryptedString = cryptoUtils.decrypt(encodedString);
+        assertNotNull(decryptedString);
+        assertEquals(decodedStringExpected, decryptedString);
+    }
+}
\ No newline at end of file
index 0deae6d..b684a50 100644 (file)
@@ -298,6 +298,11 @@ public class SdcCatalogServicesItCase extends AbstractItCase {
                 SdcCatalogServicesItCase.class.getResourceAsStream("/example/sdc/sdcVFCResources.json"), "UTF-8"))
                 .when(spy).getCldsServicesOrResourcesBasedOnURL(allVfcResourcesDetailUrl, false);
 
+        String allCvfcResourcesDetailUrl = refProp.getStringValue("sdc.catalog.url") + "resources?resourceType=CVFC";
+        Mockito.doReturn(IOUtils.toString(
+                SdcCatalogServicesItCase.class.getResourceAsStream("/example/sdc/sdcCVFCResources.json"), "UTF-8"))
+                .when(spy).getCldsServicesOrResourcesBasedOnURL(allCvfcResourcesDetailUrl, false);
+
         String allVfAlarms = refProp.getStringValue("sdc.catalog.url")
                 + "resources/84855843-5247-4e97-a2bd-5395a510253b/artifacts/d57ac7ec-f3c3-4793-983a-c75ac3a43153";
         Mockito.doReturn(IOUtils.toString(
  * ECOMP is a trademark and service mark of AT&T Intellectual Property.
  */
 
-package org.onap.clamp.clds.client.req;
+package org.onap.clamp.clds.it;
 
 import static org.mockito.Mockito.mock;
 import static org.mockito.Mockito.when;
 
+import java.security.GeneralSecurityException;
 import java.util.ArrayList;
 import java.util.List;
 
 import org.camunda.bpm.engine.delegate.DelegateExecution;
 import org.junit.Assert;
 import org.junit.Test;
+import org.junit.runner.RunWith;
 import org.onap.clamp.clds.client.SdcCatalogServices;
+import org.onap.clamp.clds.client.req.SdcReq;
 import org.onap.clamp.clds.model.CldsSdcResource;
 import org.onap.clamp.clds.model.CldsSdcServiceDetail;
 import org.onap.clamp.clds.model.prop.Global;
 import org.onap.clamp.clds.model.prop.ModelProperties;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.boot.test.context.SpringBootTest;
+import org.springframework.test.context.TestPropertySource;
+import org.springframework.test.context.junit4.SpringRunner;
 
-public class SdcReqTest {
-
-    String baseUrl              = "AYBABTU";
-    String serviceInvariantUuid = "serviceInvariantUUID";
+@RunWith(SpringRunner.class)
+@SpringBootTest
+@TestPropertySource(locations = "classpath:application-no-camunda.properties")
+public class SdcReqItCase {
+    String         baseUrl              = "AYBABTU";
+    String         serviceInvariantUuid = "serviceInvariantUUID";
+    @Autowired
+    private SdcReq sdcReq;
 
     @Test
-    public void getSdcReqUrlsListNoGlobalPropTest() {
+    public void getSdcReqUrlsListNoGlobalPropTest() throws GeneralSecurityException {
         ModelProperties prop = mock(ModelProperties.class);
         SdcCatalogServices sdcCatalogServices = mock(SdcCatalogServices.class);
         DelegateExecution delegateExecution = mock(DelegateExecution.class);
@@ -53,32 +64,25 @@ public class SdcReqTest {
         cldsSdcResources.add(cldsSdcResource);
         List<String> resourceVf = new ArrayList<>();
         resourceVf.add(serviceInvariantUuid);
-
-        Assert.assertTrue(SdcReq.getSdcReqUrlsList(prop, baseUrl, sdcCatalogServices, delegateExecution).isEmpty());
-
+        Assert.assertTrue(sdcReq.getSdcReqUrlsList(prop, baseUrl, sdcCatalogServices, delegateExecution).isEmpty());
         Global global = mock(Global.class);
         when(prop.getGlobal()).thenReturn(global);
-        Assert.assertTrue(SdcReq.getSdcReqUrlsList(prop, baseUrl, sdcCatalogServices, delegateExecution).isEmpty());
-
+        Assert.assertTrue(sdcReq.getSdcReqUrlsList(prop, baseUrl, sdcCatalogServices, delegateExecution).isEmpty());
         when(global.getService()).thenReturn(serviceInvariantUuid);
-        Assert.assertTrue(SdcReq.getSdcReqUrlsList(prop, baseUrl, sdcCatalogServices, delegateExecution).isEmpty());
-
+        Assert.assertTrue(sdcReq.getSdcReqUrlsList(prop, baseUrl, sdcCatalogServices, delegateExecution).isEmpty());
         CldsSdcServiceDetail cldsSdcServiceDetail = mock(CldsSdcServiceDetail.class);
         when(sdcCatalogServices.getCldsSdcServiceDetailFromJson(null)).thenReturn(cldsSdcServiceDetail);
         when(global.getResourceVf()).thenReturn(new ArrayList<>());
-        Assert.assertTrue(SdcReq.getSdcReqUrlsList(prop, baseUrl, sdcCatalogServices, delegateExecution).isEmpty());
-
+        Assert.assertTrue(sdcReq.getSdcReqUrlsList(prop, baseUrl, sdcCatalogServices, delegateExecution).isEmpty());
         when(cldsSdcServiceDetail.getResources()).thenReturn(cldsSdcResources);
-        Assert.assertTrue(SdcReq.getSdcReqUrlsList(prop, baseUrl, sdcCatalogServices, delegateExecution).isEmpty());
-
+        Assert.assertTrue(sdcReq.getSdcReqUrlsList(prop, baseUrl, sdcCatalogServices, delegateExecution).isEmpty());
         when(cldsSdcResource.getResoucreType()).thenReturn("VF");
-        Assert.assertTrue(SdcReq.getSdcReqUrlsList(prop, baseUrl, sdcCatalogServices, delegateExecution).isEmpty());
-
+        Assert.assertTrue(sdcReq.getSdcReqUrlsList(prop, baseUrl, sdcCatalogServices, delegateExecution).isEmpty());
         when(global.getResourceVf()).thenReturn(resourceVf);
         when(cldsSdcResource.getResourceInvariantUUID()).thenReturn(serviceInvariantUuid);
         when(cldsSdcResource.getResourceInstanceName()).thenReturn("Resource instance name");
         List<String> expected = new ArrayList<>();
         expected.add("AYBABTU/null/resourceInstances/resourceinstancename/artifacts");
-        Assert.assertEquals(expected, SdcReq.getSdcReqUrlsList(prop, baseUrl, sdcCatalogServices, delegateExecution));
+        Assert.assertEquals(expected, sdcReq.getSdcReqUrlsList(prop, baseUrl, sdcCatalogServices, delegateExecution));
     }
 }
index 87e8478..f872794 100644 (file)
@@ -64,7 +64,6 @@ server.contextPath=/
 #Modified engine-rest applicationpath
 spring.jersey.application-path=/engine-rest
 spring.profiles.active=clamp-default,clamp-spring-authentication
-spring.autoconfigure.exclude=org.springframework.boot.autoconfigure.jdbc.DataSourceAutoConfiguration,org.springframework.boot.autoconfigure.orm.jpa.HibernateJpaAutoConfiguration
 
 #The max number of active threads in this pool
 server.tomcat.max-threads=200
@@ -95,16 +94,19 @@ kubernetes.namespace=com-att-ajsc
 #server.port=0
 
 #Camunda Process Engine DataSource connection Details
-spring.datasource.camunda.url=jdbc:mariadb://localhost:${docker.mariadb.port.host}/camundabpm?verifyServerCertificate=false&useSSL=false&requireSSL=false&autoReconnect=true&maxReconnects=100
-spring.datasource.camunda.username=camunda
-spring.datasource.camunda.password=ndMSpw4CAM
 spring.datasource.camunda.driverClassName=org.mariadb.jdbc.Driver
+spring.datasource.camunda.url=jdbc:mariadb:sequential://localhost:${docker.mariadb.port.host}/camundabpm?autoReconnect=true&retriesAllDown=2147483647&failoverLoopRetries=2147483647
+spring.datasource.camunda.username=camunda
+spring.datasource.camunda.password=D75B89195FD913848EA11416F755390E
 spring.datasource.camunda.validationQuery=SELECT 1
 spring.datasource.camunda.validationQueryTimeout=20000
-spring.datasource.camunda.validationInterval=60000
+spring.datasource.camunda.validationInterval=30000
 spring.datasource.camunda.testWhileIdle = true
+spring.datasource.camunda.minIdle = 0
+spring.datasource.camunda.initialSize=0
 # Automatically test whether a connection provided is good or not
 spring.datasource.camunda.testOnBorrow=true
+spring.datasource.camunda.ignoreExceptionOnPreLoad=true
 
 #Camunda application properties
 #Camunda history level
@@ -117,25 +119,25 @@ camunda.bpm.management.health.camunda.enabled=false
 camunda.bpm.metrics.enabled=false
 
 #clds datasource connection details
-spring.datasource.cldsdb.driver-class-name=org.mariadb.jdbc.Driver
-spring.datasource.cldsdb.url=jdbc:mariadb://localhost:${docker.mariadb.port.host}/cldsdb4?verifyServerCertificate=false&useSSL=false&requireSSL=false&autoReconnect=true&maxReconnects=100
+spring.datasource.cldsdb.driverClassName=org.mariadb.jdbc.Driver
+spring.datasource.cldsdb.url=jdbc:mariadb:sequential://localhost:${docker.mariadb.port.host}/cldsdb4?autoReconnect=true&retriesAllDown=2147483647&failoverLoopRetries=2147483647
 spring.datasource.cldsdb.username=clds
-spring.datasource.cldsdb.password=sidnnd83K
-spring.datasource.cldsdb.driverClassName=com.mysql.jdbc.Driver
+spring.datasource.cldsdb.password=035F8819FEBB754F3C99ECCCC1259850
 spring.datasource.cldsdb.validationQuery=SELECT 1
 spring.datasource.cldsdb.validationQueryTimeout=20000
-spring.datasource.cldsdb.validationInterval=60000
+spring.datasource.cldsdb.validationInterval=30000
 spring.datasource.cldsdb.testWhileIdle = true
+spring.datasource.cldsdb.minIdle = 0
+spring.datasource.cldsdb.initialSize=0
 # Automatically test whether a connection provided is good or not
 spring.datasource.cldsdb.testOnBorrow=true
+spring.datasource.cldsdb.ignoreExceptionOnPreLoad=true
 
 #Async Executor default Parameters
 async.core.pool.size=10
 async.max.pool.size=20
 async.queue.capacity=500
 
-org.onap.clamp.config.dcae.url=http://localhost:9000/closedloop-dcae-services
-
 #GRM Edge endpoint details
 service.name=ajsc6camundademo
 service.version=1.0.0.0
@@ -147,6 +149,7 @@ org.onap.clamp.config.files.cldsReference=classpath:/clds/clds-reference.propert
 org.onap.clamp.config.files.cldsPolicyConfig=classpath:/clds/clds-policy-config.properties
 org.onap.clamp.config.files.cldsUsers=classpath:/clds/clds-users.json
 org.onap.clamp.config.files.globalClds=classpath:/clds/globalClds.properties
+org.onap.clamp.encryption.aes.key=aa3871669d893c7fb8abbcda31b88b4f
 
 #Define user permission related parameters, the permission type can be changed but MUST be redefined in clds-users.properties in that case !
 CLDS_PERMISSION_TYPE_CL=permission-type-cl
diff --git a/src/test/resources/example/sdc/sdcCVFCResources.json b/src/test/resources/example/sdc/sdcCVFCResources.json
new file mode 100644 (file)
index 0000000..790b2d5
--- /dev/null
@@ -0,0 +1,1166 @@
+[
+    {
+        "uuid": "a0475018-1e7e-4ddd-8bee-33cbf958c2e6",
+        "invariantUUID": "133dd665-fca8-4e8b-8126-9e74a8d23bf5",
+        "name": "CLAMP-Dev-nodes.virc_fe_be_0",
+        "version": "1.0",
+        "toscaModelURL": "/sdc/v1/catalog/resources/a0475018-1e7e-4ddd-8bee-33cbf958c2e6/toscaModel",
+        "category": "Generic",
+        "subCategory": "Abstract",
+        "resourceType": "CVFC",
+        "lifecycleState": "CERTIFIED",
+        "lastUpdaterUserId": "m08740"
+    },
+    {
+        "uuid": "22db11dd-8f1b-4687-93c1-68d9699cc8dd",
+        "invariantUUID": "5a637382-5168-4493-a08f-6d446cd8a96b",
+        "name": "Dev2DevNFODVf-nodes.MultiDeploymentFlavor.VF",
+        "version": "1.0",
+        "toscaModelURL": "/sdc/v1/catalog/resources/22db11dd-8f1b-4687-93c1-68d9699cc8dd/toscaModel",
+        "category": "Generic",
+        "subCategory": "Abstract",
+        "resourceType": "CVFC",
+        "lifecycleState": "CERTIFIED",
+        "lastUpdaterUserId": "pa0916"
+    },
+    {
+        "uuid": "a40da782-3ec4-4138-849f-f9dd4013744e",
+        "invariantUUID": "f3cd3f9c-f3d0-4028-bb34-8e22e265793c",
+        "name": "VF-example-nodes.vmx_vpfe",
+        "version": "1.0",
+        "toscaModelURL": "/sdc/v1/catalog/resources/a40da782-3ec4-4138-849f-f9dd4013744e/toscaModel",
+        "category": "Generic",
+        "subCategory": "Abstract",
+        "resourceType": "CVFC",
+        "lifecycleState": "CERTIFIED",
+        "lastUpdaterUserId": "rh176a"
+    },
+    {
+        "uuid": "d5711e0f-1e01-4f0f-8bb7-e3805607ddc8",
+        "invariantUUID": "a3584f36-c6ae-43b9-941f-623f24c34879",
+        "name": "VNFC_VSP_Test-nodes.rdn",
+        "version": "1.0",
+        "toscaModelURL": "/sdc/v1/catalog/resources/d5711e0f-1e01-4f0f-8bb7-e3805607ddc8/toscaModel",
+        "category": "Generic",
+        "subCategory": "Abstract",
+        "resourceType": "CVFC",
+        "lifecycleState": "CERTIFIED",
+        "lastUpdaterUserId": "ed852m"
+    },
+    {
+        "uuid": "c4736acb-5f9b-4918-a188-f166c948f21d",
+        "invariantUUID": "ab0f8c6f-a323-496b-bbf9-e7c62bba49f1",
+        "name": "VF-example-nodes.vmx_vre",
+        "version": "1.0",
+        "toscaModelURL": "/sdc/v1/catalog/resources/c4736acb-5f9b-4918-a188-f166c948f21d/toscaModel",
+        "category": "Generic",
+        "subCategory": "Abstract",
+        "resourceType": "CVFC",
+        "lifecycleState": "CERTIFIED",
+        "lastUpdaterUserId": "rh176a"
+    },
+    {
+        "uuid": "49c45990-9aca-437a-aeea-cd5d97f4db2d",
+        "invariantUUID": "13c1808a-1fe0-4282-a97b-b753547844bb",
+        "name": "VF- DemoR-nodes.vmx_vre",
+        "version": "1.0",
+        "toscaModelURL": "/sdc/v1/catalog/resources/49c45990-9aca-437a-aeea-cd5d97f4db2d/toscaModel",
+        "category": "Generic",
+        "subCategory": "Abstract",
+        "resourceType": "CVFC",
+        "lifecycleState": "CERTIFIED",
+        "lastUpdaterUserId": "rh176a"
+    },
+    {
+        "uuid": "37ee791a-cf0b-4968-8003-9f0b93e4e5e0",
+        "invariantUUID": "43581fed-d9e2-43c4-90a1-d0ece5731807",
+        "name": "Dev2devnfod1207.nodes.MultiDeploymentFlavor.VF",
+        "version": "1.0",
+        "toscaModelURL": "/sdc/v1/catalog/resources/37ee791a-cf0b-4968-8003-9f0b93e4e5e0/toscaModel",
+        "category": "Generic",
+        "subCategory": "Abstract",
+        "resourceType": "CVFC",
+        "lifecycleState": "CERTIFIED",
+        "lastUpdaterUserId": "pa0916"
+    },
+    {
+        "uuid": "59db0e7d-8800-4b73-8236-42d95e28c865",
+        "invariantUUID": "60f4b883-f468-4d92-950f-469c9527e7d2",
+        "name": "sang_vsp-nodes.prx",
+        "version": "1.0",
+        "toscaModelURL": "/sdc/v1/catalog/resources/59db0e7d-8800-4b73-8236-42d95e28c865/toscaModel",
+        "category": "Generic",
+        "subCategory": "Abstract",
+        "resourceType": "CVFC",
+        "lifecycleState": "CERTIFIED",
+        "lastUpdaterUserId": "sa997j"
+    },
+    {
+        "uuid": "26b7ac12-5cf0-456c-adb4-fb7b5d0d7162",
+        "invariantUUID": "04d790ef-59cc-4e1f-b3f7-3b19975dfe6a",
+        "name": "vmme_1710-nodes.vlc",
+        "version": "1.0",
+        "toscaModelURL": "/sdc/v1/catalog/resources/26b7ac12-5cf0-456c-adb4-fb7b5d0d7162/toscaModel",
+        "category": "Generic",
+        "subCategory": "Abstract",
+        "resourceType": "CVFC",
+        "lifecycleState": "CERTIFIED",
+        "lastUpdaterUserId": "sa997j"
+    },
+    {
+        "uuid": "a056a4ab-4e72-4631-8539-0f4327b5beb0",
+        "invariantUUID": "c31b5f25-7056-44d0-ba77-c8b21aec5309",
+        "name": "Dev2devnfod.nodes.MultiDeploymentFlavor.VF",
+        "version": "1.0",
+        "toscaModelURL": "/sdc/v1/catalog/resources/a056a4ab-4e72-4631-8539-0f4327b5beb0/toscaModel",
+        "category": "Generic",
+        "subCategory": "Abstract",
+        "resourceType": "CVFC",
+        "lifecycleState": "CERTIFIED",
+        "lastUpdaterUserId": "pa0916"
+    },
+    {
+        "uuid": "9d81d5e5-72aa-4ec7-b10e-f55f0369f5b5",
+        "invariantUUID": "c6078024-e29c-49b3-ab12-008cbdf2cb3f",
+        "name": "NewSWProductNameField-nodes.ltm",
+        "version": "1.0",
+        "toscaModelURL": "/sdc/v1/catalog/resources/9d81d5e5-72aa-4ec7-b10e-f55f0369f5b5/toscaModel",
+        "category": "Generic",
+        "subCategory": "Abstract",
+        "resourceType": "CVFC",
+        "lifecycleState": "CERTIFIED",
+        "lastUpdaterUserId": "m08740"
+    },
+    {
+        "uuid": "ad90ed2d-5266-41f3-af43-db9b9f6765c3",
+        "invariantUUID": "55852a3d-6337-4074-960e-9456ca9b0f70",
+        "name": "Alina0815VSP-nodes.TEST_server",
+        "version": "1.0",
+        "toscaModelURL": "/sdc/v1/catalog/resources/ad90ed2d-5266-41f3-af43-db9b9f6765c3/toscaModel",
+        "category": "Generic",
+        "subCategory": "Abstract",
+        "resourceType": "CVFC",
+        "lifecycleState": "CERTIFIED",
+        "lastUpdaterUserId": "af3193"
+    },
+    {
+        "uuid": "a790f10d-6915-42a4-ae60-f3525d7dfef2",
+        "invariantUUID": "ba3112d2-3bfb-4756-93ac-df6cbe1f4d3d",
+        "name": "Rony0620-nodes.prx_0",
+        "version": "1.0",
+        "toscaModelURL": "/sdc/v1/catalog/resources/a790f10d-6915-42a4-ae60-f3525d7dfef2/toscaModel",
+        "category": "Generic",
+        "subCategory": "Abstract",
+        "resourceType": "CVFC",
+        "lifecycleState": "CERTIFIED",
+        "lastUpdaterUserId": "el489u"
+    },
+    {
+        "uuid": "8b774c12-26bd-4dff-a9f8-3e4c46d9d5a0",
+        "invariantUUID": "8d8a5c56-6ef2-4619-bf85-c6432542ee59",
+        "name": "Rony0620111-nodes.rdn_2",
+        "version": "1.0",
+        "toscaModelURL": "/sdc/v1/catalog/resources/8b774c12-26bd-4dff-a9f8-3e4c46d9d5a0/toscaModel",
+        "category": "Generic",
+        "subCategory": "Abstract",
+        "resourceType": "CVFC",
+        "lifecycleState": "CERTIFIED",
+        "lastUpdaterUserId": "el489u"
+    },
+    {
+        "uuid": "c2740411-a801-416a-8d71-d10d5a3d3794",
+        "invariantUUID": "27f53c0b-8e14-4730-839f-747260f78c64",
+        "name": "Rony0620111-nodes.oam_1",
+        "version": "1.0",
+        "toscaModelURL": "/sdc/v1/catalog/resources/c2740411-a801-416a-8d71-d10d5a3d3794/toscaModel",
+        "category": "Generic",
+        "subCategory": "Abstract",
+        "resourceType": "CVFC",
+        "lifecycleState": "CERTIFIED",
+        "lastUpdaterUserId": "el489u"
+    },
+    {
+        "uuid": "7918ba80-97a2-4ead-87f0-dfc61da405c9",
+        "invariantUUID": "b43016d3-a6fb-49d1-8594-80091136fc2d",
+        "name": "madhu_mdns-nodes.heat.dns",
+        "version": "1.0",
+        "toscaModelURL": "/sdc/v1/catalog/resources/7918ba80-97a2-4ead-87f0-dfc61da405c9/toscaModel",
+        "category": "Generic",
+        "subCategory": "Abstract",
+        "resourceType": "CVFC",
+        "lifecycleState": "CERTIFIED",
+        "lastUpdaterUserId": "sa997j"
+    },
+    {
+        "uuid": "bdbe08db-0471-443e-967a-eb7b619be46b",
+        "invariantUUID": "71bda11f-c327-418e-9654-a64b07963249",
+        "name": "sang_vsp-nodes.rdn",
+        "version": "1.0",
+        "toscaModelURL": "/sdc/v1/catalog/resources/bdbe08db-0471-443e-967a-eb7b619be46b/toscaModel",
+        "category": "Generic",
+        "subCategory": "Abstract",
+        "resourceType": "CVFC",
+        "lifecycleState": "CERTIFIED",
+        "lastUpdaterUserId": "sa997j"
+    },
+    {
+        "uuid": "0e997760-1d6d-4afc-b9ab-6c2a94807463",
+        "invariantUUID": "0b85eb07-f67a-49a5-9e8f-28e7273c42af",
+        "name": "New_vendor_mdns-nodes.heat.dns",
+        "version": "1.0",
+        "toscaModelURL": "/sdc/v1/catalog/resources/0e997760-1d6d-4afc-b9ab-6c2a94807463/toscaModel",
+        "category": "Generic",
+        "subCategory": "Abstract",
+        "resourceType": "CVFC",
+        "lifecycleState": "CERTIFIED",
+        "lastUpdaterUserId": "sa997j"
+    },
+    {
+        "uuid": "e47dccd6-a23c-4685-a21b-b57d7c5a7007",
+        "invariantUUID": "c68fb097-69eb-451b-8ad8-3ff80572dae3",
+        "name": "vmme_1710-nodes.gpb_1",
+        "version": "1.0",
+        "toscaModelURL": "/sdc/v1/catalog/resources/e47dccd6-a23c-4685-a21b-b57d7c5a7007/toscaModel",
+        "category": "Generic",
+        "subCategory": "Abstract",
+        "resourceType": "CVFC",
+        "lifecycleState": "CERTIFIED",
+        "lastUpdaterUserId": "sa997j"
+    },
+    {
+        "uuid": "2c8f1219-8000-4001-aa13-496a0396d40f",
+        "invariantUUID": "096ff622-d7ea-4482-b7fe-8c7d99e7d7c6",
+        "name": "CLAMP-Dev-nodes.virc_fe_be_1",
+        "version": "1.0",
+        "toscaModelURL": "/sdc/v1/catalog/resources/2c8f1219-8000-4001-aa13-496a0396d40f/toscaModel",
+        "category": "Generic",
+        "subCategory": "Abstract",
+        "resourceType": "CVFC",
+        "lifecycleState": "CERTIFIED",
+        "lastUpdaterUserId": "m08740"
+    },
+    {
+        "uuid": "c01cc6f1-4109-4498-b6c1-2cba7140a8b0",
+        "invariantUUID": "6d31b4ab-182e-4066-9271-b3bb49566a2e",
+        "name": "VNFC_VSP_Test-nodes.prx",
+        "version": "1.0",
+        "toscaModelURL": "/sdc/v1/catalog/resources/c01cc6f1-4109-4498-b6c1-2cba7140a8b0/toscaModel",
+        "category": "Generic",
+        "subCategory": "Abstract",
+        "resourceType": "CVFC",
+        "lifecycleState": "CERTIFIED",
+        "lastUpdaterUserId": "ed852m"
+    },
+    {
+        "uuid": "0457dd05-f754-48f8-8997-3819c1abbdac",
+        "invariantUUID": "07bc0b8d-ddf8-4f4a-98ed-8e4192df99a5",
+        "name": "CVFC1-nodes.pps",
+        "version": "1.0",
+        "toscaModelURL": "/sdc/v1/catalog/resources/0457dd05-f754-48f8-8997-3819c1abbdac/toscaModel",
+        "category": "Generic",
+        "subCategory": "Abstract",
+        "resourceType": "CVFC",
+        "lifecycleState": "CERTIFIED",
+        "lastUpdaterUserId": "m08740"
+    },
+    {
+        "uuid": "cba89050-752c-4aac-8cec-6f0463eb8a23",
+        "invariantUUID": "ac6fab25-abc6-4e0e-ba25-cc2ddd7a51ef",
+        "name": "LDSA-nodes.ltm",
+        "version": "1.0",
+        "toscaModelURL": "/sdc/v1/catalog/resources/cba89050-752c-4aac-8cec-6f0463eb8a23/toscaModel",
+        "category": "Generic",
+        "subCategory": "Abstract",
+        "resourceType": "CVFC",
+        "lifecycleState": "CERTIFIED",
+        "lastUpdaterUserId": "m08740"
+    },
+    {
+        "uuid": "93a60704-ce74-4f1e-b845-ddb3acfe8819",
+        "invariantUUID": "a02a03a8-079f-4c3c-acab-5f1157a4c3fc",
+        "name": "vmme_1710-nodes.gpb_0",
+        "version": "1.0",
+        "toscaModelURL": "/sdc/v1/catalog/resources/93a60704-ce74-4f1e-b845-ddb3acfe8819/toscaModel",
+        "category": "Generic",
+        "subCategory": "Abstract",
+        "resourceType": "CVFC",
+        "lifecycleState": "CERTIFIED",
+        "lastUpdaterUserId": "sa997j"
+    },
+    {
+        "uuid": "5ac81105-ff5a-41fd-a84b-2aff8a694d14",
+        "invariantUUID": "27bb6ae9-b4c8-466a-ba09-38ac56867852",
+        "name": "Renana-test-nodes.gpb_0",
+        "version": "1.0",
+        "toscaModelURL": "/sdc/v1/catalog/resources/5ac81105-ff5a-41fd-a84b-2aff8a694d14/toscaModel",
+        "category": "Generic",
+        "subCategory": "Abstract",
+        "resourceType": "CVFC",
+        "lifecycleState": "CERTIFIED",
+        "lastUpdaterUserId": "rh176a"
+    },
+    {
+        "uuid": "ba85242a-7910-4501-b8d7-fc47fa9ed902",
+        "invariantUUID": "e27a8b60-5c64-4407-b82b-7dde70c528ea",
+        "name": "renana-test2-nodes.gpb_1",
+        "version": "1.0",
+        "toscaModelURL": "/sdc/v1/catalog/resources/ba85242a-7910-4501-b8d7-fc47fa9ed902/toscaModel",
+        "category": "Generic",
+        "subCategory": "Abstract",
+        "resourceType": "CVFC",
+        "lifecycleState": "CERTIFIED",
+        "lastUpdaterUserId": "rh176a"
+    },
+    {
+        "uuid": "dc32e966-81d2-4048-b123-8e91e930b61e",
+        "invariantUUID": "8f7da555-f4c4-4edd-83ea-913f78a741ac",
+        "name": "renana-test2-nodes.ncb_1",
+        "version": "1.0",
+        "toscaModelURL": "/sdc/v1/catalog/resources/dc32e966-81d2-4048-b123-8e91e930b61e/toscaModel",
+        "category": "Generic",
+        "subCategory": "Abstract",
+        "resourceType": "CVFC",
+        "lifecycleState": "CERTIFIED",
+        "lastUpdaterUserId": "rh176a"
+    },
+    {
+        "uuid": "fd7fa970-c758-4daa-8cd8-77cbc1dc2604",
+        "invariantUUID": "ff55ade4-dafa-42f2-bc2a-785e7e3b15ba",
+        "name": "Rony0620-nodes.rdn_1",
+        "version": "1.0",
+        "toscaModelURL": "/sdc/v1/catalog/resources/fd7fa970-c758-4daa-8cd8-77cbc1dc2604/toscaModel",
+        "category": "Generic",
+        "subCategory": "Abstract",
+        "resourceType": "CVFC",
+        "lifecycleState": "CERTIFIED",
+        "lastUpdaterUserId": "el489u"
+    },
+    {
+        "uuid": "9b1b82c1-308c-42b8-8ca3-00e744be4cbf",
+        "invariantUUID": "46614a9e-ba5c-4e46-a6db-bbcccd8d80ad",
+        "name": "Rony0620111-nodes.oam_0",
+        "version": "1.0",
+        "toscaModelURL": "/sdc/v1/catalog/resources/9b1b82c1-308c-42b8-8ca3-00e744be4cbf/toscaModel",
+        "category": "Generic",
+        "subCategory": "Abstract",
+        "resourceType": "CVFC",
+        "lifecycleState": "CERTIFIED",
+        "lastUpdaterUserId": "el489u"
+    },
+    {
+        "uuid": "c771d2d4-b5e0-43ce-baa6-020389238484",
+        "invariantUUID": "0a86d24a-8963-4452-b396-e724fa66c1de",
+        "name": "Rony0620111-nodes.rdn_0",
+        "version": "1.0",
+        "toscaModelURL": "/sdc/v1/catalog/resources/c771d2d4-b5e0-43ce-baa6-020389238484/toscaModel",
+        "category": "Generic",
+        "subCategory": "Abstract",
+        "resourceType": "CVFC",
+        "lifecycleState": "CERTIFIED",
+        "lastUpdaterUserId": "el489u"
+    },
+    {
+        "uuid": "50b5240c-fc4f-4f1e-bd9e-a89f48912b50",
+        "invariantUUID": "f958fc3b-b922-4527-bdb8-e31f33a77535",
+        "name": "VNFC_VSP_Test-nodes.oam",
+        "version": "1.0",
+        "toscaModelURL": "/sdc/v1/catalog/resources/50b5240c-fc4f-4f1e-bd9e-a89f48912b50/toscaModel",
+        "category": "Generic",
+        "subCategory": "Abstract",
+        "resourceType": "CVFC",
+        "lifecycleState": "CERTIFIED",
+        "lastUpdaterUserId": "ed852m"
+    },
+    {
+        "uuid": "cce30e84-4f25-4712-ae16-6223b81ebe30",
+        "invariantUUID": "566039a2-07c8-47d4-950c-05b4cc9a1c2f",
+        "name": "MNSDMZ-Demo-nodes.heat.mnsdmzvfw",
+        "version": "1.0",
+        "toscaModelURL": "/sdc/v1/catalog/resources/cce30e84-4f25-4712-ae16-6223b81ebe30/toscaModel",
+        "category": "Generic",
+        "subCategory": "Abstract",
+        "resourceType": "CVFC",
+        "lifecycleState": "CERTIFIED",
+        "lastUpdaterUserId": "sa997j"
+    },
+    {
+        "uuid": "128b71d0-616c-4ddc-bfc6-831fd07d2b23",
+        "invariantUUID": "21796132-63ce-43ef-a59a-2bc513f307fe",
+        "name": "alina_test2-nodes.TEST_server",
+        "version": "1.0",
+        "toscaModelURL": "/sdc/v1/catalog/resources/128b71d0-616c-4ddc-bfc6-831fd07d2b23/toscaModel",
+        "category": "Generic",
+        "subCategory": "Abstract",
+        "resourceType": "CVFC",
+        "lifecycleState": "CERTIFIED",
+        "lastUpdaterUserId": "af3193"
+    },
+    {
+        "uuid": "2ac67cfc-abc8-4e7a-882f-8594af8a142b",
+        "invariantUUID": "510f8c68-7581-4fb3-86f5-cfec01b3712e",
+        "name": "sang_vsp-nodes.oam",
+        "version": "1.0",
+        "toscaModelURL": "/sdc/v1/catalog/resources/2ac67cfc-abc8-4e7a-882f-8594af8a142b/toscaModel",
+        "category": "Generic",
+        "subCategory": "Abstract",
+        "resourceType": "CVFC",
+        "lifecycleState": "CERTIFIED",
+        "lastUpdaterUserId": "sa997j"
+    },
+    {
+        "uuid": "f3264aab-8f59-4942-a118-2663e445e055",
+        "invariantUUID": "88404161-33c8-4225-9b11-934b2686b005",
+        "name": "Dev2DevIpAssign_24_07-nodes.pd_server",
+        "version": "1.0",
+        "toscaModelURL": "/sdc/v1/catalog/resources/f3264aab-8f59-4942-a118-2663e445e055/toscaModel",
+        "category": "Generic",
+        "subCategory": "Abstract",
+        "resourceType": "CVFC",
+        "lifecycleState": "CERTIFIED",
+        "lastUpdaterUserId": "pa0916"
+    },
+    {
+        "uuid": "0d094452-1b7d-4b5a-86ff-bce315102473",
+        "invariantUUID": "60a1acdd-f29e-4f61-a3ec-07de8e1827f5",
+        "name": "infra-nodes.vaaa",
+        "version": "1.0",
+        "toscaModelURL": "/sdc/v1/catalog/resources/0d094452-1b7d-4b5a-86ff-bce315102473/toscaModel",
+        "category": "Generic",
+        "subCategory": "Abstract",
+        "resourceType": "CVFC",
+        "lifecycleState": "CERTIFIED",
+        "lastUpdaterUserId": "ml636r"
+    },
+    {
+        "uuid": "dec15871-f6f6-4e44-8a8d-1e30f69ac0d3",
+        "invariantUUID": "2197d73b-5aa5-4788-a5f5-ec1791425595",
+        "name": "Rony0620-nodes.rdn_4",
+        "version": "1.0",
+        "toscaModelURL": "/sdc/v1/catalog/resources/dec15871-f6f6-4e44-8a8d-1e30f69ac0d3/toscaModel",
+        "category": "Generic",
+        "subCategory": "Abstract",
+        "resourceType": "CVFC",
+        "lifecycleState": "CERTIFIED",
+        "lastUpdaterUserId": "el489u"
+    },
+    {
+        "uuid": "9150f327-801e-4963-b25b-b4583ec55c79",
+        "invariantUUID": "0ed5371b-1a90-473c-a4f4-4d229a2220cf",
+        "name": "Rony0620-nodes.oam_1",
+        "version": "1.0",
+        "toscaModelURL": "/sdc/v1/catalog/resources/9150f327-801e-4963-b25b-b4583ec55c79/toscaModel",
+        "category": "Generic",
+        "subCategory": "Abstract",
+        "resourceType": "CVFC",
+        "lifecycleState": "CERTIFIED",
+        "lastUpdaterUserId": "el489u"
+    },
+    {
+        "uuid": "6b143e5e-dfcc-4572-b101-7fcb98c0bdde",
+        "invariantUUID": "f2be01db-aff3-4456-adbe-4fbdecea3511",
+        "name": "SimonaFirst0814-nodes.TEST_server",
+        "version": "1.0",
+        "toscaModelURL": "/sdc/v1/catalog/resources/6b143e5e-dfcc-4572-b101-7fcb98c0bdde/toscaModel",
+        "category": "Generic",
+        "subCategory": "Abstract",
+        "resourceType": "CVFC",
+        "lifecycleState": "CERTIFIED",
+        "lastUpdaterUserId": "ss1245"
+    },
+    {
+        "uuid": "fc93fad1-0133-43c8-8355-9e0797665774",
+        "invariantUUID": "7d7d720c-a328-4ff1-a9df-e8a3dfef3e1b",
+        "name": "Simona2Test0814-nodes.TEST_server",
+        "version": "1.0",
+        "toscaModelURL": "/sdc/v1/catalog/resources/fc93fad1-0133-43c8-8355-9e0797665774/toscaModel",
+        "category": "Generic",
+        "subCategory": "Abstract",
+        "resourceType": "CVFC",
+        "lifecycleState": "CERTIFIED",
+        "lastUpdaterUserId": "ss1245"
+    },
+    {
+        "uuid": "24101cfd-f824-4340-916f-a881a203062b",
+        "invariantUUID": "48f539dd-1edf-40d2-bf36-9f86e1c8a702",
+        "name": "NFOD_VSP_resource-nodes.MultiDeploymentFlavor.CVFC",
+        "version": "1.0",
+        "toscaModelURL": "/sdc/v1/catalog/resources/24101cfd-f824-4340-916f-a881a203062b/toscaModel",
+        "category": "Generic",
+        "subCategory": "Abstract",
+        "resourceType": "CVFC",
+        "lifecycleState": "CERTIFIED",
+        "lastUpdaterUserId": "sa997j"
+    },
+    {
+        "uuid": "844453e6-46b2-4673-aee7-f0dba8a90218",
+        "invariantUUID": "96a8385d-a86c-4d37-84fc-f4e916ac1ae4",
+        "name": "vmme_1710-nodes.fsb_0",
+        "version": "1.0",
+        "toscaModelURL": "/sdc/v1/catalog/resources/844453e6-46b2-4673-aee7-f0dba8a90218/toscaModel",
+        "category": "Generic",
+        "subCategory": "Abstract",
+        "resourceType": "CVFC",
+        "lifecycleState": "CERTIFIED",
+        "lastUpdaterUserId": "sa997j"
+    },
+    {
+        "uuid": "6e19c4fc-fe71-4fd1-951a-37cdb76016b5",
+        "invariantUUID": "5c993249-6442-4ca0-8d2f-6ac1d8628957",
+        "name": "vmme_1710-nodes.ncb_1",
+        "version": "1.0",
+        "toscaModelURL": "/sdc/v1/catalog/resources/6e19c4fc-fe71-4fd1-951a-37cdb76016b5/toscaModel",
+        "category": "Generic",
+        "subCategory": "Abstract",
+        "resourceType": "CVFC",
+        "lifecycleState": "CERTIFIED",
+        "lastUpdaterUserId": "sa997j"
+    },
+    {
+        "uuid": "8d5cce48-c3cb-4a7d-b94c-f4a40ea13cf6",
+        "invariantUUID": "34268c2f-4188-47af-8bde-a78add3d2c80",
+        "name": "New_vendor_mdns-nodes.heat.dns_1",
+        "version": "1.0",
+        "toscaModelURL": "/sdc/v1/catalog/resources/8d5cce48-c3cb-4a7d-b94c-f4a40ea13cf6/toscaModel",
+        "category": "Generic",
+        "subCategory": "Abstract",
+        "resourceType": "CVFC",
+        "lifecycleState": "CERTIFIED",
+        "lastUpdaterUserId": "sa997j"
+    },
+    {
+        "uuid": "2cb64483-fa56-4599-8752-da98434bfaa0",
+        "invariantUUID": "0d1fbc01-2a97-4383-8b2e-81e9f6b86ec5",
+        "name": "renana-dns-nodes.heat.dns",
+        "version": "1.0",
+        "toscaModelURL": "/sdc/v1/catalog/resources/2cb64483-fa56-4599-8752-da98434bfaa0/toscaModel",
+        "category": "Generic",
+        "subCategory": "Abstract",
+        "resourceType": "CVFC",
+        "lifecycleState": "CERTIFIED",
+        "lastUpdaterUserId": "rh176a"
+    },
+    {
+        "uuid": "ca9d0619-51fc-4c62-a653-c22297a7da0d",
+        "invariantUUID": "26c5b1e8-aa0b-400a-91a7-792de5fd59ed",
+        "name": "Rony0620-nodes.prx_1",
+        "version": "1.0",
+        "toscaModelURL": "/sdc/v1/catalog/resources/ca9d0619-51fc-4c62-a653-c22297a7da0d/toscaModel",
+        "category": "Generic",
+        "subCategory": "Abstract",
+        "resourceType": "CVFC",
+        "lifecycleState": "CERTIFIED",
+        "lastUpdaterUserId": "el489u"
+    },
+    {
+        "uuid": "183ca9a3-5e5d-4180-9e16-b89cb19050d6",
+        "invariantUUID": "9f0ba4ff-766b-4a9a-a652-2d153b1713fe",
+        "name": "Rony0620-nodes.rdn_3",
+        "version": "1.0",
+        "toscaModelURL": "/sdc/v1/catalog/resources/183ca9a3-5e5d-4180-9e16-b89cb19050d6/toscaModel",
+        "category": "Generic",
+        "subCategory": "Abstract",
+        "resourceType": "CVFC",
+        "lifecycleState": "CERTIFIED",
+        "lastUpdaterUserId": "el489u"
+    },
+    {
+        "uuid": "a4a0faf3-ec92-425c-8720-2cbd43748348",
+        "invariantUUID": "45a6581e-9bbf-40d9-a6cf-07330e25a9ff",
+        "name": "vCTS-Alina-nodes.TEST_server",
+        "version": "1.0",
+        "toscaModelURL": "/sdc/v1/catalog/resources/a4a0faf3-ec92-425c-8720-2cbd43748348/toscaModel",
+        "category": "Generic",
+        "subCategory": "Abstract",
+        "resourceType": "CVFC",
+        "lifecycleState": "CERTIFIED",
+        "lastUpdaterUserId": "af3193"
+    },
+    {
+        "uuid": "140b8590-3d21-474c-9cd2-72d71eae93ac",
+        "invariantUUID": "4ddeea35-c041-472a-853b-40b8974dd9ca",
+        "name": "MNSOAM DEMO-nodes.heat.mnsoamvfw",
+        "version": "1.0",
+        "toscaModelURL": "/sdc/v1/catalog/resources/140b8590-3d21-474c-9cd2-72d71eae93ac/toscaModel",
+        "category": "Generic",
+        "subCategory": "Abstract",
+        "resourceType": "CVFC",
+        "lifecycleState": "CERTIFIED",
+        "lastUpdaterUserId": "sa997j"
+    },
+    {
+        "uuid": "2aa34c35-e0b6-4974-89d7-68b0595a67a9",
+        "invariantUUID": "2aab35d1-61a4-4b08-a69b-a2e472118ea5",
+        "name": "infra-nodes.vdhcp",
+        "version": "1.0",
+        "toscaModelURL": "/sdc/v1/catalog/resources/2aa34c35-e0b6-4974-89d7-68b0595a67a9/toscaModel",
+        "category": "Generic",
+        "subCategory": "Abstract",
+        "resourceType": "CVFC",
+        "lifecycleState": "CERTIFIED",
+        "lastUpdaterUserId": "ml636r"
+    },
+    {
+        "uuid": "7fdf044e-7e8b-4a78-b560-1de3709a5748",
+        "invariantUUID": "9fda9cb6-1d19-4b83-8cb9-2ec6a1fbd72e",
+        "name": "infra-nodes.vweb",
+        "version": "1.0",
+        "toscaModelURL": "/sdc/v1/catalog/resources/7fdf044e-7e8b-4a78-b560-1de3709a5748/toscaModel",
+        "category": "Generic",
+        "subCategory": "Abstract",
+        "resourceType": "CVFC",
+        "lifecycleState": "CERTIFIED",
+        "lastUpdaterUserId": "ml636r"
+    },
+    {
+        "uuid": "49632b9c-cb8e-43a3-8aaf-824418e57056",
+        "invariantUUID": "19a3b039-6c70-4682-b6c6-9d4a0c81f67a",
+        "name": "vgmux-nodes.vgmux",
+        "version": "1.0",
+        "toscaModelURL": "/sdc/v1/catalog/resources/49632b9c-cb8e-43a3-8aaf-824418e57056/toscaModel",
+        "category": "Generic",
+        "subCategory": "Abstract",
+        "resourceType": "CVFC",
+        "lifecycleState": "CERTIFIED",
+        "lastUpdaterUserId": "ml636r"
+    },
+    {
+        "uuid": "07d4e7a0-b849-400d-8c9a-3cb77e7dd8b0",
+        "invariantUUID": "dc87db03-610d-415c-9b4d-2299e34a944f",
+        "name": "Rony0620111-nodes.rdn_3",
+        "version": "1.0",
+        "toscaModelURL": "/sdc/v1/catalog/resources/07d4e7a0-b849-400d-8c9a-3cb77e7dd8b0/toscaModel",
+        "category": "Generic",
+        "subCategory": "Abstract",
+        "resourceType": "CVFC",
+        "lifecycleState": "CERTIFIED",
+        "lastUpdaterUserId": "el489u"
+    },
+    {
+        "uuid": "77752274-77c0-430b-a99c-1b4f324fbbe0",
+        "invariantUUID": "e9367f4e-0346-4fff-996f-309460cd6766",
+        "name": "Rony0620111-nodes.rdn_1",
+        "version": "1.0",
+        "toscaModelURL": "/sdc/v1/catalog/resources/77752274-77c0-430b-a99c-1b4f324fbbe0/toscaModel",
+        "category": "Generic",
+        "subCategory": "Abstract",
+        "resourceType": "CVFC",
+        "lifecycleState": "CERTIFIED",
+        "lastUpdaterUserId": "el489u"
+    },
+    {
+        "uuid": "34236492-9bdf-4014-804d-6067f52bc62d",
+        "invariantUUID": "e8cea9ef-fe53-453c-a44f-1dd8a1e23fcc",
+        "name": "CVFC1-nodes.pcm",
+        "version": "1.0",
+        "toscaModelURL": "/sdc/v1/catalog/resources/34236492-9bdf-4014-804d-6067f52bc62d/toscaModel",
+        "category": "Generic",
+        "subCategory": "Abstract",
+        "resourceType": "CVFC",
+        "lifecycleState": "CERTIFIED",
+        "lastUpdaterUserId": "m08740"
+    },
+    {
+        "uuid": "3cc412d3-a6ee-4d3c-acc8-2a1ff7810377",
+        "invariantUUID": "db337882-2050-45d2-93df-815e686fd9ce",
+        "name": "CVFC1-nodes.oam",
+        "version": "1.0",
+        "toscaModelURL": "/sdc/v1/catalog/resources/3cc412d3-a6ee-4d3c-acc8-2a1ff7810377/toscaModel",
+        "category": "Generic",
+        "subCategory": "Abstract",
+        "resourceType": "CVFC",
+        "lifecycleState": "CERTIFIED",
+        "lastUpdaterUserId": "m08740"
+    },
+    {
+        "uuid": "1e55adcd-dabf-432e-b872-f8ba02931b15",
+        "invariantUUID": "31e1074f-8a61-4834-a7e4-fcb72a1f188c",
+        "name": "ddd-nodes.fe_1",
+        "version": "1.0",
+        "toscaModelURL": "/sdc/v1/catalog/resources/1e55adcd-dabf-432e-b872-f8ba02931b15/toscaModel",
+        "category": "Generic",
+        "subCategory": "Abstract",
+        "resourceType": "CVFC",
+        "lifecycleState": "CERTIFIED",
+        "lastUpdaterUserId": "m08740"
+    },
+    {
+        "uuid": "62e449b8-0539-450c-a929-e78af95decef",
+        "invariantUUID": "85f251db-1319-4951-bcdf-d7da9d143469",
+        "name": "ddd-nodes.be",
+        "version": "1.0",
+        "toscaModelURL": "/sdc/v1/catalog/resources/62e449b8-0539-450c-a929-e78af95decef/toscaModel",
+        "category": "Generic",
+        "subCategory": "Abstract",
+        "resourceType": "CVFC",
+        "lifecycleState": "CERTIFIED",
+        "lastUpdaterUserId": "m08740"
+    },
+    {
+        "uuid": "72333ee0-007b-4e98-a097-4bc1da668fc6",
+        "invariantUUID": "f9257741-42cb-419b-a2d4-97b8bbfe11a8",
+        "name": "Renana-test-nodes.vlc",
+        "version": "1.0",
+        "toscaModelURL": "/sdc/v1/catalog/resources/72333ee0-007b-4e98-a097-4bc1da668fc6/toscaModel",
+        "category": "Generic",
+        "subCategory": "Abstract",
+        "resourceType": "CVFC",
+        "lifecycleState": "CERTIFIED",
+        "lastUpdaterUserId": "rh176a"
+    },
+    {
+        "uuid": "4de24e5d-9608-45fc-8803-980f93841f89",
+        "invariantUUID": "0b30ace5-c8d7-431c-944a-9221529dd643",
+        "name": "renana-test2-nodes.fsb_0",
+        "version": "1.0",
+        "toscaModelURL": "/sdc/v1/catalog/resources/4de24e5d-9608-45fc-8803-980f93841f89/toscaModel",
+        "category": "Generic",
+        "subCategory": "Abstract",
+        "resourceType": "CVFC",
+        "lifecycleState": "CERTIFIED",
+        "lastUpdaterUserId": "rh176a"
+    },
+    {
+        "uuid": "a5e5d12f-7cc8-4b6a-b1b1-f344a7653b76",
+        "invariantUUID": "27784c91-39ff-4ed1-b30d-dc5a2f2acf54",
+        "name": "Renana-test-nodes.ncb_0",
+        "version": "1.0",
+        "toscaModelURL": "/sdc/v1/catalog/resources/a5e5d12f-7cc8-4b6a-b1b1-f344a7653b76/toscaModel",
+        "category": "Generic",
+        "subCategory": "Abstract",
+        "resourceType": "CVFC",
+        "lifecycleState": "CERTIFIED",
+        "lastUpdaterUserId": "rh176a"
+    },
+    {
+        "uuid": "be58ec10-fdda-4436-95db-1f059508e63c",
+        "invariantUUID": "8694b620-d63c-4e0d-93aa-eb78a7b30836",
+        "name": "vbrgemu-nodes.vbrgemu",
+        "version": "1.0",
+        "toscaModelURL": "/sdc/v1/catalog/resources/be58ec10-fdda-4436-95db-1f059508e63c/toscaModel",
+        "category": "Generic",
+        "subCategory": "Abstract",
+        "resourceType": "CVFC",
+        "lifecycleState": "CERTIFIED",
+        "lastUpdaterUserId": "ml636r"
+    },
+    {
+        "uuid": "fb0a4dae-87f6-4c72-897c-aa0c7733bb1d",
+        "invariantUUID": "c58d67d2-b3b9-43cc-9a37-fd1a3e07533f",
+        "name": "Rony0620-nodes.rdn_0",
+        "version": "1.0",
+        "toscaModelURL": "/sdc/v1/catalog/resources/fb0a4dae-87f6-4c72-897c-aa0c7733bb1d/toscaModel",
+        "category": "Generic",
+        "subCategory": "Abstract",
+        "resourceType": "CVFC",
+        "lifecycleState": "CERTIFIED",
+        "lastUpdaterUserId": "el489u"
+    },
+    {
+        "uuid": "eff16637-cc77-4b5e-bb18-e59f4901406b",
+        "invariantUUID": "f7596e3a-4de9-4e00-9848-193a9f837be7",
+        "name": "Renana-test-nodes.fsb_0",
+        "version": "1.0",
+        "toscaModelURL": "/sdc/v1/catalog/resources/eff16637-cc77-4b5e-bb18-e59f4901406b/toscaModel",
+        "category": "Generic",
+        "subCategory": "Abstract",
+        "resourceType": "CVFC",
+        "lifecycleState": "CERTIFIED",
+        "lastUpdaterUserId": "rh176a"
+    },
+    {
+        "uuid": "a4d9c48f-177b-498d-a4f2-f727359d930c",
+        "invariantUUID": "f7d8ca0d-888b-450c-af0f-cee7d6c60bfb",
+        "name": "Renana-test-nodes.fsb_1",
+        "version": "1.0",
+        "toscaModelURL": "/sdc/v1/catalog/resources/a4d9c48f-177b-498d-a4f2-f727359d930c/toscaModel",
+        "category": "Generic",
+        "subCategory": "Abstract",
+        "resourceType": "CVFC",
+        "lifecycleState": "CERTIFIED",
+        "lastUpdaterUserId": "rh176a"
+    },
+    {
+        "uuid": "a12837b0-336a-473f-b19c-9f711eac89bb",
+        "invariantUUID": "95f6e77e-bff4-414a-b4e1-05fd278083b0",
+        "name": "Renana-test-nodes.ncb_1",
+        "version": "1.0",
+        "toscaModelURL": "/sdc/v1/catalog/resources/a12837b0-336a-473f-b19c-9f711eac89bb/toscaModel",
+        "category": "Generic",
+        "subCategory": "Abstract",
+        "resourceType": "CVFC",
+        "lifecycleState": "CERTIFIED",
+        "lastUpdaterUserId": "rh176a"
+    },
+    {
+        "uuid": "ba665cad-c3fa-4b7b-b49c-e9151e314fff",
+        "invariantUUID": "a2b7ddb9-d201-42e3-8417-36df684c0606",
+        "name": "Rony0620111-nodes.prx_1",
+        "version": "1.0",
+        "toscaModelURL": "/sdc/v1/catalog/resources/ba665cad-c3fa-4b7b-b49c-e9151e314fff/toscaModel",
+        "category": "Generic",
+        "subCategory": "Abstract",
+        "resourceType": "CVFC",
+        "lifecycleState": "CERTIFIED",
+        "lastUpdaterUserId": "el489u"
+    },
+    {
+        "uuid": "f577a370-980c-4d28-93d7-6db297260bf6",
+        "invariantUUID": "c74bce43-ae25-48ab-8d0b-21aaace97443",
+        "name": "renana-test2-nodes.ncb_0",
+        "version": "1.0",
+        "toscaModelURL": "/sdc/v1/catalog/resources/f577a370-980c-4d28-93d7-6db297260bf6/toscaModel",
+        "category": "Generic",
+        "subCategory": "Abstract",
+        "resourceType": "CVFC",
+        "lifecycleState": "CERTIFIED",
+        "lastUpdaterUserId": "rh176a"
+    },
+    {
+        "uuid": "67fc9bfe-5f35-406e-892b-bcd6635d8503",
+        "invariantUUID": "2e882441-f3a2-4a3d-8ce2-c7fb8e2c96ad",
+        "name": "renana-test2-nodes.gpb_0",
+        "version": "1.0",
+        "toscaModelURL": "/sdc/v1/catalog/resources/67fc9bfe-5f35-406e-892b-bcd6635d8503/toscaModel",
+        "category": "Generic",
+        "subCategory": "Abstract",
+        "resourceType": "CVFC",
+        "lifecycleState": "CERTIFIED",
+        "lastUpdaterUserId": "rh176a"
+    },
+    {
+        "uuid": "1ca8c4da-0609-4fe4-86d5-a3e95b326f6d",
+        "invariantUUID": "d7e5da2d-f19c-4bab-b108-04250bd834e9",
+        "name": "renana-test2-nodes.fsb_1",
+        "version": "1.0",
+        "toscaModelURL": "/sdc/v1/catalog/resources/1ca8c4da-0609-4fe4-86d5-a3e95b326f6d/toscaModel",
+        "category": "Generic",
+        "subCategory": "Abstract",
+        "resourceType": "CVFC",
+        "lifecycleState": "CERTIFIED",
+        "lastUpdaterUserId": "rh176a"
+    },
+    {
+        "uuid": "f09d1939-490e-456d-a17c-9e3fe75017aa",
+        "invariantUUID": "c21c3e6b-0196-43b0-965d-c495b036970d",
+        "name": "ddd-nodes.fe",
+        "version": "1.0",
+        "toscaModelURL": "/sdc/v1/catalog/resources/f09d1939-490e-456d-a17c-9e3fe75017aa/toscaModel",
+        "category": "Generic",
+        "subCategory": "Abstract",
+        "resourceType": "CVFC",
+        "lifecycleState": "CERTIFIED",
+        "lastUpdaterUserId": "m08740"
+    },
+    {
+        "uuid": "f502cd24-ee81-446f-87dc-cd4d1924b3d0",
+        "invariantUUID": "b4955a3a-7d5e-43e8-997a-9f1b6aa88cff",
+        "name": "infra-nodes.vdns",
+        "version": "1.0",
+        "toscaModelURL": "/sdc/v1/catalog/resources/f502cd24-ee81-446f-87dc-cd4d1924b3d0/toscaModel",
+        "category": "Generic",
+        "subCategory": "Abstract",
+        "resourceType": "CVFC",
+        "lifecycleState": "CERTIFIED",
+        "lastUpdaterUserId": "ml636r"
+    },
+    {
+        "uuid": "22357844-f903-4252-b9b3-bb21d3190e88",
+        "invariantUUID": "df1ea6f1-0709-408d-bc46-9ef2dce28d08",
+        "name": "vbng-nodes.vbng",
+        "version": "1.0",
+        "toscaModelURL": "/sdc/v1/catalog/resources/22357844-f903-4252-b9b3-bb21d3190e88/toscaModel",
+        "category": "Generic",
+        "subCategory": "Abstract",
+        "resourceType": "CVFC",
+        "lifecycleState": "CERTIFIED",
+        "lastUpdaterUserId": "ml636r"
+    },
+    {
+        "uuid": "5443c9e4-e979-48de-9662-db5e5b0d8473",
+        "invariantUUID": "f7493b2f-c968-4e2c-bbf4-8fa83e1e0eb0",
+        "name": "vgw-nodes.vgw",
+        "version": "1.0",
+        "toscaModelURL": "/sdc/v1/catalog/resources/5443c9e4-e979-48de-9662-db5e5b0d8473/toscaModel",
+        "category": "Generic",
+        "subCategory": "Abstract",
+        "resourceType": "CVFC",
+        "lifecycleState": "CERTIFIED",
+        "lastUpdaterUserId": "ml636r"
+    },
+    {
+        "uuid": "419fd69c-9d1f-4679-9677-88cff351bc13",
+        "invariantUUID": "dd24130f-dbed-49b9-8d73-945540766db6",
+        "name": "Rony0620-nodes.rdn_2",
+        "version": "1.0",
+        "toscaModelURL": "/sdc/v1/catalog/resources/419fd69c-9d1f-4679-9677-88cff351bc13/toscaModel",
+        "category": "Generic",
+        "subCategory": "Abstract",
+        "resourceType": "CVFC",
+        "lifecycleState": "CERTIFIED",
+        "lastUpdaterUserId": "el489u"
+    },
+    {
+        "uuid": "02eb6606-ba4d-428a-8043-2a57acfc8180",
+        "invariantUUID": "6ab293e3-3be0-4318-99bd-1235f813e0fa",
+        "name": "Rony0620111-nodes.prx_0",
+        "version": "1.0",
+        "toscaModelURL": "/sdc/v1/catalog/resources/02eb6606-ba4d-428a-8043-2a57acfc8180/toscaModel",
+        "category": "Generic",
+        "subCategory": "Abstract",
+        "resourceType": "CVFC",
+        "lifecycleState": "CERTIFIED",
+        "lastUpdaterUserId": "el489u"
+    },
+    {
+        "uuid": "9f5fcf0f-013a-429c-807d-325a0ffe1f4e",
+        "invariantUUID": "913bb2a7-e8f5-41d8-98d5-bc8be4683557",
+        "name": "AlinaTest-nodes.TEST_server",
+        "version": "1.0",
+        "toscaModelURL": "/sdc/v1/catalog/resources/9f5fcf0f-013a-429c-807d-325a0ffe1f4e/toscaModel",
+        "category": "Generic",
+        "subCategory": "Abstract",
+        "resourceType": "CVFC",
+        "lifecycleState": "CERTIFIED",
+        "lastUpdaterUserId": "af3193"
+    },
+    {
+        "uuid": "3b1050e1-ffef-4e39-9e6e-7f13a3b9c28a",
+        "invariantUUID": "27d9d366-c241-49f7-b24b-341cc9b1effd",
+        "name": "Alina0831VSP-nodes.TEST_server",
+        "version": "1.0",
+        "toscaModelURL": "/sdc/v1/catalog/resources/3b1050e1-ffef-4e39-9e6e-7f13a3b9c28a/toscaModel",
+        "category": "Generic",
+        "subCategory": "Abstract",
+        "resourceType": "CVFC",
+        "lifecycleState": "CERTIFIED",
+        "lastUpdaterUserId": "af3193"
+    },
+    {
+        "uuid": "e6f1576a-6ba7-48b9-a72d-c25d6e830b7c",
+        "invariantUUID": "d293c16b-7576-4422-bf5a-ec205a80381f",
+        "name": "Renana-test-nodes.gpb_1",
+        "version": "1.0",
+        "toscaModelURL": "/sdc/v1/catalog/resources/e6f1576a-6ba7-48b9-a72d-c25d6e830b7c/toscaModel",
+        "category": "Generic",
+        "subCategory": "Abstract",
+        "resourceType": "CVFC",
+        "lifecycleState": "CERTIFIED",
+        "lastUpdaterUserId": "rh176a"
+    },
+    {
+        "uuid": "c01d30f8-31ee-4e77-90a9-1e6c253e905f",
+        "invariantUUID": "cabfb49c-e82d-4bbf-b042-debe33041f71",
+        "name": "renana-test2-nodes.vlc",
+        "version": "1.0",
+        "toscaModelURL": "/sdc/v1/catalog/resources/c01d30f8-31ee-4e77-90a9-1e6c253e905f/toscaModel",
+        "category": "Generic",
+        "subCategory": "Abstract",
+        "resourceType": "CVFC",
+        "lifecycleState": "CERTIFIED",
+        "lastUpdaterUserId": "rh176a"
+    },
+    {
+        "uuid": "9020ebb6-0d56-4355-8308-3b3082d96565",
+        "invariantUUID": "3ebd6d0e-de0a-4981-9be7-f83855fee828",
+        "name": "Rony0620-nodes.oam_0",
+        "version": "1.0",
+        "toscaModelURL": "/sdc/v1/catalog/resources/9020ebb6-0d56-4355-8308-3b3082d96565/toscaModel",
+        "category": "Generic",
+        "subCategory": "Abstract",
+        "resourceType": "CVFC",
+        "lifecycleState": "CERTIFIED",
+        "lastUpdaterUserId": "el489u"
+    },
+    {
+        "uuid": "1d746450-e070-4c45-bb49-158537d3246b",
+        "invariantUUID": "2b4c04b5-13ea-4069-bd80-cd2f1ffabaaf",
+        "name": "Rony0620111-nodes.rdn_4",
+        "version": "1.0",
+        "toscaModelURL": "/sdc/v1/catalog/resources/1d746450-e070-4c45-bb49-158537d3246b/toscaModel",
+        "category": "Generic",
+        "subCategory": "Abstract",
+        "resourceType": "CVFC",
+        "lifecycleState": "CERTIFIED",
+        "lastUpdaterUserId": "el489u"
+    },
+    {
+        "uuid": "712d2e08-0ca2-4f48-b193-34a887a168c6",
+        "invariantUUID": "86a03610-7a65-4789-ad34-66af631c2306",
+        "name": "Shani14.8Software Product-nodes.ltm",
+        "version": "1.0",
+        "toscaModelURL": "/sdc/v1/catalog/resources/712d2e08-0ca2-4f48-b193-34a887a168c6/toscaModel",
+        "category": "Generic",
+        "subCategory": "Abstract",
+        "resourceType": "CVFC",
+        "lifecycleState": "CERTIFIED",
+        "lastUpdaterUserId": "m08740"
+    },
+    {
+        "uuid": "c13f95f6-7757-4124-a5be-3a7c6ae2bd20",
+        "invariantUUID": "4255dd9b-6d39-436f-8b80-1b101c261684",
+        "name": "CVFC1-nodes.psm",
+        "version": "1.0",
+        "toscaModelURL": "/sdc/v1/catalog/resources/c13f95f6-7757-4124-a5be-3a7c6ae2bd20/toscaModel",
+        "category": "Generic",
+        "subCategory": "Abstract",
+        "resourceType": "CVFC",
+        "lifecycleState": "CERTIFIED",
+        "lastUpdaterUserId": "m08740"
+    },
+    {
+        "uuid": "12e60ab4-7e48-4f6b-a124-f109b50d9f4a",
+        "invariantUUID": "d2531c7b-fe26-4371-93c6-9630e3f1c920",
+        "name": "ddd-nodes.smp",
+        "version": "1.0",
+        "toscaModelURL": "/sdc/v1/catalog/resources/12e60ab4-7e48-4f6b-a124-f109b50d9f4a/toscaModel",
+        "category": "Generic",
+        "subCategory": "Abstract",
+        "resourceType": "CVFC",
+        "lifecycleState": "CERTIFIED",
+        "lastUpdaterUserId": "m08740"
+    },
+    {
+        "uuid": "fb57af5b-84f2-4baf-b6a8-61062f924cd2",
+        "invariantUUID": "73690cef-b776-4a29-b6fe-4fc1f871a27c",
+        "name": "Alina1002VF-nodes.TEST_server",
+        "version": "1.0",
+        "toscaModelURL": "/sdc/v1/catalog/resources/fb57af5b-84f2-4baf-b6a8-61062f924cd2/toscaModel",
+        "category": "Generic",
+        "subCategory": "Abstract",
+        "resourceType": "CVFC",
+        "lifecycleState": "CERTIFIED",
+        "lastUpdaterUserId": "af3193"
+    },
+    {
+        "uuid": "7f550ae3-1242-4468-b04a-0666946d84aa",
+        "invariantUUID": "64be47c5-a176-4dbb-9596-e9106e577be7",
+        "name": "NFOD_CHECKPOINT-nodes.MultiDeploymentFlavor.CVFC",
+        "version": "1.0",
+        "toscaModelURL": "/sdc/v1/catalog/resources/7f550ae3-1242-4468-b04a-0666946d84aa/toscaModel",
+        "category": "Generic",
+        "subCategory": "Abstract",
+        "resourceType": "CVFC",
+        "lifecycleState": "CERTIFIED",
+        "lastUpdaterUserId": "sa997j"
+    },
+    {
+        "uuid": "3af9b720-144d-4507-aea8-73b49bc243c4",
+        "invariantUUID": "587e283e-6b8e-4d40-85cc-07285fb88252",
+        "name": "alaram-nodes.vCTS_server",
+        "version": "1.0",
+        "toscaModelURL": "/sdc/v1/catalog/resources/3af9b720-144d-4507-aea8-73b49bc243c4/toscaModel",
+        "category": "Generic",
+        "subCategory": "Abstract",
+        "resourceType": "CVFC",
+        "lifecycleState": "CERTIFIED",
+        "lastUpdaterUserId": "sa997j"
+    },
+    {
+        "uuid": "24ca039c-26e1-4f79-b2a4-660a7a21f752",
+        "invariantUUID": "d2a36303-93f0-44a3-b96f-f0e1b1580d91",
+        "name": "Test_SHAY-nodes.vnf",
+        "version": "1.0",
+        "toscaModelURL": "/sdc/v1/catalog/resources/24ca039c-26e1-4f79-b2a4-660a7a21f752/toscaModel",
+        "category": "Generic",
+        "subCategory": "Abstract",
+        "resourceType": "CVFC",
+        "lifecycleState": "CERTIFIED",
+        "lastUpdaterUserId": "m08740"
+    },
+    {
+        "uuid": "c0e6a2a1-3fc7-4663-8df7-b0263288f116",
+        "invariantUUID": "469da957-40a1-44d2-b23c-f90d50ea20fc",
+        "name": "CVFC1-nodes.ppd",
+        "version": "1.0",
+        "toscaModelURL": "/sdc/v1/catalog/resources/c0e6a2a1-3fc7-4663-8df7-b0263288f116/toscaModel",
+        "category": "Generic",
+        "subCategory": "Abstract",
+        "resourceType": "CVFC",
+        "lifecycleState": "CERTIFIED",
+        "lastUpdaterUserId": "m08740"
+    },
+    {
+        "uuid": "e74db726-0ad6-4a6e-be6c-4094df81eafd",
+        "invariantUUID": "e29b57d8-cbfb-4b37-8aea-7c124671ea03",
+        "name": "renana_alarm-nodes.heat.dns",
+        "version": "1.0",
+        "toscaModelURL": "/sdc/v1/catalog/resources/e74db726-0ad6-4a6e-be6c-4094df81eafd/toscaModel",
+        "category": "Generic",
+        "subCategory": "Abstract",
+        "resourceType": "CVFC",
+        "lifecycleState": "CERTIFIED",
+        "lastUpdaterUserId": "rh176a"
+    },
+    {
+        "uuid": "e49a643b-23a0-4b50-a3c0-a5a60003a958",
+        "invariantUUID": "b3da7781-0f09-48e1-af15-262e5919141a",
+        "name": "Simona0912-nodes.TEST_server",
+        "version": "1.0",
+        "toscaModelURL": "/sdc/v1/catalog/resources/e49a643b-23a0-4b50-a3c0-a5a60003a958/toscaModel",
+        "category": "Generic",
+        "subCategory": "Abstract",
+        "resourceType": "CVFC",
+        "lifecycleState": "CERTIFIED",
+        "lastUpdaterUserId": "ss1245"
+    },
+    {
+        "uuid": "e0941d01-8ec6-448b-80f8-007e8c88ed28",
+        "invariantUUID": "36aaaafb-9341-4bd3-9ea6-1f7cd4c5f18a",
+        "name": "demo_1234-nodes.MultiDeploymentFlavor.CVFC",
+        "version": "1.0",
+        "toscaModelURL": "/sdc/v1/catalog/resources/e0941d01-8ec6-448b-80f8-007e8c88ed28/toscaModel",
+        "category": "Generic",
+        "subCategory": "Abstract",
+        "resourceType": "CVFC",
+        "lifecycleState": "CERTIFIED",
+        "lastUpdaterUserId": "sa997j"
+    },
+    {
+        "uuid": "98771c36-da29-4a80-85e9-72e9fbef3286",
+        "invariantUUID": "741f1b1c-bb27-4e4d-8645-834f357ecf03",
+        "name": "AlinaVSP1011-nodes.TEST_server",
+        "version": "1.0",
+        "toscaModelURL": "/sdc/v1/catalog/resources/98771c36-da29-4a80-85e9-72e9fbef3286/toscaModel",
+        "category": "Generic",
+        "subCategory": "Abstract",
+        "resourceType": "CVFC",
+        "lifecycleState": "CERTIFIED",
+        "lastUpdaterUserId": "af3193"
+    },
+    {
+        "uuid": "7218a91c-7c13-443f-b085-a10f1593624e",
+        "invariantUUID": "66326c07-be88-4260-a627-4cab5a9c0bbc",
+        "name": "vmme_1710-nodes.fsb_1",
+        "version": "1.0",
+        "toscaModelURL": "/sdc/v1/catalog/resources/7218a91c-7c13-443f-b085-a10f1593624e/toscaModel",
+        "category": "Generic",
+        "subCategory": "Abstract",
+        "resourceType": "CVFC",
+        "lifecycleState": "CERTIFIED",
+        "lastUpdaterUserId": "sa997j"
+    },
+    {
+        "uuid": "5a2c7097-c582-4337-918e-48b58d79dd74",
+        "invariantUUID": "5e5c0b6c-40c8-4909-bb7c-334e16ad833e",
+        "name": "vmme_1710-nodes.ncb_0",
+        "version": "1.0",
+        "toscaModelURL": "/sdc/v1/catalog/resources/5a2c7097-c582-4337-918e-48b58d79dd74/toscaModel",
+        "category": "Generic",
+        "subCategory": "Abstract",
+        "resourceType": "CVFC",
+        "lifecycleState": "CERTIFIED",
+        "lastUpdaterUserId": "sa997j"
+    },
+    {
+        "uuid": "e70970f3-aa70-4d6b-9fd4-eb07ff42693f",
+        "invariantUUID": "84358281-e8c1-4a45-ae2d-e3d797f18fc5",
+        "name": "VF- DemoR-nodes.vmx_vpfe",
+        "version": "1.0",
+        "toscaModelURL": "/sdc/v1/catalog/resources/e70970f3-aa70-4d6b-9fd4-eb07ff42693f/toscaModel",
+        "category": "Generic",
+        "subCategory": "Abstract",
+        "resourceType": "CVFC",
+        "lifecycleState": "CERTIFIED",
+        "lastUpdaterUserId": "rh176a"
+    }
+]
\ No newline at end of file
index b0fd639..567c79f 100644 (file)
@@ -94,9 +94,9 @@ kubernetes.namespace=com-att-ajsc
 #server.port=0
 #Camunda Process Engine DataSource connection Details
 spring.datasource.camunda.driverClassName=org.mariadb.jdbc.Driver
-spring.datasource.camunda.url=jdbc:mariadb://localhost:${docker.mariadb.port.host}/camundabpm?autoReconnect=true
+spring.datasource.camunda.url=jdbc:mariadb:sequential://localhost:${docker.mariadb.port.host}/camundabpm?autoReconnect=true&retriesAllDown=2147483647&failoverLoopRetries=2147483647\r
 spring.datasource.camunda.username=camunda
-spring.datasource.camunda.password=ndMSpw4CAM
+spring.datasource.camunda.password=D75B89195FD913848EA11416F755390E\r
 spring.datasource.camunda.validationQuery=SELECT 1
 spring.datasource.camunda.validationQueryTimeout=20000
 spring.datasource.camunda.validationInterval=30000
@@ -116,9 +116,9 @@ camunda.bpm.database.schema-update=false
 
 #clds datasource connection details
 spring.datasource.cldsdb.driverClassName=org.mariadb.jdbc.Driver
-spring.datasource.cldsdb.url=jdbc:mariadb://localhost:${docker.mariadb.port.host}/cldsdb4?autoReconnect=true
+spring.datasource.cldsdb.url=jdbc:mariadb:sequential://localhost:${docker.mariadb.port.host}/cldsdb4?autoReconnect=true&retriesAllDown=2147483647&failoverLoopRetries=2147483647\r
 spring.datasource.cldsdb.username=clds
-spring.datasource.cldsdb.password=sidnnd83K
+spring.datasource.cldsdb.password=035F8819FEBB754F3C99ECCCC1259850\r
 spring.datasource.cldsdb.validationQuery=SELECT 1
 spring.datasource.cldsdb.validationQueryTimeout=20000
 spring.datasource.cldsdb.validationInterval=30000
@@ -145,6 +145,7 @@ org.onap.clamp.config.files.cldsReference=classpath:/clds/clds-reference.propert
 org.onap.clamp.config.files.cldsPolicyConfig=classpath:/clds/clds-policy-config.properties
 org.onap.clamp.config.files.cldsUsers=classpath:/clds/clds-users.json
 org.onap.clamp.config.files.globalClds=classpath:/clds/globalClds.properties
+org.onap.clamp.encryption.aes.key=aa3871669d893c7fb8abbcda31b88b4f
 
 #Define user permission related parameters, the permission type can be changed but MUST be redefined in clds-users.properties in that case !
 CLDS_PERMISSION_TYPE_CL=permission-type-cl