Fix healthcheck

Fix healthcheck and creds system due to AAF changes

Issue-ID: CLAMP-213
Change-Id: Idcc9a369ab384a1bba86b80f81a75a4631d8604e
Signed-off-by: sebdet <sd378r@intl.att.com>
diff --git a/src/main/resources/META-INF/resources/designer/partials/portfolios/extra_user_info.html b/src/main/resources/META-INF/resources/designer/partials/portfolios/extra_user_info.html
index bf151d7..c66047c 100644
--- a/src/main/resources/META-INF/resources/designer/partials/portfolios/extra_user_info.html
+++ b/src/main/resources/META-INF/resources/designer/partials/portfolios/extra_user_info.html
@@ -38,7 +38,10 @@
         	<b style="font-size:14px;">User Permissions:</b>
         	<div ng-if="userInfo['permissionReadTemplate']">Read Template</div>
 	        <div ng-if="userInfo['permissionReadCl']">Read Model</div>
+	        <div ng-if="userInfo['permissionReadTosca']">Read Tosca</div>
 	        <div ng-if="userInfo['permissionUpdateCl']">Edit Model</div>
+	        <div ng-if="userInfo['permissionUpdateTemplate']">Edit Template</div>
+	        <div ng-if="userInfo['permissionUpdateTosca']">Edit Tosca</div>
         </div>
     </div>
     <div attribute-test="extrauserinfof" class="modal-footer">
diff --git a/src/main/resources/application-noaaf.properties b/src/main/resources/application-noaaf.properties
index 3589553..fe7eabc 100644
--- a/src/main/resources/application-noaaf.properties
+++ b/src/main/resources/application-noaaf.properties
@@ -102,7 +102,7 @@
 
 #For EELF logback file
 #com.att.eelf.logging.path=
-com.att.eelf.logging.file=logback-default.xml
+clamp.config.logback.filename=logback-default.xml
 #The log folder that will be used in logback.xml file
 clamp.config.log.path=/var/log/ONAP/clamp
 clamp.config.files.systemProperties=classpath:/system.properties
@@ -211,5 +211,6 @@
 clamp.config.security.permission.type.cl.event=org.onap.clds.cl.event
 clamp.config.security.permission.type.filter.vf=org.onap.clamp.clds.filter.vf
 clamp.config.security.permission.type.template=org.onap.clamp.clds.template
+clamp.config.security.permission.type.tosca=org.onap.clamp.clds.tosca
 #This one indicates the type of instances (dev|prod|perf...), this must be set accordingly in clds-users.properties
 clamp.config.security.permission.instance=dev
diff --git a/src/main/resources/application.properties b/src/main/resources/application.properties
index 7bfe5d8..9e2e3c9 100644
--- a/src/main/resources/application.properties
+++ b/src/main/resources/application.properties
@@ -86,7 +86,7 @@
 
 camel.springboot.consumer-template-cache-size=1000
 camel.springboot.producer-template-cache-size=1000
-camel.springboot.jmx-enabled=false
+camel.springboot.jmx-enabled=true
 camel.defaultthreadpool.poolsize=10
 camel.defaultthreadpool.maxpoolsize=20
 camel.defaultthreadpool.maxqueuesize=1000
@@ -228,7 +228,7 @@
 clamp.config.security.permission.type.cl.event=org.onap.clds.cl.event
 clamp.config.security.permission.type.filter.vf=org.onap.clamp.clds.filter.vf
 clamp.config.security.permission.type.template=org.onap.clamp.clds.template
-clamp.config.security.permission.type.tosca=com.att.clamp.clds.tosca
+clamp.config.security.permission.type.tosca=org.onap.clamp.clds.tosca
 #This one indicates the type of instances (dev|prod|perf...), this must be set accordingly in clds-users.properties
 clamp.config.security.permission.instance=dev
 
@@ -237,7 +237,7 @@
 clamp.config.cadi.cadiLoglevel=DEBUG
 clamp.config.cadi.cadiLatitude=37.78187
 clamp.config.cadi.cadiLongitude=-122.26147
-clamp.config.cadi.aafLocateUrl=https://aaf-onap-beijing-test.osaaf.org
+clamp.config.cadi.aafLocateUrl=https://aaf-onap-test.osaaf.org:8095
 clamp.config.cadi.cadiKeystorePassword=enc:V_kq_EwDNb4itWp_lYfDGXIWJzemHGkhkZOxAQI9IHs
 clamp.config.cadi.cadiTruststorePassword=enc:Mj0YQqNCUKbKq2lPp1kTFQWeqLxaBXKNwd5F1yB1ukf
 #clamp.config.cadi.oauthTokenUrl=https://AAF_LOCATE_URL/AAF_NS.token:2.0/token
diff --git a/src/main/resources/clds/camel/rest/clds-services.xml b/src/main/resources/clds/camel/rest/clds-services.xml
index b63591f..e67fb16 100644
--- a/src/main/resources/clds/camel/rest/clds-services.xml
+++ b/src/main/resources/clds/camel/rest/clds-services.xml
@@ -1,132 +1,181 @@
 <rests xmlns="http://camel.apache.org/schema/spring">
-		<rest>
-				<get uri="/clds/cldsDetails" outType="org.onap.clamp.clds.model.CldsMonitoringDetails" produces="application/json">
-						<to
-								uri="bean:org.onap.clamp.clds.service.CldsService?method=getCLDSDetails()" />
-				</get>
-				<get uri="/clds/cldsInfo" outType="org.onap.clamp.clds.model.CldsInfo" produces="application/json">
-					<to
-								uri="bean:org.onap.clamp.clds.service.CldsService?method=getCldsInfo()" />
-				</get>
-				<get uri="/healthcheck" produces="application/json">
-					<to
-								uri="bean:org.onap.clamp.clds.service.CldsHealthcheckService?method=gethealthcheck()" />
-				</get>
-				<get uri="/clds/model/bpmn/{modelName}" produces="text/xml">
-						<to
-								uri="bean:org.onap.clamp.clds.service.CldsService?method=getBpmnXml(${header.modelName})" />
-				</get>
-				<get uri="/clds/model/image/{modelName}" produces="text/xml">
-						<to
-								uri="bean:org.onap.clamp.clds.service.CldsService?method=getImageXml(${header.modelName})" />
-				</get>
-				<get uri="/clds/model/{modelName}" outType="org.onap.clamp.clds.model.CldsModel" produces="application/json">
-						<to
-								uri="bean:org.onap.clamp.clds.service.CldsService?method=getModel(${header.modelName})" />
-				</get>
-				<put uri="/clds/model/{modelName}" type="org.onap.clamp.clds.model.CldsModel" consumes="application/json" outType="org.onap.clamp.clds.model.CldsModel" produces="application/json">
-						<to
-								uri="bean:org.onap.clamp.clds.service.CldsService?method=putModel(${header.modelName},${body})" />
-				</put>
-				<get uri="/clds/model-names" outType="org.onap.clamp.clds.model.ValueItem" produces="application/json">
-						<to
-								uri="bean:org.onap.clamp.clds.service.CldsService?method=getModelNames()" />
-				</get>
-				<put uri="/clds/action/{action}/{modelName}?test={test}" type="org.onap.clamp.clds.model.CldsModel" consumes="application/json" produces="application/json">
-						<to
-								uri="bean:org.onap.clamp.clds.service.CldsService?method=putModelAndProcessAction(${header.action},${header.modelName},${header.test},${body})" />
-				</put>
-				<post uri="/clds/dcae/event?test={test}" type="org.onap.clamp.clds.model.DcaeEvent" consumes="application/json" produces="application/json">
-						<to
-								uri="bean:org.onap.clamp.clds.service.CldsService?method=postDcaeEvent(${header.test},${body})" />
-				</post>
-				<get uri="/clds/sdc/services" produces="application/json">
-						<to
-								uri="bean:org.onap.clamp.clds.service.CldsService?method=getSdcServices()" />
-				</get>
-				<get uri="/clds/properties" produces="application/json">
-						<to
-								uri="bean:org.onap.clamp.clds.service.CldsService?method=getSdcProperties()" />
-				</get>
-				<get uri="/clds/properties/{serviceInvariantUUID}?refresh={refresh}" produces="application/json">
-						<to
-								uri="bean:org.onap.clamp.clds.service.CldsService?method=getSdcPropertiesByServiceUUIDForRefresh(${header.serviceInvariantUUID},${header.refresh})" />
-				</get>
-				<put uri="/clds/deploy/{modelName}" type="org.onap.clamp.clds.model.CldsModel" consumes="application/json" produces="application/json">
-						<to
-								uri="bean:org.onap.clamp.clds.service.CldsService?method=deployModel(${header.modelName},${body})" />
-				</put>
-				<put uri="/clds/undeploy/{modelName}" type="org.onap.clamp.clds.model.CldsModel" consumes="application/json" produces="application/json">
-						<to
-								uri="bean:org.onap.clamp.clds.service.CldsService?method=unDeployModel(${header.modelName},${body})" />
-				</put>
-				
-				
-				
-				
-				<get uri="/cldsTempate/template/bpmn/{templateName}" produces="text/xml" >
-						<to
-								uri="bean:org.onap.clamp.clds.service.CldsTemplateService?method=getBpmnTemplate(${header.templateName})" />
-				</get>
-				<get uri="/cldsTempate/template/image/{templateName}" produces="text/xml">
-						<to
-								uri="bean:org.onap.clamp.clds.service.CldsTemplateService?method=getImageXml(${header.templateName})" />
-				</get>
-				<get uri="/cldsTempate/template/{templateName}" outType="org.onap.clamp.clds.model.CldsTemplate" produces="application/json">
-						<to
-								uri="bean:org.onap.clamp.clds.service.CldsTemplateService?method=getTemplate(${header.templateName})" />
-				</get>
-				<put uri="/cldsTempate/template/{templateName}" type="org.onap.clamp.clds.model.CldsTemplate" consumes="application/json" outType="org.onap.clamp.clds.model.CldsTemplate" produces="application/json">
-						<to
-								uri="bean:org.onap.clamp.clds.service.CldsTemplateService?method=putTemplate(${header.templateName},${body})" />
-				</put>
-				<get uri="/cldsTempate/template-names" outType="org.onap.clamp.clds.model.ValueItem" produces="application/json">
-						<to
-								uri="bean:org.onap.clamp.clds.service.CldsTemplateService?method=getTemplateNames()" />
-				</get>
-				
-				
-				<put uri="/tosca/models/{toscaModelName}" type="org.onap.clamp.clds.model.CldsToscaModel" consumes="application/json" produces="application/json">
-						<to
-								uri="bean:org.onap.clamp.clds.service.CldsToscaService?method=parseToscaModelAndSave(${header.toscaModelName},${body})" />
-				</put>
-				<get uri="/tosca/models/policyType/{policyType}" produces="application/json">
-						<to
-								uri="bean:org.onap.clamp.clds.service.CldsToscaService?method=getToscaModelsByPolicyType(${header.policyType})" />
-				</get>
-				<get uri="/tosca/models" outType="org.onap.clamp.clds.model.CldsToscaModel" produces="application/json">
-						<to
-								uri="bean:org.onap.clamp.clds.service.CldsToscaService?method=getAllToscaModels()" />
-				</get>	
-				<get uri="/tosca/models/{toscaModelName}" outType="org.onap.clamp.clds.model.CldsToscaModel" produces="application/json">
-						<to
-								uri="bean:org.onap.clamp.clds.service.CldsToscaService?method=getToscaModel(${header.toscaModelName})" />
-				</get>
-				
-				
-				<put uri="/dictionary/{dictionaryName}" type="org.onap.clamp.clds.model.CldsDictionary" outType="org.onap.clamp.clds.model.CldsDictionary" consumes="application/json" produces="application/json">
-						<to
-								uri="bean:org.onap.clamp.clds.service.CldsDictionaryService?method=createOrUpdateDictionary(${header.dictionaryName},${body})" />
-				</put>
-				
-				<get uri="/dictionary" outType="org.onap.clamp.clds.model.CldsDictionary" produces="application/json">
-						<to
-								uri="bean:org.onap.clamp.clds.service.CldsDictionaryService?method=getAllDictionaryNames()" />
-				</get>
-				
-				<put uri="/dictionary/{dictionaryName}/items" type="org.onap.clamp.clds.model.CldsDictionaryItem" outType="org.onap.clamp.clds.model.CldsDictionaryItem" consumes="application/json" produces="application/json">
-						<to
-								uri="bean:org.onap.clamp.clds.service.CldsDictionaryService?method=createOrUpdateDictionaryElements(${header.dictionaryName},${body})" />
-				</put>
-				
-				<get uri="/dictionary/{dictionaryName}/items" outType="org.onap.clamp.clds.model.CldsDictionary" produces="application/json">
-						<to
-								uri="bean:org.onap.clamp.clds.service.CldsDictionaryService?method=getDictionaryElementsByName(${header.dictionaryName})" />
-				</get>
-				
-				<get uri="/user/getUser" produces="text/plain">
-						<to
-								uri="bean:org.onap.clamp.clds.service.UserService?method=getUser()" />
-				</get>
-		</rest>
+	<rest>
+		<get uri="/clds/cldsDetails"
+			outType="org.onap.clamp.clds.model.CldsMonitoringDetails"
+			produces="application/json">
+			<to
+				uri="bean:org.onap.clamp.clds.service.CldsService?method=getCLDSDetails()" />
+		</get>
+		<get uri="/clds/cldsInfo"
+			outType="org.onap.clamp.clds.model.CldsInfo"
+			produces="application/json">
+			<to
+				uri="bean:org.onap.clamp.clds.service.CldsService?method=getCldsInfo()" />
+		</get>
+		<get uri="/healthcheck" produces="application/json">
+			<to
+				uri="bean:org.onap.clamp.clds.service.CldsHealthcheckService?method=gethealthcheck()" />
+		</get>
+		<get uri="/clds/model/bpmn/{modelName}" produces="text/xml">
+			<to
+				uri="bean:org.onap.clamp.clds.service.CldsService?method=getBpmnXml(${header.modelName})" />
+		</get>
+		<get uri="/clds/model/image/{modelName}" produces="text/xml">
+			<to
+				uri="bean:org.onap.clamp.clds.service.CldsService?method=getImageXml(${header.modelName})" />
+		</get>
+		<get uri="/clds/model/{modelName}"
+			outType="org.onap.clamp.clds.model.CldsModel"
+			produces="application/json">
+			<to
+				uri="bean:org.onap.clamp.clds.service.CldsService?method=getModel(${header.modelName})" />
+		</get>
+		<put uri="/clds/model/{modelName}"
+			type="org.onap.clamp.clds.model.CldsModel"
+			consumes="application/json"
+			outType="org.onap.clamp.clds.model.CldsModel"
+			produces="application/json">
+			<to
+				uri="bean:org.onap.clamp.clds.service.CldsService?method=putModel(${header.modelName},${body})" />
+		</put>
+		<get uri="/clds/model-names"
+			outType="org.onap.clamp.clds.model.ValueItem"
+			produces="application/json">
+			<to
+				uri="bean:org.onap.clamp.clds.service.CldsService?method=getModelNames()" />
+		</get>
+		<put uri="/clds/action/{action}/{modelName}?test={test}"
+			type="org.onap.clamp.clds.model.CldsModel"
+			consumes="application/json" produces="application/json">
+			<to
+				uri="bean:org.onap.clamp.clds.service.CldsService?method=putModelAndProcessAction(${header.action},${header.modelName},${header.test},${body})" />
+		</put>
+		<post uri="/clds/dcae/event?test={test}"
+			type="org.onap.clamp.clds.model.DcaeEvent"
+			consumes="application/json" produces="application/json">
+			<to
+				uri="bean:org.onap.clamp.clds.service.CldsService?method=postDcaeEvent(${header.test},${body})" />
+		</post>
+		<get uri="/clds/sdc/services" produces="application/json">
+			<to
+				uri="bean:org.onap.clamp.clds.service.CldsService?method=getSdcServices()" />
+		</get>
+		<get uri="/clds/properties" produces="application/json">
+			<to
+				uri="bean:org.onap.clamp.clds.service.CldsService?method=getSdcProperties()" />
+		</get>
+		<get
+			uri="/clds/properties/{serviceInvariantUUID}?refresh={refresh}"
+			produces="application/json">
+			<to
+				uri="bean:org.onap.clamp.clds.service.CldsService?method=getSdcPropertiesByServiceUUIDForRefresh(${header.serviceInvariantUUID},${header.refresh})" />
+		</get>
+		<put uri="/clds/deploy/{modelName}"
+			type="org.onap.clamp.clds.model.CldsModel"
+			consumes="application/json" produces="application/json">
+			<to
+				uri="bean:org.onap.clamp.clds.service.CldsService?method=deployModel(${header.modelName},${body})" />
+		</put>
+		<put uri="/clds/undeploy/{modelName}"
+			type="org.onap.clamp.clds.model.CldsModel"
+			consumes="application/json" produces="application/json">
+			<to
+				uri="bean:org.onap.clamp.clds.service.CldsService?method=unDeployModel(${header.modelName},${body})" />
+		</put>
+
+
+
+
+		<get uri="/cldsTempate/template/bpmn/{templateName}"
+			produces="text/xml">
+			<to
+				uri="bean:org.onap.clamp.clds.service.CldsTemplateService?method=getBpmnTemplate(${header.templateName})" />
+		</get>
+		<get uri="/cldsTempate/template/image/{templateName}"
+			produces="text/xml">
+			<to
+				uri="bean:org.onap.clamp.clds.service.CldsTemplateService?method=getImageXml(${header.templateName})" />
+		</get>
+		<get uri="/cldsTempate/template/{templateName}"
+			outType="org.onap.clamp.clds.model.CldsTemplate"
+			produces="application/json">
+			<to
+				uri="bean:org.onap.clamp.clds.service.CldsTemplateService?method=getTemplate(${header.templateName})" />
+		</get>
+		<put uri="/cldsTempate/template/{templateName}"
+			type="org.onap.clamp.clds.model.CldsTemplate"
+			consumes="application/json"
+			outType="org.onap.clamp.clds.model.CldsTemplate"
+			produces="application/json">
+			<to
+				uri="bean:org.onap.clamp.clds.service.CldsTemplateService?method=putTemplate(${header.templateName},${body})" />
+		</put>
+		<get uri="/cldsTempate/template-names"
+			outType="org.onap.clamp.clds.model.ValueItem"
+			produces="application/json">
+			<to
+				uri="bean:org.onap.clamp.clds.service.CldsTemplateService?method=getTemplateNames()" />
+		</get>
+
+
+		<put uri="/tosca/models/{toscaModelName}"
+			type="org.onap.clamp.clds.model.CldsToscaModel"
+			consumes="application/json" produces="application/json">
+			<to
+				uri="bean:org.onap.clamp.clds.service.CldsToscaService?method=parseToscaModelAndSave(${header.toscaModelName},${body})" />
+		</put>
+		<get uri="/tosca/models/policyType/{policyType}"
+			produces="application/json">
+			<to
+				uri="bean:org.onap.clamp.clds.service.CldsToscaService?method=getToscaModelsByPolicyType(${header.policyType})" />
+		</get>
+		<get uri="/tosca/models"
+			outType="org.onap.clamp.clds.model.CldsToscaModel"
+			produces="application/json">
+			<to
+				uri="bean:org.onap.clamp.clds.service.CldsToscaService?method=getAllToscaModels()" />
+		</get>
+		<get uri="/tosca/models/{toscaModelName}"
+			outType="org.onap.clamp.clds.model.CldsToscaModel"
+			produces="application/json">
+			<to
+				uri="bean:org.onap.clamp.clds.service.CldsToscaService?method=getToscaModel(${header.toscaModelName})" />
+		</get>
+
+
+		<put uri="/dictionary/{dictionaryName}"
+			type="org.onap.clamp.clds.model.CldsDictionary"
+			outType="org.onap.clamp.clds.model.CldsDictionary"
+			consumes="application/json" produces="application/json">
+			<to
+				uri="bean:org.onap.clamp.clds.service.CldsDictionaryService?method=createOrUpdateDictionary(${header.dictionaryName},${body})" />
+		</put>
+
+		<get uri="/dictionary"
+			outType="org.onap.clamp.clds.model.CldsDictionary"
+			produces="application/json">
+			<to
+				uri="bean:org.onap.clamp.clds.service.CldsDictionaryService?method=getAllDictionaryNames()" />
+		</get>
+
+		<put uri="/dictionary/{dictionaryName}/items"
+			type="org.onap.clamp.clds.model.CldsDictionaryItem"
+			outType="org.onap.clamp.clds.model.CldsDictionaryItem"
+			consumes="application/json" produces="application/json">
+			<to
+				uri="bean:org.onap.clamp.clds.service.CldsDictionaryService?method=createOrUpdateDictionaryElements(${header.dictionaryName},${body})" />
+		</put>
+
+		<get uri="/dictionary/{dictionaryName}/items"
+			outType="org.onap.clamp.clds.model.CldsDictionary"
+			produces="application/json">
+			<to
+				uri="bean:org.onap.clamp.clds.service.CldsDictionaryService?method=getDictionaryElementsByName(${header.dictionaryName})" />
+		</get>
+
+		<get uri="/user/getUser" produces="text/plain">
+			<to
+				uri="bean:org.onap.clamp.clds.service.UserService?method=getUser()" />
+		</get>
+	</rest>
 </rests>
diff --git a/src/main/resources/clds/clds-users.json b/src/main/resources/clds/clds-users.json
index 18ab7d3..b4d73a2 100644
--- a/src/main/resources/clds/clds-users.json
+++ b/src/main/resources/clds/clds-users.json
@@ -8,7 +8,9 @@
 	               "org.onap.clamp.clds.cl.manage|dev|*",
 	               "org.onap.clamp.clds.filter.vf|dev|*",
 	               "org.onap.clamp.clds.template|dev|read",
-	               "org.onap.clamp.clds.template|dev|update"
+	               "org.onap.clamp.clds.template|dev|update",
+	               "org.onap.clamp.clds.tosca|dev|read",
+	               "org.onap.clamp.clds.tosca|dev|update"
 	            ]
 	},
 	{
@@ -21,7 +23,9 @@
 	               "org.onap.clamp.clds.cl.manage|dev|*",
 	               "org.onap.clamp.clds.filter.vf|dev|*",
 	               "org.onap.clamp.clds.template|dev|read",
-	               "org.onap.clamp.clds.template|dev|update"
+	               "org.onap.clamp.clds.template|dev|update",
+	               "org.onap.clamp.clds.tosca|dev|read",
+	               "org.onap.clamp.clds.tosca|dev|update"
 	            ]
 	}
 ]