From f8e38b54b043d358114a6752a19b95183522abe9 Mon Sep 17 00:00:00 2001 From: "waqas.ikram" Date: Fri, 19 Feb 2021 09:18:44 +0000 Subject: Removing etsi-sol003-adapter module Change-Id: If35f94bd8459c08c11d5e178ae872f70a36fd9fa Issue-ID: SO-3486 Signed-off-by: waqas.ikram --- .../so/adapters/etsisol003adapter/Application.java | 57 -------------------- ...siSol003AdapterBasicHttpSecurityConfigurer.java | 63 ---------------------- 2 files changed, 120 deletions(-) delete mode 100755 adapters/etsi-sol003-adapter/etsi-sol003-adapter-application/src/main/java/org/onap/so/adapters/etsisol003adapter/Application.java delete mode 100644 adapters/etsi-sol003-adapter/etsi-sol003-adapter-application/src/main/java/org/onap/so/adapters/etsisol003adapter/EtsiSol003AdapterBasicHttpSecurityConfigurer.java (limited to 'adapters/etsi-sol003-adapter/etsi-sol003-adapter-application/src/main/java/org') diff --git a/adapters/etsi-sol003-adapter/etsi-sol003-adapter-application/src/main/java/org/onap/so/adapters/etsisol003adapter/Application.java b/adapters/etsi-sol003-adapter/etsi-sol003-adapter-application/src/main/java/org/onap/so/adapters/etsisol003adapter/Application.java deleted file mode 100755 index 261d2244d7..0000000000 --- a/adapters/etsi-sol003-adapter/etsi-sol003-adapter-application/src/main/java/org/onap/so/adapters/etsisol003adapter/Application.java +++ /dev/null @@ -1,57 +0,0 @@ -/*- - * ============LICENSE_START======================================================= - * Copyright (C) 2019 Nordix Foundation. - * ================================================================================ - * 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. - * - * SPDX-License-Identifier: Apache-2.0 - * ============LICENSE_END========================================================= - */ - -package org.onap.so.adapters.etsisol003adapter; - -import static org.slf4j.LoggerFactory.getLogger; -import org.onap.so.adapters.etsisol003adapter.lcm.rest.EtsiSol003AdapterController; -import org.slf4j.Logger; -import org.springframework.boot.SpringApplication; -import org.springframework.boot.autoconfigure.EnableAutoConfiguration; -import org.springframework.boot.autoconfigure.SpringBootApplication; -import org.springframework.boot.autoconfigure.jackson.JacksonAutoConfiguration; -import org.springframework.cache.annotation.EnableCaching; - -/** - * The spring boot application for the ETSI SOL003 Adapter. - *

- * The ETSI SOL003 Adapter receives requests through its REST API {@link EtsiSol003AdapterController} which it adapts - * into ETSI SOL003 compliant LCM (Life Cycle Management) calls towards an ETSI compliant VNFM. - * - * @see ETSI - * SOL003 v2.5.1 - */ -@EnableCaching -@SpringBootApplication(scanBasePackages = {"org.onap.so"}) -@EnableAutoConfiguration(exclude = {JacksonAutoConfiguration.class}) -public class Application { - private static final Logger logger = getLogger(Application.class); - - /** - * Entry point for the Spring boot application - * - * @param args arguments for the application - */ - public static void main(final String[] args) { - new SpringApplication(Application.class).run(args); - logger.info("VnfmAdapterApplication started!"); - } - -} diff --git a/adapters/etsi-sol003-adapter/etsi-sol003-adapter-application/src/main/java/org/onap/so/adapters/etsisol003adapter/EtsiSol003AdapterBasicHttpSecurityConfigurer.java b/adapters/etsi-sol003-adapter/etsi-sol003-adapter-application/src/main/java/org/onap/so/adapters/etsisol003adapter/EtsiSol003AdapterBasicHttpSecurityConfigurer.java deleted file mode 100644 index 618b4f6116..0000000000 --- a/adapters/etsi-sol003-adapter/etsi-sol003-adapter-application/src/main/java/org/onap/so/adapters/etsisol003adapter/EtsiSol003AdapterBasicHttpSecurityConfigurer.java +++ /dev/null @@ -1,63 +0,0 @@ -/*- - * ============LICENSE_START======================================================= - * ONAP - SO - * ================================================================================ - * Copyright (C) 2017 - 2018 AT&T Intellectual Property. All rights reserved. - * ================================================================================ - * Modifications Copyright (c) 2019 Samsung - * ================================================================================ - * 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.onap.so.adapters.etsisol003adapter; - -import org.onap.so.adapters.etsi.sol003.adapter.common.CommonConstants; -import org.onap.so.security.HttpSecurityConfigurer; -import org.onap.so.security.SoUserCredentialConfiguration; -import org.springframework.beans.factory.annotation.Autowired; -import org.springframework.beans.factory.annotation.Value; -import org.springframework.context.annotation.Primary; -import org.springframework.http.HttpMethod; -import org.springframework.security.config.annotation.web.builders.HttpSecurity; -import org.springframework.stereotype.Component; -import org.springframework.util.StringUtils; - -/** - * @author Waqas Ikram (waqas.ikram@est.tech) - * @author Gareth Roper (gareth.roper@est.tech) - */ -@Primary -@Component -public class EtsiSol003AdapterBasicHttpSecurityConfigurer implements HttpSecurityConfigurer { - - @Autowired - private SoUserCredentialConfiguration soUserCredentialConfiguration; - - @Value("${server.ssl.client-auth:none}") - private String clientAuth; - - @Override - public void configure(final HttpSecurity http) throws Exception { - if (("need").equalsIgnoreCase(clientAuth)) { - http.csrf().disable().authorizeRequests().anyRequest().permitAll(); - } else { - http.csrf().disable().authorizeRequests().antMatchers("/manage/health", "/manage/info").permitAll() - .antMatchers(HttpMethod.GET, CommonConstants.ETSI_SUBSCRIPTION_NOTIFICATION_BASE_URL).permitAll() - .antMatchers("/**") - .hasAnyRole(StringUtils.collectionToDelimitedString(soUserCredentialConfiguration.getRoles(), ",")) - .and().httpBasic(); - } - } -} - -- cgit 1.2.3-korg