diff options
Diffstat (limited to 'catalog-fe')
-rw-r--r-- | catalog-fe/pom.xml | 2 | ||||
-rw-r--r-- | catalog-fe/src/main/java/org/openecomp/sdc/fe/servlets/PortalServlet.java | 24 | ||||
-rw-r--r-- | catalog-fe/src/main/resources/config/logback.xml | 4 | ||||
-rw-r--r-- | catalog-fe/src/test/resources/CI/originalResources/images/network.png | bin | 159707 -> 4214 bytes |
4 files changed, 23 insertions, 7 deletions
diff --git a/catalog-fe/pom.xml b/catalog-fe/pom.xml index a3acabb41f..e5d4bdaf83 100644 --- a/catalog-fe/pom.xml +++ b/catalog-fe/pom.xml @@ -246,7 +246,7 @@ <!-- Inserted for ECOMP Portal Integration --> <dependency> <groupId>org.openecomp.ecompsdkos</groupId> - <artifactId>ecompFW</artifactId> + <artifactId>epsdk-fw</artifactId> <version>${ecomp.version}</version> <scope>compile</scope> <exclusions> diff --git a/catalog-fe/src/main/java/org/openecomp/sdc/fe/servlets/PortalServlet.java b/catalog-fe/src/main/java/org/openecomp/sdc/fe/servlets/PortalServlet.java index 4eba2e5eb5..a743f98b18 100644 --- a/catalog-fe/src/main/java/org/openecomp/sdc/fe/servlets/PortalServlet.java +++ b/catalog-fe/src/main/java/org/openecomp/sdc/fe/servlets/PortalServlet.java @@ -34,7 +34,9 @@ import javax.ws.rs.GET; import javax.ws.rs.Path; import javax.ws.rs.core.Context; -import org.openecomp.portalsdk.core.onboarding.crossapi.ECOMPSSO; +import org.openecomp.portalsdk.core.onboarding.util.CipherUtil; +import org.openecomp.portalsdk.core.onboarding.util.PortalApiConstants; +import org.openecomp.portalsdk.core.onboarding.util.PortalApiProperties; import org.openecomp.sdc.common.config.EcompErrorName; import org.openecomp.sdc.common.impl.MutableHttpServletRequest; import org.openecomp.sdc.fe.Constants; @@ -95,9 +97,8 @@ public class PortalServlet extends HttpServlet { if (null == userId) { // Authentication via ecomp portal try { - String valdiateECOMPSSO = ECOMPSSO.valdiateECOMPSSO(request); - String userIdFromCookie = ECOMPSSO.getUserIdFromCookie(request); - if (valdiateECOMPSSO == null || ("").equals(userIdFromCookie)) { + String userIdFromCookie = getUserIdFromCookie(request); + if (("").equals(userIdFromCookie)) { // This is probably a webseal request, so missing header in request should be printed. response.sendError(HttpServletResponse.SC_USE_PROXY, MISSING_HEADERS_MSG); } @@ -275,5 +276,20 @@ public class PortalServlet extends HttpServlet { } return newHeaderIsSet; } + + private static String getUserIdFromCookie(HttpServletRequest request) throws Exception { + String userId = ""; + Cookie[] cookies = request.getCookies(); + Cookie userIdcookie = null; + if (cookies != null) + for (Cookie cookie : cookies) + if (cookie.getName().equals(Constants.USER_ID)) + userIdcookie = cookie; + if (userIdcookie != null) { + userId = CipherUtil.decrypt(userIdcookie.getValue(), + PortalApiProperties.getProperty(PortalApiConstants.Decryption_Key)); + } + return userId; + } } diff --git a/catalog-fe/src/main/resources/config/logback.xml b/catalog-fe/src/main/resources/config/logback.xml index fd2e13ca43..d1e1c613d1 100644 --- a/catalog-fe/src/main/resources/config/logback.xml +++ b/catalog-fe/src/main/resources/config/logback.xml @@ -1,8 +1,8 @@ <?xml version="1.0" encoding="UTF-8"?> <configuration scan="true" scanPeriod="5 seconds"> - <property scope="system" name="ECOMP-component-name" value="ASDC" /> - <property scope="system" name="ECOMP-subcomponent-name" value="ASDC-FE" /> + <property scope="system" name="ECOMP-component-name" value="SDC" /> + <property scope="system" name="ECOMP-subcomponent-name" value="SDC-FE" /> <property scope="context" name="enable-all-log" value="false" /> <property file="${config.home}/catalog-fe/configuration.yaml" /> <!-- value used by pattern field list (| - is inter-field separator, || - unavailable or not applicable field value) (m - mandatory, o- optional)--> diff --git a/catalog-fe/src/test/resources/CI/originalResources/images/network.png b/catalog-fe/src/test/resources/CI/originalResources/images/network.png Binary files differindex c8bf18f31a..c98eef324e 100644 --- a/catalog-fe/src/test/resources/CI/originalResources/images/network.png +++ b/catalog-fe/src/test/resources/CI/originalResources/images/network.png |