aboutsummaryrefslogtreecommitdiffstats
path: root/catalog-fe/src/main
diff options
context:
space:
mode:
authorMichael Lando <ml636r@att.com>2017-06-09 03:19:04 +0300
committerMichael Lando <ml636r@att.com>2017-06-09 03:19:04 +0300
commited64b5edff15e702493df21aa3230b81593e6133 (patch)
treea4cb01fdaccc34930a8db403a3097c0d1e40914b /catalog-fe/src/main
parent280f8015d06af1f41a3ef12e8300801c7a5e0d54 (diff)
[SDC-29] catalog 1707 rebase commit.
Change-Id: I43c3dc5cf44abf5da817649bc738938a3e8388c1 Signed-off-by: Michael Lando <ml636r@att.com>
Diffstat (limited to 'catalog-fe/src/main')
-rw-r--r--catalog-fe/src/main/java/org/openecomp/sdc/fe/Constants.java20
-rw-r--r--catalog-fe/src/main/java/org/openecomp/sdc/fe/client/BackendClient.java4
-rw-r--r--catalog-fe/src/main/java/org/openecomp/sdc/fe/servlets/ConfigMgrServlet.java8
-rw-r--r--catalog-fe/src/main/java/org/openecomp/sdc/fe/servlets/ConfigServlet.java4
-rw-r--r--catalog-fe/src/main/java/org/openecomp/sdc/fe/servlets/FeHealthCheckServlet.java4
-rw-r--r--catalog-fe/src/main/java/org/openecomp/sdc/fe/servlets/FeProxyServlet.java3
-rw-r--r--catalog-fe/src/main/java/org/openecomp/sdc/fe/servlets/HealthCheckService.java2
-rw-r--r--catalog-fe/src/main/resources/config/configuration.yaml12
-rw-r--r--catalog-fe/src/main/resources/portal.properties7
-rw-r--r--catalog-fe/src/main/webapp/WEB-INF/web.xml169
10 files changed, 41 insertions, 192 deletions
diff --git a/catalog-fe/src/main/java/org/openecomp/sdc/fe/Constants.java b/catalog-fe/src/main/java/org/openecomp/sdc/fe/Constants.java
index e157efcda9..a9f5c1294e 100644
--- a/catalog-fe/src/main/java/org/openecomp/sdc/fe/Constants.java
+++ b/catalog-fe/src/main/java/org/openecomp/sdc/fe/Constants.java
@@ -1,3 +1,23 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * SDC
+ * ================================================================================
+ * 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=========================================================
+ */
+
package org.openecomp.sdc.fe;
public class Constants {
diff --git a/catalog-fe/src/main/java/org/openecomp/sdc/fe/client/BackendClient.java b/catalog-fe/src/main/java/org/openecomp/sdc/fe/client/BackendClient.java
index 93e17144c0..92e497d278 100644
--- a/catalog-fe/src/main/java/org/openecomp/sdc/fe/client/BackendClient.java
+++ b/catalog-fe/src/main/java/org/openecomp/sdc/fe/client/BackendClient.java
@@ -151,7 +151,7 @@ public class BackendClient {
}
backendHttpClient.close();
} catch (IOException e) {
- log.error("failed to close httpClient: " + e.getMessage());
+ log.error("failed to close httpClient: {}", e.getMessage());
}
}
@@ -168,7 +168,7 @@ public class BackendClient {
if (headerValue != null) {
httpPost.setHeader(headerName, headerValue);
} else {
- log.error("missing required header " + headerName);
+ log.error("missing required header {}", headerName);
return allHeadersAreSet;
}
}
diff --git a/catalog-fe/src/main/java/org/openecomp/sdc/fe/servlets/ConfigMgrServlet.java b/catalog-fe/src/main/java/org/openecomp/sdc/fe/servlets/ConfigMgrServlet.java
index 7792225742..356f9261c6 100644
--- a/catalog-fe/src/main/java/org/openecomp/sdc/fe/servlets/ConfigMgrServlet.java
+++ b/catalog-fe/src/main/java/org/openecomp/sdc/fe/servlets/ConfigMgrServlet.java
@@ -61,9 +61,9 @@ public class ConfigMgrServlet extends BasicServlet {
Configuration configuration = configurationManager.getConfiguration();
if (configuration == null) {
- log.warn("Configuration of type " + Configuration.class + " was not found");
+ log.warn("Configuration of type {} was not found", Configuration.class);
} else {
- log.info("The value returned from getConfig is " + configuration);
+ log.info("The value returned from getConfig is {}", configuration);
result = gson.toJson(configuration);
@@ -72,9 +72,9 @@ public class ConfigMgrServlet extends BasicServlet {
RestConfigurationInfo configuration = configurationManager.getRestClientConfiguration();
if (configuration == null) {
- log.warn("Configuration of type " + RestConfigurationInfo.class + " was not found");
+ log.warn("Configuration of type {} was not found", RestConfigurationInfo.class);
} else {
- log.info("The value returned from getConfig is " + configuration);
+ log.info("The value returned from getConfig is {}", configuration);
result = gson.toJson(configuration);
diff --git a/catalog-fe/src/main/java/org/openecomp/sdc/fe/servlets/ConfigServlet.java b/catalog-fe/src/main/java/org/openecomp/sdc/fe/servlets/ConfigServlet.java
index 92bb9e8743..b8d623b72e 100644
--- a/catalog-fe/src/main/java/org/openecomp/sdc/fe/servlets/ConfigServlet.java
+++ b/catalog-fe/src/main/java/org/openecomp/sdc/fe/servlets/ConfigServlet.java
@@ -64,13 +64,13 @@ public class ConfigServlet extends BasicServlet {
Configuration configuration = configurationSource.getAndWatchConfiguration(Configuration.class, null);
if (configuration == null) {
- log.warn("Configuration of type " + Configuration.class + " was not found");
+ log.warn("Configuration of type {} was not found", Configuration.class);
}
log.debug("{}", configuration);
if (log.isInfoEnabled()) {
log.info("Info level ENABLED...");
}
- log.info("The value returned from getConfig is " + configuration);
+ log.info("The value returned from getConfig is {}", configuration);
result = gson.toJson(configuration);
diff --git a/catalog-fe/src/main/java/org/openecomp/sdc/fe/servlets/FeHealthCheckServlet.java b/catalog-fe/src/main/java/org/openecomp/sdc/fe/servlets/FeHealthCheckServlet.java
index da5b321339..1ed6ac5c07 100644
--- a/catalog-fe/src/main/java/org/openecomp/sdc/fe/servlets/FeHealthCheckServlet.java
+++ b/catalog-fe/src/main/java/org/openecomp/sdc/fe/servlets/FeHealthCheckServlet.java
@@ -35,10 +35,6 @@ import com.jcabi.aspects.Loggable;
@Loggable(prepend = true, value = Loggable.TRACE, trim = false)
@Path("/healthCheck")
public class FeHealthCheckServlet extends BasicServlet {
-
- // private static Logger log =
- // LoggerFactory.getLogger(FeHealthCheckServlet.class.getName());
-
@GET
public Response getFEandBeHealthCheck(@Context final HttpServletRequest request) {
ServletContext context = request.getSession().getServletContext();
diff --git a/catalog-fe/src/main/java/org/openecomp/sdc/fe/servlets/FeProxyServlet.java b/catalog-fe/src/main/java/org/openecomp/sdc/fe/servlets/FeProxyServlet.java
index 1cd28deb7a..11d4abf4af 100644
--- a/catalog-fe/src/main/java/org/openecomp/sdc/fe/servlets/FeProxyServlet.java
+++ b/catalog-fe/src/main/java/org/openecomp/sdc/fe/servlets/FeProxyServlet.java
@@ -85,7 +85,7 @@ public class FeProxyServlet extends SSLProxyServlet {
String serviceInstanceID = httpRequest.getHeader(Constants.X_ECOMP_SERVICE_ID_HEADER);
if (uuid != null && uuid.length() > 0) {
- // User Id for logging
+ // UserId for logging
String userId = httpRequest.getHeader(Constants.USER_ID_HEADER);
String remoteAddr = httpRequest.getRemoteAddr();
@@ -201,6 +201,7 @@ public class FeProxyServlet extends SSLProxyServlet {
if (onboardingForwardContext == null || onboardingForwardContext.isEmpty()) {
onboardingForwardContext = "/onboarding-api";
}
+ redirectedUrl = redirectedUrl.replace("/sdc1/feProxy/dcae-api", "/dcae");
redirectedUrl = redirectedUrl.replace("/sdc1/feProxy/onboarding-api", onboardingForwardContext);
redirectedUrl = redirectedUrl.replace("/sdc1/feProxy", "/sdc2");
return redirectedUrl;
diff --git a/catalog-fe/src/main/java/org/openecomp/sdc/fe/servlets/HealthCheckService.java b/catalog-fe/src/main/java/org/openecomp/sdc/fe/servlets/HealthCheckService.java
index 338e8d4c01..b7fce8d912 100644
--- a/catalog-fe/src/main/java/org/openecomp/sdc/fe/servlets/HealthCheckService.java
+++ b/catalog-fe/src/main/java/org/openecomp/sdc/fe/servlets/HealthCheckService.java
@@ -40,9 +40,9 @@ import org.apache.http.impl.client.HttpClientBuilder;
import org.apache.http.util.EntityUtils;
import org.openecomp.sdc.common.api.Constants;
import org.openecomp.sdc.common.api.HealthCheckInfo;
+import org.openecomp.sdc.common.api.HealthCheckWrapper;
import org.openecomp.sdc.common.api.HealthCheckInfo.HealthCheckComponent;
import org.openecomp.sdc.common.api.HealthCheckInfo.HealthCheckStatus;
-import org.openecomp.sdc.common.api.HealthCheckWrapper;
import org.openecomp.sdc.common.config.EcompErrorName;
import org.openecomp.sdc.common.impl.ExternalConfiguration;
import org.openecomp.sdc.fe.config.Configuration;
diff --git a/catalog-fe/src/main/resources/config/configuration.yaml b/catalog-fe/src/main/resources/config/configuration.yaml
index 6be93b330d..cd123ca220 100644
--- a/catalog-fe/src/main/resources/config/configuration.yaml
+++ b/catalog-fe/src/main/resources/config/configuration.yaml
@@ -17,30 +17,30 @@ beProtocol: http
beSslPort: 8443
# threadpool size for handling requests
-threadpoolSize: 50
+threadpoolSize: 50
# request processing timeout (seconds)
requestTimeout: 10
+# Determines the health check read timeout when invoking health check towards the LB (or BE whatever is configured):
healthCheckSocketTimeoutInMs: 5000
-
healthCheckIntervalInSeconds: 5
-identificationHeaderFields:
+identificationHeaderFields:
-
- &HTTP_IV_USER HTTP_IV_USER
- &iv-user iv-user
-
- &USER_ID USER_ID
- - &user-id user-id
+ - &csp-userId csp-userId
-
- &HTTP_CSP_ATTUID HTTP_CSP_ATTUID
- &csp-attuid csp-attuid
-
- - &HTTP_CSP_WSTYPE HTTP_CSP_WSTYPE
+ - &HTTP_CSP_WSTYPE HTTP_CSP_WSTYPE
- &csp-wstype csp-wstype
-optionalHeaderFields:
+optionalHeaderFields:
-
- &HTTP_CSP_FIRSTNAME HTTP_CSP_FIRSTNAME
- &csp-firstname csp-firstname
diff --git a/catalog-fe/src/main/resources/portal.properties b/catalog-fe/src/main/resources/portal.properties
index 880c4fe9e9..a146d6ef0c 100644
--- a/catalog-fe/src/main/resources/portal.properties
+++ b/catalog-fe/src/main/resources/portal.properties
@@ -1,11 +1,12 @@
# Portal REST URL, ends "/auxapi"
-ecomp_rest_url = https://portal.api.simpledemo.openecomp.org/ecompportal/auxapi
+ecomp_rest_url = https://ecomp.homer.att.com/ecompportal/auxapi
# Java implementation of interface
portal.api.impl.class = org.openecomp.sdc.be.ecomp.EcompIntImpl
# CSP-SSO URL
-ecomp_redirect_url = http://portal.api.simpledemo.openecomp.org:8989/ECOMPPORTAL/login.htm
+# ecomp_redirect_url = https://www.e-access.att.com/ecomp_portal_ist/ecompportal/process_csp
+ecomp_redirect_url = http://127.0.0.1:8989/ECOMPPORTAL/login.htm
# Cookie set by CSP-SSO
csp_cookie_name = attESSec
@@ -13,7 +14,7 @@ csp_cookie_name = attESSec
csp_gate_keeper_prod_key = PROD
# Comma-separated list of UEB server names
-ueb_url_list =
+ueb_url_list = localhost
# UEB topic where Portal listens
ecomp_portal_inbox_name = ECOMP-PORTAL-INBOX-TEST
# UEB key generated while on-boarding
diff --git a/catalog-fe/src/main/webapp/WEB-INF/web.xml b/catalog-fe/src/main/webapp/WEB-INF/web.xml
index f6d709ef58..c2127dcdca 100644
--- a/catalog-fe/src/main/webapp/WEB-INF/web.xml
+++ b/catalog-fe/src/main/webapp/WEB-INF/web.xml
@@ -39,146 +39,6 @@
<url-pattern>/lbClassicStatus</url-pattern>
</servlet-mapping>
- <!-- Proxy Server Only used for tests to simulate webSeal ## Start ## -->
-<!-- <servlet>
- <servlet-name>ProxyAdmin1</servlet-name>
- <servlet-class>org.openecomp.sdc.fe.servlets.websealmock.WebSealSimulatorServletAdmin1</servlet-class>
- <async-supported>true</async-supported>
- </servlet>
-
- <servlet-mapping>
- <servlet-name>ProxyAdmin1</servlet-name>
- <url-pattern>/proxy-admin1</url-pattern>
- </servlet-mapping>
- <servlet>
- <servlet-name>ProxyAdmin2</servlet-name>
- <servlet-class>org.openecomp.sdc.fe.servlets.websealmock.WebSealSimulatorServletAdmin2</servlet-class>
- <async-supported>true</async-supported>
- </servlet>
-
- <servlet-mapping>
- <servlet-name>ProxyAdmin2</servlet-name>
- <url-pattern>/proxy-admin2</url-pattern>
- </servlet-mapping>
- <servlet>
- <servlet-name>ProxyAdmin3</servlet-name>
- <servlet-class>org.openecomp.sdc.fe.servlets.websealmock.WebSealSimulatorServletAdmin3</servlet-class>
- <async-supported>true</async-supported>
- </servlet>
-
- <servlet-mapping>
- <servlet-name>ProxyAdmin3</servlet-name>
- <url-pattern>/proxy-admin3</url-pattern>
- </servlet-mapping>
-
- <servlet>
- <servlet-name>ProxyDesigner1</servlet-name>
- <servlet-class>org.openecomp.sdc.fe.servlets.websealmock.WebSealSimulatorServletDesigner1</servlet-class>
- <async-supported>true</async-supported>
- </servlet>
-
- <servlet-mapping>
- <servlet-name>ProxyDesigner1</servlet-name>
- <url-pattern>/proxy-designer1</url-pattern>
- </servlet-mapping>
- <servlet>
- <servlet-name>ProxyDesigner2</servlet-name>
- <servlet-class>org.openecomp.sdc.fe.servlets.websealmock.WebSealSimulatorServletDesigner2</servlet-class>
- <async-supported>true</async-supported>
- </servlet>
-
- <servlet-mapping>
- <servlet-name>ProxyDesigner2</servlet-name>
- <url-pattern>/proxy-designer2</url-pattern>
- </servlet-mapping>
- <servlet>
- <servlet-name>ProxyDesigner3</servlet-name>
- <servlet-class>org.openecomp.sdc.fe.servlets.websealmock.WebSealSimulatorServletDesigner3</servlet-class>
- <async-supported>true</async-supported>
- </servlet>
-
- <servlet-mapping>
- <servlet-name>ProxyDesigner3</servlet-name>
- <url-pattern>/proxy-designer3</url-pattern>
- </servlet-mapping>
-
- <servlet>
- <servlet-name>ProxyTester1</servlet-name>
- <servlet-class>org.openecomp.sdc.fe.servlets.websealmock.WebSealSimulatorServletTester1</servlet-class>
- <async-supported>true</async-supported>
- </servlet>
-
- <servlet-mapping>
- <servlet-name>ProxyTester1</servlet-name>
- <url-pattern>/proxy-tester1</url-pattern>
- </servlet-mapping>
- <servlet>
- <servlet-name>ProxyTester2</servlet-name>
- <servlet-class>org.openecomp.sdc.fe.servlets.websealmock.WebSealSimulatorServletTester2</servlet-class>
- <async-supported>true</async-supported>
- </servlet>
-
- <servlet-mapping>
- <servlet-name>ProxyTester2</servlet-name>
- <url-pattern>/proxy-tester2</url-pattern>
- </servlet-mapping>
-
- <servlet>
- <servlet-name>ProxyTester3</servlet-name>
- <servlet-class>org.openecomp.sdc.fe.servlets.websealmock.WebSealSimulatorServletTester3</servlet-class>
- <async-supported>true</async-supported>
- </servlet>
-
- <servlet-mapping>
- <servlet-name>ProxyTester3</servlet-name>
- <url-pattern>/proxy-tester3</url-pattern>
- </servlet-mapping>
-
- <servlet-mapping>
- <servlet-name>ProxyGovernor1</servlet-name>
- <url-pattern>/proxy-governor1</url-pattern>
- </servlet-mapping>
-
- <servlet>
- <servlet-name>ProxyGovernor1</servlet-name>
- <servlet-class>org.openecomp.sdc.fe.servlets.websealmock.WebSealSimulatorServletGovernor1</servlet-class>
- <async-supported>true</async-supported>
- </servlet>
-
- <servlet-mapping>
- <servlet-name>ProxyOps1</servlet-name>
- <url-pattern>/proxy-ops1</url-pattern>
- </servlet-mapping>
-
- <servlet>
- <servlet-name>ProxyOps1</servlet-name>
- <servlet-class>org.openecomp.sdc.fe.servlets.websealmock.WebSealSimulatorServletOps1</servlet-class>
- <async-supported>true</async-supported>
- </servlet>
-
- <servlet-mapping>
- <servlet-name>ProxyPs1</servlet-name>
- <url-pattern>/proxy-ps1</url-pattern>
- </servlet-mapping>
-
- <servlet>
- <servlet-name>ProxyPs1</servlet-name>
- <servlet-class>org.openecomp.sdc.fe.servlets.websealmock.WebSealSimulatorServletProductStrategist1</servlet-class>
- <async-supported>true</async-supported>
- </servlet>
- <servlet-mapping>
- <servlet-name>ProxyPm1</servlet-name>
- <url-pattern>/proxy-pm1</url-pattern>
- </servlet-mapping>
-
- <servlet>
- <servlet-name>ProxyPm1</servlet-name>
- <servlet-class>org.openecomp.sdc.fe.servlets.websealmock.WebSealSimulatorServletProductManger1</servlet-class>
- <async-supported>true</async-supported>
- </servlet> -->
-
- <!-- Proxy Server Only used for tests to simulate webSeal ## End ## -->
-
<!-- Fe Proxy Servlet -->
<servlet>
<servlet-name>FeProxy</servlet-name>
@@ -219,35 +79,6 @@
<url-pattern>/kibanaProxy/*</url-pattern>
</servlet-mapping>
-
-
- <filter>
- <filter-name>cross-origin-att</filter-name>
- <filter-class>org.eclipse.jetty.servlets.CrossOriginFilter</filter-class>
- <async-supported>true</async-supported>
- <init-param>
- <param-name>allowedOrigins</param-name>
- <param-value>*</param-value>
- </init-param>
- <init-param>
- <param-name>allowedMethods</param-name>
- <param-value>GET,POST,OPTIONS,DELETE,PUT,HEAD</param-value>
- </init-param>
- <init-param>
- <param-name>allowedHeaders</param-name>
- <param-value>HTTP_CSP_FIRSTNAME, HTTP_CSP_LASTNAME, USER_ID,
- HTTP_CSP_EMAIL, X-ECOMP-RequestID, origin, content-type, accept, authorization, Content-MD5,X-ECOMP-ServiceID</param-value>
- </init-param>
- <init-param>
- <param-name>allowCredential</param-name>
- <param-value>true</param-value>
- </init-param>
- </filter>
- <filter-mapping>
- <filter-name>cross-origin-att</filter-name>
- <url-pattern>/*</url-pattern>
- </filter-mapping>
-
<!--
<filter>
<filter-name>GzipFilter</filter-name>