From 7f535078ef80a7b7efa3e3325bfccb994fbd00e8 Mon Sep 17 00:00:00 2001 From: "Christopher Lott (cl778h)" Date: Thu, 31 Aug 2017 15:16:38 -0400 Subject: Rename packages to org.onap in 1.4.0-SNAPSHOT 19 - remove openecomp 72 - remediate Sonar scan issues 79 - removed unwanted left menu under Report 90 - apply approved license text Issue: PORTAL-19, PORTAL-72, PORTAL-79, PORTAL-90 Change-Id: I41a0ef5fba623d2242574bd15f2d9fb8029a496c Signed-off-by: Christopher Lott (cl778h) --- .../org/onap/portalapp/conf/ExternalAppConfig.java | 179 +++++++++++++++++++++ .../portalapp/conf/ExternalAppInitializer.java | 65 ++++++++ .../portalapp/conf/HibernateMappingLocations.java | 62 +++++++ .../portalapp/lm/FusionLicenseManagerImpl.java | 106 ++++++++++++ .../onap/portalapp/lm/LicenseableClassImpl.java | 80 +++++++++ .../onap/portalapp/login/LoginStrategyImpl.java | 129 +++++++++++++++ .../org/onap/portalapp/scheduler/Register.java | 90 +++++++++++ .../onap/portalapp/scheduler/RegistryAdapter.java | 110 +++++++++++++ .../onap/portalapp/service/AdminAuthExtension.java | 71 ++++++++ .../portalapp/conf/ExternalAppConfig.java | 161 ------------------ .../portalapp/conf/ExternalAppInitializer.java | 47 ------ .../portalapp/conf/HibernateMappingLocations.java | 57 ------- .../portalapp/lm/FusionLicenseManagerImpl.java | 88 ---------- .../portalapp/lm/LicenseableClassImpl.java | 62 ------- .../portalapp/login/LoginStrategyImpl.java | 111 ------------- .../openecomp/portalapp/scheduler/Register.java | 71 -------- .../portalapp/scheduler/RegistryAdapter.java | 92 ----------- .../portalapp/service/AdminAuthExtension.java | 64 -------- .../epsdk-app-os/src/main/resources/logback.xml | 44 +++-- .../src/main/resources/portal.properties | 42 +++-- .../webapp/WEB-INF/fusion/jsp/ds2/left-menu.jsp | 48 ++++-- .../fusion/orm/RNoteBookIntegration.hbm.xml | 42 +++-- .../epsdk-app-os/src/main/webapp/WEB-INF/index.jsp | 40 +++-- .../src/main/webapp/WEB-INF/jsp/login.jsp | 42 +++-- .../src/main/webapp/WEB-INF/jsp/login_external.jsp | 42 +++-- .../ds2-profile/profile_searchDS2.html | 4 +- .../DS2-view-models/ds2-profile/self_profile.html | 39 ++--- 27 files changed, 1127 insertions(+), 861 deletions(-) create mode 100644 ecomp-sdk/epsdk-app-os/src/main/java/org/onap/portalapp/conf/ExternalAppConfig.java create mode 100644 ecomp-sdk/epsdk-app-os/src/main/java/org/onap/portalapp/conf/ExternalAppInitializer.java create mode 100644 ecomp-sdk/epsdk-app-os/src/main/java/org/onap/portalapp/conf/HibernateMappingLocations.java create mode 100644 ecomp-sdk/epsdk-app-os/src/main/java/org/onap/portalapp/lm/FusionLicenseManagerImpl.java create mode 100644 ecomp-sdk/epsdk-app-os/src/main/java/org/onap/portalapp/lm/LicenseableClassImpl.java create mode 100644 ecomp-sdk/epsdk-app-os/src/main/java/org/onap/portalapp/login/LoginStrategyImpl.java create mode 100644 ecomp-sdk/epsdk-app-os/src/main/java/org/onap/portalapp/scheduler/Register.java create mode 100644 ecomp-sdk/epsdk-app-os/src/main/java/org/onap/portalapp/scheduler/RegistryAdapter.java create mode 100644 ecomp-sdk/epsdk-app-os/src/main/java/org/onap/portalapp/service/AdminAuthExtension.java delete mode 100644 ecomp-sdk/epsdk-app-os/src/main/java/org/openecomp/portalapp/conf/ExternalAppConfig.java delete mode 100644 ecomp-sdk/epsdk-app-os/src/main/java/org/openecomp/portalapp/conf/ExternalAppInitializer.java delete mode 100644 ecomp-sdk/epsdk-app-os/src/main/java/org/openecomp/portalapp/conf/HibernateMappingLocations.java delete mode 100644 ecomp-sdk/epsdk-app-os/src/main/java/org/openecomp/portalapp/lm/FusionLicenseManagerImpl.java delete mode 100644 ecomp-sdk/epsdk-app-os/src/main/java/org/openecomp/portalapp/lm/LicenseableClassImpl.java delete mode 100644 ecomp-sdk/epsdk-app-os/src/main/java/org/openecomp/portalapp/login/LoginStrategyImpl.java delete mode 100644 ecomp-sdk/epsdk-app-os/src/main/java/org/openecomp/portalapp/scheduler/Register.java delete mode 100644 ecomp-sdk/epsdk-app-os/src/main/java/org/openecomp/portalapp/scheduler/RegistryAdapter.java delete mode 100644 ecomp-sdk/epsdk-app-os/src/main/java/org/openecomp/portalapp/service/AdminAuthExtension.java (limited to 'ecomp-sdk/epsdk-app-os/src/main') diff --git a/ecomp-sdk/epsdk-app-os/src/main/java/org/onap/portalapp/conf/ExternalAppConfig.java b/ecomp-sdk/epsdk-app-os/src/main/java/org/onap/portalapp/conf/ExternalAppConfig.java new file mode 100644 index 00000000..2c46672f --- /dev/null +++ b/ecomp-sdk/epsdk-app-os/src/main/java/org/onap/portalapp/conf/ExternalAppConfig.java @@ -0,0 +1,179 @@ +/* + * ============LICENSE_START========================================== + * ONAP Portal SDK + * =================================================================== + * Copyright © 2017 AT&T Intellectual Property. All rights reserved. + * =================================================================== + * + * Unless otherwise specified, all software contained herein is licensed + * under the Apache License, Version 2.0 (the “License”); + * you may not use this software 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. + * + * Unless otherwise specified, all documentation contained herein is licensed + * under the Creative Commons License, Attribution 4.0 Intl. (the “License”); + * you may not use this documentation except in compliance with the License. + * You may obtain a copy of the License at + * + * https://creativecommons.org/licenses/by/4.0/ + * + * Unless required by applicable law or agreed to in writing, documentation + * 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.portalapp.conf; + +import java.util.ArrayList; +import java.util.List; + +import org.onap.portalapp.login.LoginStrategyImpl; +import org.onap.portalapp.scheduler.RegistryAdapter; +import org.onap.portalsdk.core.auth.LoginStrategy; +import org.onap.portalsdk.core.conf.AppConfig; +import org.onap.portalsdk.core.conf.Configurable; +import org.onap.portalsdk.core.objectcache.AbstractCacheManager; +import org.onap.portalsdk.core.service.DataAccessService; +import org.onap.portalsdk.core.util.CacheManager; +import org.onap.portalsdk.core.util.SystemProperties; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.context.annotation.Bean; +import org.springframework.context.annotation.ComponentScan; +import org.springframework.context.annotation.Configuration; +import org.springframework.context.annotation.Import; +import org.springframework.context.annotation.Profile; +import org.springframework.context.annotation.PropertySource; +import org.springframework.scheduling.annotation.EnableAsync; +import org.springframework.scheduling.annotation.EnableScheduling; +import org.springframework.scheduling.quartz.SchedulerFactoryBean; +import org.springframework.web.servlet.ViewResolver; +import org.springframework.web.servlet.config.annotation.EnableWebMvc; +import org.springframework.web.servlet.config.annotation.InterceptorRegistry; +import org.springframework.web.servlet.config.annotation.ResourceHandlerRegistry; + +/** + * ONAP Portal SDK sample application. Extends core AppConfig class to + * reuse interceptors, view resolvers and other features defined there. + */ +@Configuration +@EnableWebMvc +@ComponentScan(basePackages = "org.onap") +@PropertySource(value = { "${container.classpath:}/WEB-INF/conf/app/test.properties" }, ignoreResourceNotFound = true) +@Profile("src") +@EnableAsync +@EnableScheduling +public class ExternalAppConfig extends AppConfig implements Configurable { + + private RegistryAdapter schedulerRegistryAdapter; + + @Configuration + @Import(SystemProperties.class) + static class InnerConfiguration { + } + + /** + * @see org.onap.portalsdk.core.conf.AppConfig#viewResolver() + */ + public ViewResolver viewResolver() { + return super.viewResolver(); + } + + /** + * @see org.onap.portalsdk.core.conf.AppConfig#addResourceHandlers(ResourceHandlerRegistry) + * + * @param registry + */ + public void addResourceHandlers(ResourceHandlerRegistry registry) { + super.addResourceHandlers(registry); + } + + /** + * @see org.onap.portalsdk.core.conf.AppConfig#dataAccessService() + */ + public DataAccessService dataAccessService() { + // Echo the JDBC URL to assist developers when starting the app. + System.out.println("ExternalAppConfig: " + SystemProperties.DB_CONNECTIONURL + " is " + + SystemProperties.getProperty(SystemProperties.DB_CONNECTIONURL)); + return super.dataAccessService(); + } + + /** + * Creates a new list with a single entry that is the external app + * definitions.xml path. + * + * @return List of String, size 1 + */ + public List addTileDefinitions() { + List definitions = new ArrayList(); + definitions.add("/WEB-INF/defs/definitions.xml"); + return definitions; + } + + /** + * Adds request interceptors to the specified registry by calling + * {@link AppConfig#addInterceptors(InterceptorRegistry)}, but excludes + * certain paths from the session timeout interceptor. + */ + @Override + public void addInterceptors(InterceptorRegistry registry) { + super.setExcludeUrlPathsForSessionTimeout("/login_external", "*/login_external.htm", "login", "/login.htm", + "/api*", "/single_signon.htm", "/single_signon"); + super.addInterceptors(registry); + } + + /** + * Creates and returns a new instance of a {@link CacheManager} class. + * + * @return New instance of {@link CacheManager} + */ + @Bean + public AbstractCacheManager cacheManager() { + return new CacheManager(); + } + + /** + * Creates and returns a new instance of a {@link SchedulerFactoryBean} and + * populates it with triggers. + * + * @return New instance of {@link SchedulerFactoryBean} + * @throws Exception + */ + // @Bean // ANNOTATION COMMENTED OUT + // APPLICATIONS REQUIRING QUARTZ SHOULD RESTORE ANNOTATION + public SchedulerFactoryBean schedulerFactoryBean() throws Exception { + SchedulerFactoryBean scheduler = new SchedulerFactoryBean(); + scheduler.setTriggers(schedulerRegistryAdapter.getTriggers()); + scheduler.setConfigLocation(appApplicationContext.getResource("WEB-INF/conf/quartz.properties")); + scheduler.setDataSource(dataSource()); + return scheduler; + } + + /** + * Sets the scheduler registry adapter. + * + * @param schedulerRegistryAdapter + */ + @Autowired + public void setSchedulerRegistryAdapter(final RegistryAdapter schedulerRegistryAdapter) { + this.schedulerRegistryAdapter = schedulerRegistryAdapter; + } + + @Bean + public LoginStrategy loginStrategy() { + + return new LoginStrategyImpl(); + } +} diff --git a/ecomp-sdk/epsdk-app-os/src/main/java/org/onap/portalapp/conf/ExternalAppInitializer.java b/ecomp-sdk/epsdk-app-os/src/main/java/org/onap/portalapp/conf/ExternalAppInitializer.java new file mode 100644 index 00000000..1665443e --- /dev/null +++ b/ecomp-sdk/epsdk-app-os/src/main/java/org/onap/portalapp/conf/ExternalAppInitializer.java @@ -0,0 +1,65 @@ +/* + * ============LICENSE_START========================================== + * ONAP Portal SDK + * =================================================================== + * Copyright © 2017 AT&T Intellectual Property. All rights reserved. + * =================================================================== + * + * Unless otherwise specified, all software contained herein is licensed + * under the Apache License, Version 2.0 (the “License”); + * you may not use this software 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. + * + * Unless otherwise specified, all documentation contained herein is licensed + * under the Creative Commons License, Attribution 4.0 Intl. (the “License”); + * you may not use this documentation except in compliance with the License. + * You may obtain a copy of the License at + * + * https://creativecommons.org/licenses/by/4.0/ + * + * Unless required by applicable law or agreed to in writing, documentation + * 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.portalapp.conf; + +import org.onap.portalsdk.core.conf.AppInitializer; + +public class ExternalAppInitializer extends AppInitializer { + + @Override + protected Class[] getRootConfigClasses() { + return super.getRootConfigClasses(); + } + + @Override + protected Class[] getServletConfigClasses() { + Class appConfigClass = ExternalAppConfig.class; + // Show something on stdout to indicate the app is starting. + System.out.println("ExternalAppInitializer: servlet configuration class is " + appConfigClass.getName()); + return new Class[] { appConfigClass }; + } + + /* + * URL request will direct to the Spring dispatcher for processing + */ + @Override + protected String[] getServletMappings() { + return super.getServletMappings(); + } + +} diff --git a/ecomp-sdk/epsdk-app-os/src/main/java/org/onap/portalapp/conf/HibernateMappingLocations.java b/ecomp-sdk/epsdk-app-os/src/main/java/org/onap/portalapp/conf/HibernateMappingLocations.java new file mode 100644 index 00000000..d336aa4f --- /dev/null +++ b/ecomp-sdk/epsdk-app-os/src/main/java/org/onap/portalapp/conf/HibernateMappingLocations.java @@ -0,0 +1,62 @@ +/* + * ============LICENSE_START========================================== + * ONAP Portal SDK + * =================================================================== + * Copyright © 2017 AT&T Intellectual Property. All rights reserved. + * =================================================================== + * + * Unless otherwise specified, all software contained herein is licensed + * under the Apache License, Version 2.0 (the “License”); + * you may not use this software 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. + * + * Unless otherwise specified, all documentation contained herein is licensed + * under the Creative Commons License, Attribution 4.0 Intl. (the “License”); + * you may not use this documentation except in compliance with the License. + * You may obtain a copy of the License at + * + * https://creativecommons.org/licenses/by/4.0/ + * + * Unless required by applicable law or agreed to in writing, documentation + * 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.portalapp.conf; + +import org.onap.portalsdk.core.conf.HibernateMappingLocatable; +import org.springframework.context.annotation.Profile; +import org.springframework.core.io.ClassPathResource; +import org.springframework.core.io.Resource; +import org.springframework.stereotype.Component; + +@Component +@Profile("src") +public class HibernateMappingLocations implements HibernateMappingLocatable { + + @Override + public Resource[] getMappingLocations() { + return new Resource[] { new ClassPathResource("../fusion/orm/Fusion.hbm.xml"), + new ClassPathResource("../fusion/orm/Workflow.hbm.xml"), + new ClassPathResource("../fusion/orm/RNoteBookIntegration.hbm.xml") }; + } + + @Override + public String[] getPackagesToScan() { + return new String[] { "org.onap" }; + } + +} diff --git a/ecomp-sdk/epsdk-app-os/src/main/java/org/onap/portalapp/lm/FusionLicenseManagerImpl.java b/ecomp-sdk/epsdk-app-os/src/main/java/org/onap/portalapp/lm/FusionLicenseManagerImpl.java new file mode 100644 index 00000000..31c02a9a --- /dev/null +++ b/ecomp-sdk/epsdk-app-os/src/main/java/org/onap/portalapp/lm/FusionLicenseManagerImpl.java @@ -0,0 +1,106 @@ +/* + * ============LICENSE_START========================================== + * ONAP Portal SDK + * =================================================================== + * Copyright © 2017 AT&T Intellectual Property. All rights reserved. + * =================================================================== + * + * Unless otherwise specified, all software contained herein is licensed + * under the Apache License, Version 2.0 (the “License”); + * you may not use this software 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. + * + * Unless otherwise specified, all documentation contained herein is licensed + * under the Creative Commons License, Attribution 4.0 Intl. (the “License”); + * you may not use this documentation except in compliance with the License. + * You may obtain a copy of the License at + * + * https://creativecommons.org/licenses/by/4.0/ + * + * Unless required by applicable law or agreed to in writing, documentation + * 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.portalapp.lm; + +import java.util.Date; +import java.util.List; +import java.util.Map; + +import javax.servlet.ServletContext; + +import org.onap.portalsdk.core.lm.FusionLicenseManager; +import org.springframework.stereotype.Component; + +/* + * Please note that this class is not being used; its a dummy stub to have a qualifying bean for the interface. + */ + +@Component +public class FusionLicenseManagerImpl implements FusionLicenseManager { + + @Override + public void initKeyStoreParam() { + + } + + @Override + public void initCipherParam() { + + } + + @Override + public void initLicenseParam() { + + } + + @Override + public void doInitWork() { + + } + + @Override + public int installLicense() { + return 0; + } + + @Override + public synchronized int verifyLicense(ServletContext context) { + return 0; + } + + @Override + public void generateLicense(Map clientInfoMap, List ipAddressList) throws Exception { + + } + + @Override + public String nvl(String s) { + return null; + } + + @Override + public Date getExpiredDate() { + return null; + } + + @Override + public void setExpiredDate(Date expiredDate) { + + } + +} diff --git a/ecomp-sdk/epsdk-app-os/src/main/java/org/onap/portalapp/lm/LicenseableClassImpl.java b/ecomp-sdk/epsdk-app-os/src/main/java/org/onap/portalapp/lm/LicenseableClassImpl.java new file mode 100644 index 00000000..08aca3b8 --- /dev/null +++ b/ecomp-sdk/epsdk-app-os/src/main/java/org/onap/portalapp/lm/LicenseableClassImpl.java @@ -0,0 +1,80 @@ +/* + * ============LICENSE_START========================================== + * ONAP Portal SDK + * =================================================================== + * Copyright © 2017 AT&T Intellectual Property. All rights reserved. + * =================================================================== + * + * Unless otherwise specified, all software contained herein is licensed + * under the Apache License, Version 2.0 (the “License”); + * you may not use this software 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. + * + * Unless otherwise specified, all documentation contained herein is licensed + * under the Creative Commons License, Attribution 4.0 Intl. (the “License”); + * you may not use this documentation except in compliance with the License. + * You may obtain a copy of the License at + * + * https://creativecommons.org/licenses/by/4.0/ + * + * Unless required by applicable law or agreed to in writing, documentation + * 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.portalapp.lm; + +import java.io.FileNotFoundException; +import java.io.InputStream; + +import org.onap.portalsdk.core.lm.LicenseableClass; + +/* + * Please note that this class is not being used; its a dummy stub to have a qualifying bean for the interface. + */ + +public class LicenseableClassImpl implements LicenseableClass { + + public String getApplicationName() { + return ""; + } + + public InputStream getPublicKeystoreAsInputStream() throws FileNotFoundException { + return null; + } + + public String getAlias() { + return ""; + } + + public String getKeyPasswd() { + return ""; + } + + public String getPublicKeystorePassword() { + return ""; + } + + public String getCipherParamPassword() { + return ""; + } + + @SuppressWarnings("rawtypes") + public Class getClassToLicense() { + return this.getClass(); + } +} + diff --git a/ecomp-sdk/epsdk-app-os/src/main/java/org/onap/portalapp/login/LoginStrategyImpl.java b/ecomp-sdk/epsdk-app-os/src/main/java/org/onap/portalapp/login/LoginStrategyImpl.java new file mode 100644 index 00000000..61f2cb4d --- /dev/null +++ b/ecomp-sdk/epsdk-app-os/src/main/java/org/onap/portalapp/login/LoginStrategyImpl.java @@ -0,0 +1,129 @@ +/* + * ============LICENSE_START========================================== + * ONAP Portal SDK + * =================================================================== + * Copyright © 2017 AT&T Intellectual Property. All rights reserved. + * =================================================================== + * + * Unless otherwise specified, all software contained herein is licensed + * under the Apache License, Version 2.0 (the “License”); + * you may not use this software 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. + * + * Unless otherwise specified, all documentation contained herein is licensed + * under the Creative Commons License, Attribution 4.0 Intl. (the “License”); + * you may not use this documentation except in compliance with the License. + * You may obtain a copy of the License at + * + * https://creativecommons.org/licenses/by/4.0/ + * + * Unless required by applicable law or agreed to in writing, documentation + * 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.portalapp.login; + +import javax.servlet.http.Cookie; +import javax.servlet.http.HttpServletRequest; +import javax.servlet.http.HttpServletResponse; + +import org.onap.portalsdk.core.auth.LoginStrategy; +import org.onap.portalsdk.core.logging.logic.EELFLoggerDelegate; +import org.onap.portalsdk.core.onboarding.exception.PortalAPIException; +import org.onap.portalsdk.core.onboarding.util.CipherUtil; +import org.onap.portalsdk.core.util.SystemProperties; +import org.springframework.web.servlet.ModelAndView; + +/** + * Implements basic single-signon login strategy for open-source applications + * when users start at Portal. Extracts an encrypted user ID sent by Portal. + */ +public class LoginStrategyImpl extends LoginStrategy { + + private static final EELFLoggerDelegate logger = EELFLoggerDelegate.getLogger(LoginStrategyImpl.class); + + /** + * login for open source is same as external login in the non-open-source + * version. + */ + @Override + public ModelAndView doLogin(HttpServletRequest request, HttpServletResponse response) throws Exception { + return doExternalLogin(request, response); + } + + @Override + public String getUserId(HttpServletRequest request) throws PortalAPIException { + // Check ECOMP Portal cookie + Cookie ep = getCookie(request, EP_SERVICE); + if (ep == null) { + logger.debug(EELFLoggerDelegate.debugLogger, "getUserId: no EP_SERVICE cookie, returning null"); + return null; + } + + String userid = null; + try { + userid = getUserIdFromCookie(request); + } catch (Exception e) { + logger.error(EELFLoggerDelegate.errorLogger, "getUserId failed", e); + } + return userid; + } + + /** + * Searches the request for the user-ID cookie and decrypts the value using a + * key configured in properties + * + * @param request + * HttpServletRequest + * @return User ID + * @throws Exception + * On any failure + */ + private String getUserIdFromCookie(HttpServletRequest request) throws Exception { + String userId = ""; + Cookie userIdCookie = getCookie(request, USER_ID); + if (userIdCookie != null) { + final String cookieValue = userIdCookie.getValue(); + if (!SystemProperties.containsProperty(SystemProperties.Decryption_Key)) + throw new Exception("Failed to find property " + SystemProperties.Decryption_Key); + final String decryptionKey = SystemProperties.getProperty(SystemProperties.Decryption_Key); + userId = CipherUtil.decrypt(cookieValue, decryptionKey); + logger.debug(EELFLoggerDelegate.debugLogger, "getUserIdFromCookie: decrypted as {}", userId); + } + return userId; + } + + /** + * Searches the request for the named cookie. + * + * @param request + * HttpServletRequest + * @param cookieName + * Name of desired cookie + * @return Cookie if found; otherwise null. + */ + private Cookie getCookie(HttpServletRequest request, String cookieName) { + Cookie[] cookies = request.getCookies(); + if (cookies != null) + for (Cookie cookie : cookies) + if (cookie.getName().equals(cookieName)) + return cookie; + return null; + } + +} diff --git a/ecomp-sdk/epsdk-app-os/src/main/java/org/onap/portalapp/scheduler/Register.java b/ecomp-sdk/epsdk-app-os/src/main/java/org/onap/portalapp/scheduler/Register.java new file mode 100644 index 00000000..56f498a2 --- /dev/null +++ b/ecomp-sdk/epsdk-app-os/src/main/java/org/onap/portalapp/scheduler/Register.java @@ -0,0 +1,90 @@ +/* + * ============LICENSE_START========================================== + * ONAP Portal SDK + * =================================================================== + * Copyright © 2017 AT&T Intellectual Property. All rights reserved. + * =================================================================== + * + * Unless otherwise specified, all software contained herein is licensed + * under the Apache License, Version 2.0 (the “License”); + * you may not use this software 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. + * + * Unless otherwise specified, all documentation contained herein is licensed + * under the Creative Commons License, Attribution 4.0 Intl. (the “License”); + * you may not use this documentation except in compliance with the License. + * You may obtain a copy of the License at + * + * https://creativecommons.org/licenses/by/4.0/ + * + * Unless required by applicable law or agreed to in writing, documentation + * 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.portalapp.scheduler; + +import java.util.ArrayList; +import java.util.List; + +import org.onap.portalapp.scheduler.LogRegistry; +import org.onap.portalsdk.core.logging.logic.EELFLoggerDelegate; +import org.onap.portalsdk.core.scheduler.Registerable; +import org.onap.portalsdk.core.util.SystemProperties; +import org.quartz.Trigger; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.context.annotation.DependsOn; +import org.springframework.stereotype.Component; + +@Component +@DependsOn({ "logRegistry", "systemProperties" }) +public class Register implements Registerable { + + private static final EELFLoggerDelegate logger = EELFLoggerDelegate.getLogger(Register.class); + + private List scheduleTriggers = new ArrayList(); + Trigger trigger[] = new Trigger[1]; + + @Autowired + private LogRegistry logRegistry; + + @Override + public Trigger[] getTriggers() { + return getScheduleTriggers().toArray(trigger); + } + + @Override + public void registerTriggers() { + // if the property value is not available; the cron will not be added + // and can be ignored. its safe to ignore the exceptions + try { + if (SystemProperties.getProperty(SystemProperties.LOG_CRON) != null) + getScheduleTriggers().add(logRegistry.getTrigger()); + } catch (IllegalStateException ies) { + logger.info(EELFLoggerDelegate.debugLogger, ("Log Cron not available")); + } + + } + + public List getScheduleTriggers() { + return scheduleTriggers; + } + + public void setScheduleTriggers(List scheduleTriggers) { + this.scheduleTriggers = scheduleTriggers; + } + +} diff --git a/ecomp-sdk/epsdk-app-os/src/main/java/org/onap/portalapp/scheduler/RegistryAdapter.java b/ecomp-sdk/epsdk-app-os/src/main/java/org/onap/portalapp/scheduler/RegistryAdapter.java new file mode 100644 index 00000000..158dfcbd --- /dev/null +++ b/ecomp-sdk/epsdk-app-os/src/main/java/org/onap/portalapp/scheduler/RegistryAdapter.java @@ -0,0 +1,110 @@ +/* + * ============LICENSE_START========================================== + * ONAP Portal SDK + * =================================================================== + * Copyright © 2017 AT&T Intellectual Property. All rights reserved. + * =================================================================== + * + * Unless otherwise specified, all software contained herein is licensed + * under the Apache License, Version 2.0 (the “License”); + * you may not use this software 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. + * + * Unless otherwise specified, all documentation contained herein is licensed + * under the Creative Commons License, Attribution 4.0 Intl. (the “License”); + * you may not use this documentation except in compliance with the License. + * You may obtain a copy of the License at + * + * https://creativecommons.org/licenses/by/4.0/ + * + * Unless required by applicable law or agreed to in writing, documentation + * 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.portalapp.scheduler; + +import java.util.ArrayList; +import java.util.Arrays; +import java.util.List; + +import org.onap.portalsdk.core.scheduler.Registerable; +import org.onap.portalsdk.workflow.services.WorkflowScheduleService; +import org.quartz.Trigger; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.scheduling.quartz.SchedulerFactoryBean; +import org.springframework.stereotype.Component; + +@Component +public class RegistryAdapter { + + @Autowired + private Registerable registry; + + @Autowired + private WorkflowScheduleService workflowScheduleService; + + private SchedulerFactoryBean schedulerBean; + + Trigger trigger[] = new Trigger[1]; + + public Trigger[] getTriggers() { + + registry.registerTriggers(); + + List allTriggers = new ArrayList(); + + List coreTriggers = addCoreTriggers(); + final Trigger[] extTriggerArray = registry.getTriggers(); + + allTriggers.addAll(Arrays.asList(extTriggerArray)); + allTriggers.addAll(coreTriggers); + + return allTriggers.toArray(trigger); + } + + public List addCoreTriggers() { + // On startup of the application after crash recovery, invoke workflow + // schedule trigger + List triggers = getWorkflowScheduleService().triggerWorkflowScheduling(); + return triggers; + } + + public void setSchedulerBean(SchedulerFactoryBean _schedulerBean) { + schedulerBean = _schedulerBean; + } + + public SchedulerFactoryBean getSchedulerBean() { + return schedulerBean; + } + + public Registerable getRegistry() { + return registry; + } + + public void setRegistry(Registerable registry) { + this.registry = registry; + } + + public WorkflowScheduleService getWorkflowScheduleService() { + return workflowScheduleService; + } + + public void setWorkflowScheduleService(WorkflowScheduleService workflowScheduleService) { + this.workflowScheduleService = workflowScheduleService; + } + +} diff --git a/ecomp-sdk/epsdk-app-os/src/main/java/org/onap/portalapp/service/AdminAuthExtension.java b/ecomp-sdk/epsdk-app-os/src/main/java/org/onap/portalapp/service/AdminAuthExtension.java new file mode 100644 index 00000000..b4a5fe59 --- /dev/null +++ b/ecomp-sdk/epsdk-app-os/src/main/java/org/onap/portalapp/service/AdminAuthExtension.java @@ -0,0 +1,71 @@ +/* + * ============LICENSE_START========================================== + * ONAP Portal SDK + * =================================================================== + * Copyright © 2017 AT&T Intellectual Property. All rights reserved. + * =================================================================== + * + * Unless otherwise specified, all software contained herein is licensed + * under the Apache License, Version 2.0 (the “License”); + * you may not use this software 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. + * + * Unless otherwise specified, all documentation contained herein is licensed + * under the Creative Commons License, Attribution 4.0 Intl. (the “License”); + * you may not use this documentation except in compliance with the License. + * You may obtain a copy of the License at + * + * https://creativecommons.org/licenses/by/4.0/ + * + * Unless required by applicable law or agreed to in writing, documentation + * 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.portalapp.service; + +import java.util.Set; + +import org.onap.portalapp.service.IAdminAuthExtension; +import org.onap.portalsdk.core.domain.Role; +import org.onap.portalsdk.core.domain.User; +import org.onap.portalsdk.core.logging.logic.EELFLoggerDelegate; +import org.springframework.stereotype.Service; +import org.springframework.transaction.annotation.Transactional; + + +@Service("adminAuthExtension") +@Transactional +/** + * Provides empty implementations of the methods in IAdminAuthExtension. + */ +public class AdminAuthExtension implements IAdminAuthExtension { + + private static final EELFLoggerDelegate logger = EELFLoggerDelegate.getLogger(AdminAuthExtension.class); + + public void saveUserExtension(User user) { + logger.debug("saveUserExtension"); + } + + public void editUserExtension(User user) { + logger.debug("editUserExtension"); + } + + public void saveUserRoleExtension(Set roles, User user) { + logger.debug("saveUserRoleExtension"); + } + +} diff --git a/ecomp-sdk/epsdk-app-os/src/main/java/org/openecomp/portalapp/conf/ExternalAppConfig.java b/ecomp-sdk/epsdk-app-os/src/main/java/org/openecomp/portalapp/conf/ExternalAppConfig.java deleted file mode 100644 index 9745f968..00000000 --- a/ecomp-sdk/epsdk-app-os/src/main/java/org/openecomp/portalapp/conf/ExternalAppConfig.java +++ /dev/null @@ -1,161 +0,0 @@ -/*- - * ================================================================================ - * ECOMP Portal SDK - * ================================================================================ - * Copyright (C) 2017 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.openecomp.portalapp.conf; - -import java.util.ArrayList; -import java.util.List; - -import org.openecomp.portalapp.login.LoginStrategyImpl; -import org.openecomp.portalapp.scheduler.RegistryAdapter; -import org.openecomp.portalsdk.core.auth.LoginStrategy; -import org.openecomp.portalsdk.core.conf.AppConfig; -import org.openecomp.portalsdk.core.conf.Configurable; -import org.openecomp.portalsdk.core.objectcache.AbstractCacheManager; -import org.openecomp.portalsdk.core.service.DataAccessService; -import org.openecomp.portalsdk.core.util.CacheManager; -import org.openecomp.portalsdk.core.util.SystemProperties; -import org.springframework.beans.factory.annotation.Autowired; -import org.springframework.context.annotation.Bean; -import org.springframework.context.annotation.ComponentScan; -import org.springframework.context.annotation.Configuration; -import org.springframework.context.annotation.Import; -import org.springframework.context.annotation.Profile; -import org.springframework.context.annotation.PropertySource; -import org.springframework.scheduling.annotation.EnableAsync; -import org.springframework.scheduling.annotation.EnableScheduling; -import org.springframework.scheduling.quartz.SchedulerFactoryBean; -import org.springframework.web.servlet.ViewResolver; -import org.springframework.web.servlet.config.annotation.EnableWebMvc; -import org.springframework.web.servlet.config.annotation.InterceptorRegistry; -import org.springframework.web.servlet.config.annotation.ResourceHandlerRegistry; - -/** - * ECOMP Portal SDK sample application. ECOMP Portal SDK core AppConfig class to - * reuse interceptors, view resolvers and other features defined there. - */ -@Configuration -@EnableWebMvc -@ComponentScan(basePackages = "org.openecomp") -@PropertySource(value = { "${container.classpath:}/WEB-INF/conf/app/test.properties" }, ignoreResourceNotFound = true) -@Profile("src") -@EnableAsync -@EnableScheduling -public class ExternalAppConfig extends AppConfig implements Configurable { - - private RegistryAdapter schedulerRegistryAdapter; - - @Configuration - @Import(SystemProperties.class) - static class InnerConfiguration { - } - - /** - * @see org.openecomp.portalsdk.core.conf.AppConfig#viewResolver() - */ - public ViewResolver viewResolver() { - return super.viewResolver(); - } - - /** - * @see org.openecomp.portalsdk.core.conf.AppConfig#addResourceHandlers(ResourceHandlerRegistry) - * - * @param registry - */ - public void addResourceHandlers(ResourceHandlerRegistry registry) { - super.addResourceHandlers(registry); - } - - /** - * @see org.openecomp.portalsdk.core.conf.AppConfig#dataAccessService() - */ - public DataAccessService dataAccessService() { - // Echo the JDBC URL to assist developers when starting the app. - System.out.println("ExternalAppConfig: " + SystemProperties.DB_CONNECTIONURL + " is " - + SystemProperties.getProperty(SystemProperties.DB_CONNECTIONURL)); - return super.dataAccessService(); - } - - /** - * Creates a new list with a single entry that is the external app - * definitions.xml path. - * - * @return List of String, size 1 - */ - public List addTileDefinitions() { - List definitions = new ArrayList(); - definitions.add("/WEB-INF/defs/definitions.xml"); - return definitions; - } - - /** - * Adds request interceptors to the specified registry by calling - * {@link AppConfig#addInterceptors(InterceptorRegistry)}, but excludes - * certain paths from the session timeout interceptor. - */ - @Override - public void addInterceptors(InterceptorRegistry registry) { - super.setExcludeUrlPathsForSessionTimeout("/login_external", "*/login_external.htm", "login", "/login.htm", - "/api*", "/single_signon.htm", "/single_signon"); - super.addInterceptors(registry); - } - - /** - * Creates and returns a new instance of a {@link CacheManager} class. - * - * @return New instance of {@link CacheManager} - */ - @Bean - public AbstractCacheManager cacheManager() { - return new CacheManager(); - } - - /** - * Creates and returns a new instance of a {@link SchedulerFactoryBean} and - * populates it with triggers. - * - * @return New instance of {@link SchedulerFactoryBean} - * @throws Exception - */ - // @Bean // ANNOTATION COMMENTED OUT - // APPLICATIONS REQUIRING QUARTZ SHOULD RESTORE ANNOTATION - public SchedulerFactoryBean schedulerFactoryBean() throws Exception { - SchedulerFactoryBean scheduler = new SchedulerFactoryBean(); - scheduler.setTriggers(schedulerRegistryAdapter.getTriggers()); - scheduler.setConfigLocation(appApplicationContext.getResource("WEB-INF/conf/quartz.properties")); - scheduler.setDataSource(dataSource()); - return scheduler; - } - - /** - * Sets the scheduler registry adapter. - * - * @param schedulerRegistryAdapter - */ - @Autowired - public void setSchedulerRegistryAdapter(final RegistryAdapter schedulerRegistryAdapter) { - this.schedulerRegistryAdapter = schedulerRegistryAdapter; - } - - @Bean - public LoginStrategy loginStrategy() { - - return new LoginStrategyImpl(); - } -} diff --git a/ecomp-sdk/epsdk-app-os/src/main/java/org/openecomp/portalapp/conf/ExternalAppInitializer.java b/ecomp-sdk/epsdk-app-os/src/main/java/org/openecomp/portalapp/conf/ExternalAppInitializer.java deleted file mode 100644 index 6d7c72d1..00000000 --- a/ecomp-sdk/epsdk-app-os/src/main/java/org/openecomp/portalapp/conf/ExternalAppInitializer.java +++ /dev/null @@ -1,47 +0,0 @@ -/*- - * ================================================================================ - * ECOMP Portal SDK - * ================================================================================ - * Copyright (C) 2017 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.openecomp.portalapp.conf; - -import org.openecomp.portalsdk.core.conf.AppInitializer; - -public class ExternalAppInitializer extends AppInitializer { - - @Override - protected Class[] getRootConfigClasses() { - return super.getRootConfigClasses(); - } - - @Override - protected Class[] getServletConfigClasses() { - Class appConfigClass = ExternalAppConfig.class; - // Show something on stdout to indicate the app is starting. - System.out.println("ExternalAppInitializer: servlet configuration class is " + appConfigClass.getName()); - return new Class[] { appConfigClass }; - } - - /* - * URL request will direct to the Spring dispatcher for processing - */ - @Override - protected String[] getServletMappings() { - return super.getServletMappings(); - } - -} diff --git a/ecomp-sdk/epsdk-app-os/src/main/java/org/openecomp/portalapp/conf/HibernateMappingLocations.java b/ecomp-sdk/epsdk-app-os/src/main/java/org/openecomp/portalapp/conf/HibernateMappingLocations.java deleted file mode 100644 index cf6ee2f0..00000000 --- a/ecomp-sdk/epsdk-app-os/src/main/java/org/openecomp/portalapp/conf/HibernateMappingLocations.java +++ /dev/null @@ -1,57 +0,0 @@ -/*- - * ================================================================================ - * ECOMP Portal SDK - * ================================================================================ - * Copyright (C) 2017 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.openecomp.portalapp.conf; - -import org.springframework.context.annotation.Profile; -import org.springframework.core.io.ClassPathResource; -import org.springframework.core.io.Resource; -import org.springframework.stereotype.Component; - -import org.openecomp.portalsdk.core.conf.HibernateMappingLocatable; - -@Component -@Profile("src") -public class HibernateMappingLocations implements HibernateMappingLocatable { - - /* - * (non-Javadoc) - * - * @see org.openecomp.portalsdk.core.conf.HibernateMappingLocatable# - * getMappingLocations() - */ - @Override - public Resource[] getMappingLocations() { - return new Resource[] { new ClassPathResource("../fusion/orm/Fusion.hbm.xml"), - new ClassPathResource("../fusion/orm/Workflow.hbm.xml"), - new ClassPathResource("../fusion/orm/RNoteBookIntegration.hbm.xml") }; - } - - /* - * (non-Javadoc) - * - * @see org.openecomp.portalsdk.core.conf.HibernateMappingLocatable# - * getPackagesToScan() - */ - @Override - public String[] getPackagesToScan() { - return new String[] { "org.openecomp" }; - } - -} diff --git a/ecomp-sdk/epsdk-app-os/src/main/java/org/openecomp/portalapp/lm/FusionLicenseManagerImpl.java b/ecomp-sdk/epsdk-app-os/src/main/java/org/openecomp/portalapp/lm/FusionLicenseManagerImpl.java deleted file mode 100644 index 4f7033e9..00000000 --- a/ecomp-sdk/epsdk-app-os/src/main/java/org/openecomp/portalapp/lm/FusionLicenseManagerImpl.java +++ /dev/null @@ -1,88 +0,0 @@ -/*- - * ================================================================================ - * ECOMP Portal SDK - * ================================================================================ - * Copyright (C) 2017 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.openecomp.portalapp.lm; - -import java.util.Date; -import java.util.List; -import java.util.Map; - -import javax.servlet.ServletContext; - -import org.openecomp.portalsdk.core.lm.FusionLicenseManager; -import org.springframework.stereotype.Component; - -/* - * Please note that this class is not being used; its a dummy stub to have a qualifying bean for the interface. - */ - -@Component -public class FusionLicenseManagerImpl implements FusionLicenseManager { - - @Override - public void initKeyStoreParam() { - - } - - @Override - public void initCipherParam() { - - } - - @Override - public void initLicenseParam() { - - } - - @Override - public void doInitWork() { - - } - - @Override - public int installLicense() { - return 0; - } - - @Override - public synchronized int verifyLicense(ServletContext context) { - return 0; - } - - @Override - public void generateLicense(Map clientInfoMap, List ipAddressList) throws Exception { - - } - - @Override - public String nvl(String s) { - return null; - } - - @Override - public Date getExpiredDate() { - return null; - } - - @Override - public void setExpiredDate(Date expiredDate) { - - } - -} diff --git a/ecomp-sdk/epsdk-app-os/src/main/java/org/openecomp/portalapp/lm/LicenseableClassImpl.java b/ecomp-sdk/epsdk-app-os/src/main/java/org/openecomp/portalapp/lm/LicenseableClassImpl.java deleted file mode 100644 index 14f21a81..00000000 --- a/ecomp-sdk/epsdk-app-os/src/main/java/org/openecomp/portalapp/lm/LicenseableClassImpl.java +++ /dev/null @@ -1,62 +0,0 @@ -/*- - * ================================================================================ - * ECOMP Portal SDK - * ================================================================================ - * Copyright (C) 2017 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.openecomp.portalapp.lm; - -import java.io.FileNotFoundException; -import java.io.InputStream; - -import org.openecomp.portalsdk.core.lm.LicenseableClass; - -/* - * Please note that this class is not being used; its a dummy stub to have a qualifying bean for the interface. - */ - -public class LicenseableClassImpl implements LicenseableClass { - - public String getApplicationName() { - return ""; - } - - public InputStream getPublicKeystoreAsInputStream() throws FileNotFoundException { - return null; - } - - public String getAlias() { - return ""; - } - - public String getKeyPasswd() { - return ""; - } - - public String getPublicKeystorePassword() { - return ""; - } - - public String getCipherParamPassword() { - return ""; - } - - @SuppressWarnings("rawtypes") - public Class getClassToLicense() { - return this.getClass(); - } -} - diff --git a/ecomp-sdk/epsdk-app-os/src/main/java/org/openecomp/portalapp/login/LoginStrategyImpl.java b/ecomp-sdk/epsdk-app-os/src/main/java/org/openecomp/portalapp/login/LoginStrategyImpl.java deleted file mode 100644 index 270e69ff..00000000 --- a/ecomp-sdk/epsdk-app-os/src/main/java/org/openecomp/portalapp/login/LoginStrategyImpl.java +++ /dev/null @@ -1,111 +0,0 @@ -/*- - * ================================================================================ - * ECOMP Portal SDK - * ================================================================================ - * Copyright (C) 2017 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.openecomp.portalapp.login; - -import javax.servlet.http.Cookie; -import javax.servlet.http.HttpServletRequest; -import javax.servlet.http.HttpServletResponse; - -import org.openecomp.portalsdk.core.auth.LoginStrategy; -import org.openecomp.portalsdk.core.logging.logic.EELFLoggerDelegate; -import org.openecomp.portalsdk.core.onboarding.exception.PortalAPIException; -import org.openecomp.portalsdk.core.onboarding.util.CipherUtil; -import org.openecomp.portalsdk.core.util.SystemProperties; -import org.springframework.web.servlet.ModelAndView; - -/** - * Implements basic single-signon login strategy for open-source applications - * when users start at Portal. Extracts an encrypted user ID sent by Portal. - */ -public class LoginStrategyImpl extends LoginStrategy { - - private static EELFLoggerDelegate logger = EELFLoggerDelegate.getLogger(LoginStrategyImpl.class); - - /** - * login for open source is same as external login in the non-open-source - * version. - */ - @Override - public ModelAndView doLogin(HttpServletRequest request, HttpServletResponse response) throws Exception { - return doExternalLogin(request, response); - } - - @Override - public String getUserId(HttpServletRequest request) throws PortalAPIException { - // Check ECOMP Portal cookie - Cookie ep = getCookie(request, EP_SERVICE); - if (ep == null) { - logger.debug(EELFLoggerDelegate.debugLogger, "getUserId: no EP_SERVICE cookie, returning null"); - return null; - } - - String userid = null; - try { - userid = getUserIdFromCookie(request); - } catch (Exception e) { - logger.error(EELFLoggerDelegate.errorLogger, "getUserId failed", e); - } - return userid; - } - - /** - * Searches the request for the user-ID cookie and decrypts the value using a - * key configured in properties - * - * @param request - * HttpServletRequest - * @return User ID - * @throws Exception - * On any failure - */ - private String getUserIdFromCookie(HttpServletRequest request) throws Exception { - String userId = ""; - Cookie userIdCookie = getCookie(request, USER_ID); - if (userIdCookie != null) { - final String cookieValue = userIdCookie.getValue(); - if (!SystemProperties.containsProperty(SystemProperties.Decryption_Key)) - throw new Exception("Failed to find property " + SystemProperties.Decryption_Key); - final String decryptionKey = SystemProperties.getProperty(SystemProperties.Decryption_Key); - userId = CipherUtil.decrypt(cookieValue, decryptionKey); - logger.debug(EELFLoggerDelegate.debugLogger, "getUserIdFromCookie: decrypted as {}", userId); - } - return userId; - } - - /** - * Searches the request for the named cookie. - * - * @param request - * HttpServletRequest - * @param cookieName - * Name of desired cookie - * @return Cookie if found; otherwise null. - */ - private Cookie getCookie(HttpServletRequest request, String cookieName) { - Cookie[] cookies = request.getCookies(); - if (cookies != null) - for (Cookie cookie : cookies) - if (cookie.getName().equals(cookieName)) - return cookie; - return null; - } - -} diff --git a/ecomp-sdk/epsdk-app-os/src/main/java/org/openecomp/portalapp/scheduler/Register.java b/ecomp-sdk/epsdk-app-os/src/main/java/org/openecomp/portalapp/scheduler/Register.java deleted file mode 100644 index e5d30e5b..00000000 --- a/ecomp-sdk/epsdk-app-os/src/main/java/org/openecomp/portalapp/scheduler/Register.java +++ /dev/null @@ -1,71 +0,0 @@ -/*- - * ================================================================================ - * ECOMP Portal SDK - * ================================================================================ - * Copyright (C) 2017 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.openecomp.portalapp.scheduler; - -import java.util.ArrayList; -import java.util.List; - -import org.openecomp.portalsdk.core.logging.logic.EELFLoggerDelegate; -import org.openecomp.portalsdk.core.scheduler.Registerable; -import org.openecomp.portalsdk.core.util.SystemProperties; -import org.quartz.Trigger; -import org.springframework.beans.factory.annotation.Autowired; -import org.springframework.context.annotation.DependsOn; -import org.springframework.stereotype.Component; - -@Component -@DependsOn({ "logRegistry", "systemProperties" }) -public class Register implements Registerable { - - EELFLoggerDelegate logger = EELFLoggerDelegate.getLogger(Register.class); - - private List scheduleTriggers = new ArrayList(); - Trigger trigger[] = new Trigger[1]; - - @Autowired - private LogRegistry logRegistry; - - @Override - public Trigger[] getTriggers() { - return getScheduleTriggers().toArray(trigger); - } - - @Override - public void registerTriggers() { - // if the property value is not available; the cron will not be added - // and can be ignored. its safe to ignore the exceptions - try { - if (SystemProperties.getProperty(SystemProperties.LOG_CRON) != null) - getScheduleTriggers().add(logRegistry.getTrigger()); - } catch (IllegalStateException ies) { - logger.info(EELFLoggerDelegate.debugLogger, ("Log Cron not available")); - } - - } - - public List getScheduleTriggers() { - return scheduleTriggers; - } - - public void setScheduleTriggers(List scheduleTriggers) { - this.scheduleTriggers = scheduleTriggers; - } - -} diff --git a/ecomp-sdk/epsdk-app-os/src/main/java/org/openecomp/portalapp/scheduler/RegistryAdapter.java b/ecomp-sdk/epsdk-app-os/src/main/java/org/openecomp/portalapp/scheduler/RegistryAdapter.java deleted file mode 100644 index b3f6cbeb..00000000 --- a/ecomp-sdk/epsdk-app-os/src/main/java/org/openecomp/portalapp/scheduler/RegistryAdapter.java +++ /dev/null @@ -1,92 +0,0 @@ -/*- - * ================================================================================ - * ECOMP Portal SDK - * ================================================================================ - * Copyright (C) 2017 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.openecomp.portalapp.scheduler; - -import java.util.ArrayList; -import java.util.Arrays; -import java.util.List; - -import org.openecomp.portalsdk.core.scheduler.Registerable; -import org.openecomp.portalsdk.workflow.services.WorkflowScheduleService; -import org.quartz.Trigger; -import org.springframework.beans.factory.annotation.Autowired; -import org.springframework.scheduling.quartz.SchedulerFactoryBean; -import org.springframework.stereotype.Component; - -@Component -public class RegistryAdapter { - - @Autowired - private Registerable registry; - - @Autowired - private WorkflowScheduleService workflowScheduleService; - - private SchedulerFactoryBean schedulerBean; - - Trigger trigger[] = new Trigger[1]; - - public Trigger[] getTriggers() { - - registry.registerTriggers(); - - List allTriggers = new ArrayList(); - - List coreTriggers = addCoreTriggers(); - final Trigger[] extTriggerArray = registry.getTriggers(); - - allTriggers.addAll(Arrays.asList(extTriggerArray)); - allTriggers.addAll(coreTriggers); - - return allTriggers.toArray(trigger); - } - - public List addCoreTriggers() { - // On startup of the application after crash recovery, invoke workflow - // schedule trigger - List triggers = getWorkflowScheduleService().triggerWorkflowScheduling(); - return triggers; - } - - public void setSchedulerBean(SchedulerFactoryBean _schedulerBean) { - schedulerBean = _schedulerBean; - } - - public SchedulerFactoryBean getSchedulerBean() { - return schedulerBean; - } - - public Registerable getRegistry() { - return registry; - } - - public void setRegistry(Registerable registry) { - this.registry = registry; - } - - public WorkflowScheduleService getWorkflowScheduleService() { - return workflowScheduleService; - } - - public void setWorkflowScheduleService(WorkflowScheduleService workflowScheduleService) { - this.workflowScheduleService = workflowScheduleService; - } - -} diff --git a/ecomp-sdk/epsdk-app-os/src/main/java/org/openecomp/portalapp/service/AdminAuthExtension.java b/ecomp-sdk/epsdk-app-os/src/main/java/org/openecomp/portalapp/service/AdminAuthExtension.java deleted file mode 100644 index 2b9b60e4..00000000 --- a/ecomp-sdk/epsdk-app-os/src/main/java/org/openecomp/portalapp/service/AdminAuthExtension.java +++ /dev/null @@ -1,64 +0,0 @@ -/*- - * ================================================================================ - * ECOMP Portal SDK - * ================================================================================ - * Copyright (C) 2017 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.openecomp.portalapp.service; - -import java.util.Set; - -import org.openecomp.portalsdk.core.domain.Role; -import org.openecomp.portalsdk.core.domain.User; -import org.openecomp.portalsdk.core.logging.logic.EELFLoggerDelegate; -import org.springframework.stereotype.Service; -import org.springframework.transaction.annotation.Transactional; - - -@Service("adminAuthExtension") -@Transactional -/** - * Provides empty implementations of the methods in IAdminAuthExtension. - */ -public class AdminAuthExtension implements IAdminAuthExtension { - - EELFLoggerDelegate logger = EELFLoggerDelegate.getLogger(AdminAuthExtension.class); - - /* - * (non-Javadoc) - * @see org.openecomp.portalapp.service.IAdminAuthExtension#saveUserExtension(org.openecomp.portalsdk.core.domain.User) - */ - public void saveUserExtension(User user) { - logger.debug("saveUserExtension"); - } - - /* - * (non-Javadoc) - * @see org.openecomp.portalapp.service.IAdminAuthExtension#editUserExtension(org.openecomp.portalsdk.core.domain.User) - */ - public void editUserExtension(User user) { - logger.debug("editUserExtension"); - } - - /* - * (non-Javadoc) - * @see org.openecomp.portalapp.service.IAdminAuthExtension#saveUserRoleExtension(java.util.Set, org.openecomp.portalsdk.core.domain.User) - */ - public void saveUserRoleExtension(Set roles, User user) { - logger.debug("saveUserRoleExtension"); - } - -} diff --git a/ecomp-sdk/epsdk-app-os/src/main/resources/logback.xml b/ecomp-sdk/epsdk-app-os/src/main/resources/logback.xml index e0a02022..cc4d0e93 100644 --- a/ecomp-sdk/epsdk-app-os/src/main/resources/logback.xml +++ b/ecomp-sdk/epsdk-app-os/src/main/resources/logback.xml @@ -1,27 +1,45 @@ @@ -99,7 +117,7 @@ ${applicationLoggerPattern} - + diff --git a/ecomp-sdk/epsdk-app-os/src/main/resources/portal.properties b/ecomp-sdk/epsdk-app-os/src/main/resources/portal.properties index 76c679e5..1a8cd1fe 100644 --- a/ecomp-sdk/epsdk-app-os/src/main/resources/portal.properties +++ b/ecomp-sdk/epsdk-app-os/src/main/resources/portal.properties @@ -1,21 +1,39 @@ ### -# ================================================================================ -# ECOMP Portal SDK -# ================================================================================ -# Copyright (C) 2017 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. +# ============LICENSE_START========================================== +# ONAP Portal SDK +# =================================================================== +# Copyright © 2017 AT&T Intellectual Property. All rights reserved. +# =================================================================== +# +# Unless otherwise specified, all software contained herein is licensed +# under the Apache License, Version 2.0 (the “License”); +# you may not use this software except in compliance with the License. # You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# +# +# 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. -# ================================================================================ +# +# Unless otherwise specified, all documentation contained herein is licensed +# under the Creative Commons License, Attribution 4.0 Intl. (the “License”); +# you may not use this documentation except in compliance with the License. +# You may obtain a copy of the License at +# +# https://creativecommons.org/licenses/by/4.0/ +# +# Unless required by applicable law or agreed to in writing, documentation +# 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. ### # Properties read by ECOMP Framework library, ecompFW.jar @@ -35,7 +53,7 @@ use_rest_for_functional_menu=true ########################################################################## # Name of java class that implements the OnBoardingApiService interface. -portal.api.impl.class = org.openecomp.portalapp.service.OnBoardingApiServiceImpl +portal.api.impl.class = org.onap.portalapp.service.OnBoardingApiServiceImpl # URL of the Portal where this app is onboarded ecomp_redirect_url = https://portal.openecomp.org/ecompportal/process_csp diff --git a/ecomp-sdk/epsdk-app-os/src/main/webapp/WEB-INF/fusion/jsp/ds2/left-menu.jsp b/ecomp-sdk/epsdk-app-os/src/main/webapp/WEB-INF/fusion/jsp/ds2/left-menu.jsp index cbf7f8ad..48c26313 100644 --- a/ecomp-sdk/epsdk-app-os/src/main/webapp/WEB-INF/fusion/jsp/ds2/left-menu.jsp +++ b/ecomp-sdk/epsdk-app-os/src/main/webapp/WEB-INF/fusion/jsp/ds2/left-menu.jsp @@ -1,29 +1,47 @@ <%-- - ================================================================================ - eCOMP Portal SDK - ================================================================================ - Copyright (C) 2017 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. + ============LICENSE_START========================================== + ONAP Portal SDK + =================================================================== + Copyright © 2017 AT&T Intellectual Property. All rights reserved. + =================================================================== + + Unless otherwise specified, all software contained herein is licensed + under the Apache License, Version 2.0 (the “License”); + you may not use this software except in compliance with the License. You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - + + 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. - ================================================================================ + + Unless otherwise specified, all documentation contained herein is licensed + under the Creative Commons License, Attribution 4.0 Intl. (the “License”); + you may not use this documentation except in compliance with the License. + You may obtain a copy of the License at + + https://creativecommons.org/licenses/by/4.0/ + + Unless required by applicable law or agreed to in writing, documentation + 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. --%> <%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%> <%@ taglib prefix="fn" uri="http://java.sun.com/jsp/jstl/functions"%> <%@ page isELIgnored="false"%> -<%@ page import="org.openecomp.portalsdk.core.util.SystemProperties"%> -<%@ page import="org.openecomp.portalsdk.core.onboarding.util.PortalApiProperties"%> -<%@ page import="org.openecomp.portalsdk.core.onboarding.util.PortalApiConstants"%> -<%@ page import="org.openecomp.portalsdk.core.domain.MenuData"%> +<%@ page import="org.onap.portalsdk.core.util.SystemProperties"%> +<%@ page import="org.onap.portalsdk.core.onboarding.util.PortalApiProperties"%> +<%@ page import="org.onap.portalsdk.core.onboarding.util.PortalApiConstants"%> +<%@ page import="org.onap.portalsdk.core.domain.MenuData"%> diff --git a/ecomp-sdk/epsdk-app-os/src/main/webapp/WEB-INF/fusion/orm/RNoteBookIntegration.hbm.xml b/ecomp-sdk/epsdk-app-os/src/main/webapp/WEB-INF/fusion/orm/RNoteBookIntegration.hbm.xml index 6638b4bc..0afc92d5 100644 --- a/ecomp-sdk/epsdk-app-os/src/main/webapp/WEB-INF/fusion/orm/RNoteBookIntegration.hbm.xml +++ b/ecomp-sdk/epsdk-app-os/src/main/webapp/WEB-INF/fusion/orm/RNoteBookIntegration.hbm.xml @@ -1,29 +1,47 @@ - + diff --git a/ecomp-sdk/epsdk-app-os/src/main/webapp/WEB-INF/index.jsp b/ecomp-sdk/epsdk-app-os/src/main/webapp/WEB-INF/index.jsp index f6030c97..de6531c4 100644 --- a/ecomp-sdk/epsdk-app-os/src/main/webapp/WEB-INF/index.jsp +++ b/ecomp-sdk/epsdk-app-os/src/main/webapp/WEB-INF/index.jsp @@ -1,21 +1,39 @@ <%-- - ================================================================================ - eCOMP Portal SDK - ================================================================================ - Copyright (C) 2017 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. + ============LICENSE_START========================================== + ONAP Portal SDK + =================================================================== + Copyright © 2017 AT&T Intellectual Property. All rights reserved. + =================================================================== + + Unless otherwise specified, all software contained herein is licensed + under the Apache License, Version 2.0 (the “License”); + you may not use this software except in compliance with the License. You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - + + 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. - ================================================================================ + + Unless otherwise specified, all documentation contained herein is licensed + under the Creative Commons License, Attribution 4.0 Intl. (the “License”); + you may not use this documentation except in compliance with the License. + You may obtain a copy of the License at + + https://creativecommons.org/licenses/by/4.0/ + + Unless required by applicable law or agreed to in writing, documentation + 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. --%> <%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %> diff --git a/ecomp-sdk/epsdk-app-os/src/main/webapp/WEB-INF/jsp/login.jsp b/ecomp-sdk/epsdk-app-os/src/main/webapp/WEB-INF/jsp/login.jsp index 09320356..cd6a22f4 100644 --- a/ecomp-sdk/epsdk-app-os/src/main/webapp/WEB-INF/jsp/login.jsp +++ b/ecomp-sdk/epsdk-app-os/src/main/webapp/WEB-INF/jsp/login.jsp @@ -1,23 +1,41 @@ <%-- - ================================================================================ - ECOMP Portal SDK - ================================================================================ - Copyright (C) 2017 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. + ============LICENSE_START========================================== + ONAP Portal SDK + =================================================================== + Copyright © 2017 AT&T Intellectual Property. All rights reserved. + =================================================================== + + Unless otherwise specified, all software contained herein is licensed + under the Apache License, Version 2.0 (the “License”); + you may not use this software except in compliance with the License. You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - + + 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. - ================================================================================ + + Unless otherwise specified, all documentation contained herein is licensed + under the Creative Commons License, Attribution 4.0 Intl. (the “License”); + you may not use this documentation except in compliance with the License. + You may obtain a copy of the License at + + https://creativecommons.org/licenses/by/4.0/ + + Unless required by applicable law or agreed to in writing, documentation + 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. --%> -<%@ page import="org.openecomp.portalsdk.core.util.SystemProperties"%> +<%@ page import="org.onap.portalsdk.core.util.SystemProperties"%> <% // Name is defined by app; do not throw if missing diff --git a/ecomp-sdk/epsdk-app-os/src/main/webapp/WEB-INF/jsp/login_external.jsp b/ecomp-sdk/epsdk-app-os/src/main/webapp/WEB-INF/jsp/login_external.jsp index 9d099bf0..15e228ec 100644 --- a/ecomp-sdk/epsdk-app-os/src/main/webapp/WEB-INF/jsp/login_external.jsp +++ b/ecomp-sdk/epsdk-app-os/src/main/webapp/WEB-INF/jsp/login_external.jsp @@ -1,23 +1,41 @@ <%-- - ================================================================================ - ECOMP Portal SDK - ================================================================================ - Copyright (C) 2017 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. + ============LICENSE_START========================================== + ONAP Portal SDK + =================================================================== + Copyright © 2017 AT&T Intellectual Property. All rights reserved. + =================================================================== + + Unless otherwise specified, all software contained herein is licensed + under the Apache License, Version 2.0 (the “License”); + you may not use this software except in compliance with the License. You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - + + 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. - ================================================================================ + + Unless otherwise specified, all documentation contained herein is licensed + under the Creative Commons License, Attribution 4.0 Intl. (the “License”); + you may not use this documentation except in compliance with the License. + You may obtain a copy of the License at + + https://creativecommons.org/licenses/by/4.0/ + + Unless required by applicable law or agreed to in writing, documentation + 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. --%> -<%@ page import="org.openecomp.portalsdk.core.util.SystemProperties"%> +<%@ page import="org.onap.portalsdk.core.util.SystemProperties"%> <% // Name is defined by app; do not throw if missing diff --git a/ecomp-sdk/epsdk-app-os/src/main/webapp/app/fusion/scripts/DS2-view-models/ds2-profile/profile_searchDS2.html b/ecomp-sdk/epsdk-app-os/src/main/webapp/app/fusion/scripts/DS2-view-models/ds2-profile/profile_searchDS2.html index e0709672..25c081a9 100644 --- a/ecomp-sdk/epsdk-app-os/src/main/webapp/app/fusion/scripts/DS2-view-models/ds2-profile/profile_searchDS2.html +++ b/ecomp-sdk/epsdk-app-os/src/main/webapp/app/fusion/scripts/DS2-view-models/ds2-profile/profile_searchDS2.html @@ -17,7 +17,7 @@ User ID Manager User ID Edit - Active? + Active? @@ -31,7 +31,7 @@ - +
-
-

Please edit the profile details below:

+
+

Please use Portal for access management

+

Please edit the profile details below:

- +
@@ -19,7 +20,7 @@
- +
@@ -62,7 +63,7 @@
- +
@@ -70,7 +71,7 @@
- +
@@ -81,7 +82,7 @@
- +
@@ -89,7 +90,7 @@
- +
@@ -97,7 +98,7 @@
- +
@@ -105,7 +106,7 @@
- +
@@ -116,14 +117,14 @@
- +
-
@@ -132,14 +133,14 @@
- +
-
@@ -148,17 +149,17 @@
-
- +

-
+
Role
@@ -168,14 +169,14 @@ Name - Delete + Delete - +
-- cgit 1.2.3-korg