aboutsummaryrefslogtreecommitdiffstats
path: root/catalog-be
diff options
context:
space:
mode:
Diffstat (limited to 'catalog-be')
-rw-r--r--catalog-be/pom.xml2
-rw-r--r--catalog-be/sdc-backend/chef-repo/cookbooks/sdc-catalog-be/attributes/default.rb7
-rw-r--r--catalog-be/sdc-backend/chef-repo/cookbooks/sdc-catalog-be/recipes/BE_6_setup_portal_and_key_properties.rb24
-rw-r--r--catalog-be/sdc-backend/chef-repo/cookbooks/sdc-catalog-be/recipes/BE_6_setup_portal_properties.rb17
-rw-r--r--catalog-be/sdc-backend/chef-repo/cookbooks/sdc-catalog-be/templates/default/BE-key.properties.erb41
-rw-r--r--catalog-be/sdc-backend/chef-repo/cookbooks/sdc-catalog-be/templates/default/BE-portal.properties.erb81
-rw-r--r--catalog-be/sdc-backend/chef-solo/roles/catalog-be.json2
-rw-r--r--catalog-be/src/main/java/org/openecomp/sdc/be/ecomp/EcompIntImpl.java39
-rw-r--r--catalog-be/src/main/java/org/openecomp/sdc/be/ecomp/converters/EcompRoleConverter.java2
-rw-r--r--catalog-be/src/main/java/org/openecomp/sdc/be/ecomp/converters/EcompUserConverter.java5
-rw-r--r--catalog-be/src/main/resources/key.properties41
-rw-r--r--catalog-be/src/main/resources/portal.properties97
-rw-r--r--catalog-be/src/main/resources/portal.properties.old25
-rw-r--r--catalog-be/src/main/webapp/WEB-INF/web.xml2
-rw-r--r--catalog-be/src/test/java/org/openecomp/sdc/be/ecomp/EcompIntImplTest.java10
-rw-r--r--catalog-be/src/test/java/org/openecomp/sdc/be/ecomp/converters/EcompRoleConverterTest.java2
-rw-r--r--catalog-be/src/test/java/org/openecomp/sdc/be/ecomp/converters/EcompUserConverterTest.java6
17 files changed, 314 insertions, 89 deletions
diff --git a/catalog-be/pom.xml b/catalog-be/pom.xml
index a90f5f2abb..5248f48d8c 100644
--- a/catalog-be/pom.xml
+++ b/catalog-be/pom.xml
@@ -430,7 +430,7 @@
<!-- Inserted for ECOMP Portal Integration -->
<dependency>
- <groupId>org.openecomp.ecompsdkos</groupId>
+ <groupId>org.onap.portal.sdk</groupId>
<artifactId>epsdk-fw</artifactId>
<version>${ecomp.version}</version>
<scope>compile</scope>
diff --git a/catalog-be/sdc-backend/chef-repo/cookbooks/sdc-catalog-be/attributes/default.rb b/catalog-be/sdc-backend/chef-repo/cookbooks/sdc-catalog-be/attributes/default.rb
index 49ac86aaec..d1d6f642fd 100644
--- a/catalog-be/sdc-backend/chef-repo/cookbooks/sdc-catalog-be/attributes/default.rb
+++ b/catalog-be/sdc-backend/chef-repo/cookbooks/sdc-catalog-be/attributes/default.rb
@@ -35,4 +35,9 @@ default['UEB']['SecretKey'] = "4ZRPzNJfEUK0sSNBvccd2m7X"
default['Pair_EnvName'] = ""
#DmaapConsumer
-default['DMAAP']['active'] = false \ No newline at end of file
+default['DMAAP']['active'] = false
+
+#Portal
+default['ECompP']['cipher_key'] = "AGLDdG4D04BKm2IxIWEr8o=="
+default['ECompP']['portal_user'] = "Ipwxi2oLvDxctMA1royaRw1W0jhucLx+grHzci3ePIA="
+default['ECompP']['portal_pass'] = "j85yNhyIs7zKYbR1VlwEfNhS6b7Om4l0Gx5O8931sCI=" \ No newline at end of file
diff --git a/catalog-be/sdc-backend/chef-repo/cookbooks/sdc-catalog-be/recipes/BE_6_setup_portal_and_key_properties.rb b/catalog-be/sdc-backend/chef-repo/cookbooks/sdc-catalog-be/recipes/BE_6_setup_portal_and_key_properties.rb
new file mode 100644
index 0000000000..bf724ded5f
--- /dev/null
+++ b/catalog-be/sdc-backend/chef-repo/cookbooks/sdc-catalog-be/recipes/BE_6_setup_portal_and_key_properties.rb
@@ -0,0 +1,24 @@
+template "template portal.properties" do
+ path "#{ENV['JETTY_BASE']}/resources/portal.properties"
+ source "BE-portal.properties.erb"
+ owner "jetty"
+ group "jetty"
+ mode "0755"
+ variables ({
+ :ecomp_rest_url => node['ECompP']['ecomp_rest_url'],
+ :ecomp_redirect_url => node['ECompP']['ecomp_redirect_url'],
+ :ecomp_portal_user => node['ECompP']['portal_user'],
+ :ecomp_portal_pass => node['ECompP']['portal_pass']
+ })
+end
+
+template "template key.properties" do
+ path "#{ENV['JETTY_BASE']}/resources/key.properties"
+ source "BE-key.properties.erb"
+ owner "jetty"
+ group "jetty"
+ mode "0755"
+ variables ({
+ :cipher_key => node['ECompP']['cipher_key']
+ })
+end \ No newline at end of file
diff --git a/catalog-be/sdc-backend/chef-repo/cookbooks/sdc-catalog-be/recipes/BE_6_setup_portal_properties.rb b/catalog-be/sdc-backend/chef-repo/cookbooks/sdc-catalog-be/recipes/BE_6_setup_portal_properties.rb
deleted file mode 100644
index 912ddf7dc0..0000000000
--- a/catalog-be/sdc-backend/chef-repo/cookbooks/sdc-catalog-be/recipes/BE_6_setup_portal_properties.rb
+++ /dev/null
@@ -1,17 +0,0 @@
-template "template portal.properties" do
- path "#{ENV['JETTY_BASE']}/resources/portal.properties"
- source "BE-portal.properties.erb"
- owner "jetty"
- group "jetty"
- mode "0755"
- variables ({
- :ecomp_rest_url => node['ECompP']['ecomp_rest_url'],
- :ecomp_redirect_url => node['ECompP']['ecomp_redirect_url'],
- :ueb_url_list => node['ECompP']['ueb_url_list'],
- :inbox_name => node['ECompP']['inbox_name'],
- :app_key => node['ECompP']['app_key'],
- :app_secret => node['ECompP']['app_secret'],
- :app_topic_name => node['ECompP']['app_topic_name'],
- :decrypt_key => node['ECompP']['decryption_key']
- })
-end
diff --git a/catalog-be/sdc-backend/chef-repo/cookbooks/sdc-catalog-be/templates/default/BE-key.properties.erb b/catalog-be/sdc-backend/chef-repo/cookbooks/sdc-catalog-be/templates/default/BE-key.properties.erb
new file mode 100644
index 0000000000..007a36e350
--- /dev/null
+++ b/catalog-be/sdc-backend/chef-repo/cookbooks/sdc-catalog-be/templates/default/BE-key.properties.erb
@@ -0,0 +1,41 @@
+###
+# ============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============================================
+#
+#
+###
+
+# Properties read by the ECOMP Framework library (epsdk-fw)
+
+cipher.enc.key = <%= @cipher_key %> \ No newline at end of file
diff --git a/catalog-be/sdc-backend/chef-repo/cookbooks/sdc-catalog-be/templates/default/BE-portal.properties.erb b/catalog-be/sdc-backend/chef-repo/cookbooks/sdc-catalog-be/templates/default/BE-portal.properties.erb
index 4f23cb827f..bf58f77d9f 100644
--- a/catalog-be/sdc-backend/chef-repo/cookbooks/sdc-catalog-be/templates/default/BE-portal.properties.erb
+++ b/catalog-be/sdc-backend/chef-repo/cookbooks/sdc-catalog-be/templates/default/BE-portal.properties.erb
@@ -1,32 +1,67 @@
-# Portal REST URL, ends "/auxapi"
-ecomp_rest_url = <%= @ecomp_rest_url %>
-
-# Java implementation of interface
-portal.api.impl.class = org.openecomp.sdc.be.ecomp.EcompIntImpl
+###
+# ============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============================================
+#
+#
+###
+# Properties read by ECOMP Framework library, ecompFW.jar
-# CSP-SSO URL
-
-ecomp_redirect_url = <%= @ecomp_redirect_url %>
+##########################################################################
+# The following properties should NOT be changed by partner applications.
+##########################################################################
-# Comma-separated list of UEB server names
+portal.api.prefix = /api
+max.idle.time = 5
+user.attribute.name = user_attribute
-ueb_url_list = <%= @ueb_url_list %>
+#Use REST API instead of UEB to fetch the functional menu data
+use_rest_for_functional_menu=true
-# UEB topic where Portal listens
-ecomp_portal_inbox_name = <%= @inbox_name %>
-# UEB key generated while on-boarding
-ueb_app_key = <%= @app_key %>
+##########################################################################
+# The following properties MUST be changed by partner applications.
+##########################################################################
-# UEB secret generated while on-boarding
-ueb_app_secret = <%= @app_secret %>
-
-# UEB topic where App listens
-ueb_app_mailbox_name = <%= @app_topic_name %>
+# Name of java class that implements the OnBoardingApiService interface.
+portal.api.impl.class = org.openecomp.sdc.be.ecomp.EcompIntImpl
-# Consumer group name; most Apps should use {UUID}
-ueb_app_consumer_group_name = {UUID}
+# URL of the Portal where this app is onboarded
+ecomp_redirect_url = <%= @ecomp_redirect_url %>
-ueb_listeners_enable = true
+# URL of the ECOMP Portal REST API
+ecomp_rest_url = <%= @ecomp_rest_url %>
+#Portal user & key
+portal_user = <%= @ecomp_portal_user %>
+portal_pass = <%= @ecomp_portal_pass %>
-decryption_key = <%= @decrypt_key %>
diff --git a/catalog-be/sdc-backend/chef-solo/roles/catalog-be.json b/catalog-be/sdc-backend/chef-solo/roles/catalog-be.json
index b8fe325e64..b3171ad3f2 100644
--- a/catalog-be/sdc-backend/chef-solo/roles/catalog-be.json
+++ b/catalog-be/sdc-backend/chef-solo/roles/catalog-be.json
@@ -15,7 +15,7 @@
"recipe[sdc-catalog-be::BE_3_locate_keystore]",
"recipe[sdc-catalog-be::BE_4_jetty_Modules]",
"recipe[sdc-catalog-be::BE_5_setup_elasticsearch]",
- "recipe[sdc-catalog-be::BE_6_setup_portal_properties]",
+ "recipe[sdc-catalog-be::BE_6_setup_portal_and_key_properties]",
"recipe[sdc-catalog-be::BE_7_logback]",
"recipe[sdc-catalog-be::BE_8_errors_config]",
"recipe[sdc-catalog-be::BE_9_prepareProbeFile]"
diff --git a/catalog-be/src/main/java/org/openecomp/sdc/be/ecomp/EcompIntImpl.java b/catalog-be/src/main/java/org/openecomp/sdc/be/ecomp/EcompIntImpl.java
index 757c3a48d4..50d48d4ca7 100644
--- a/catalog-be/src/main/java/org/openecomp/sdc/be/ecomp/EcompIntImpl.java
+++ b/catalog-be/src/main/java/org/openecomp/sdc/be/ecomp/EcompIntImpl.java
@@ -21,10 +21,16 @@
package org.openecomp.sdc.be.ecomp;
import fj.data.Either;
-import org.openecomp.portalsdk.core.onboarding.crossapi.IPortalRestAPIService;
-import org.openecomp.portalsdk.core.onboarding.exception.PortalAPIException;
-import org.openecomp.portalsdk.core.restful.domain.EcompRole;
-import org.openecomp.portalsdk.core.restful.domain.EcompUser;
+import org.onap.portalsdk.core.onboarding.crossapi.IPortalRestAPIService;
+import org.onap.portalsdk.core.onboarding.crossapi.IPortalRestCentralService;
+import org.onap.portalsdk.core.onboarding.exception.CipherUtilException;
+import org.onap.portalsdk.core.onboarding.exception.PortalAPIException;
+import org.onap.portalsdk.core.onboarding.util.CipherUtil;
+import org.onap.portalsdk.core.onboarding.util.KeyConstants;
+import org.onap.portalsdk.core.onboarding.util.KeyProperties;
+import org.onap.portalsdk.core.onboarding.util.PortalApiProperties;
+import org.onap.portalsdk.core.restful.domain.EcompRole;
+import org.onap.portalsdk.core.restful.domain.EcompUser;
import org.openecomp.sdc.be.config.BeEcompErrorManager;
import org.openecomp.sdc.be.config.BeEcompErrorManager.ErrorSeverity;
import org.openecomp.sdc.be.dao.api.ActionStatus;
@@ -40,8 +46,10 @@ import org.springframework.context.ApplicationContext;
import org.springframework.web.context.ContextLoader;
import javax.servlet.http.HttpServletRequest;
+import java.util.HashMap;
import java.util.LinkedList;
import java.util.List;
+import java.util.Map;
public class EcompIntImpl implements IPortalRestAPIService {
@@ -265,7 +273,7 @@ public class EcompIntImpl implements IPortalRestAPIService {
}
@Override
- public List<EcompRole> getAvailableRoles() throws PortalAPIException {
+ public List<EcompRole> getAvailableRoles(String requestedLoginId) throws PortalAPIException {
log.debug("Start handle request of ECOMP getAvailableRoles");
try {
List<EcompRole> ecompRolesList = new LinkedList<>();
@@ -372,14 +380,21 @@ public class EcompIntImpl implements IPortalRestAPIService {
@Override
public boolean isAppAuthenticated(HttpServletRequest request) throws PortalAPIException {
- // TODO Validation should be changed completely
+ final String portal_key = PortalApiProperties.getProperty("portal_pass");
+ final String portal_user = PortalApiProperties.getProperty("portal_user");
final String USERNAME = request.getHeader("username");
final String PASSWORD = request.getHeader("password");
if (USERNAME != null && PASSWORD != null) {
- if (!USERNAME.equals("") && !PASSWORD.equals("")) {
- log.debug("User authenticated - Username: ,Password: {}", USERNAME, PASSWORD);
- return true;
+ try {
+ if (CipherUtil.decryptPKC(USERNAME).equals(CipherUtil.decryptPKC(portal_user)) &&
+ CipherUtil.decryptPKC(PASSWORD).equals(CipherUtil.decryptPKC(portal_key))) {
+ log.debug("User authenticated - Username: {}", USERNAME);
+ return true;
+ }
+ } catch (CipherUtilException e) {
+ log.debug("User authentication failed - Decryption failed", e);
+ return false;
}
}
@@ -415,4 +430,10 @@ public class EcompIntImpl implements IPortalRestAPIService {
public String getUserId(HttpServletRequest request) throws PortalAPIException {
return request.getHeader(Constants.USER_ID_HEADER);
}
+
+ //TODO for what the following method stands for
+ @Override
+ public Map<String, String> getCredentials() throws PortalAPIException {
+ return null;
+ }
}
diff --git a/catalog-be/src/main/java/org/openecomp/sdc/be/ecomp/converters/EcompRoleConverter.java b/catalog-be/src/main/java/org/openecomp/sdc/be/ecomp/converters/EcompRoleConverter.java
index aebc9170f1..df20351fd8 100644
--- a/catalog-be/src/main/java/org/openecomp/sdc/be/ecomp/converters/EcompRoleConverter.java
+++ b/catalog-be/src/main/java/org/openecomp/sdc/be/ecomp/converters/EcompRoleConverter.java
@@ -20,7 +20,7 @@
package org.openecomp.sdc.be.ecomp.converters;
-import org.openecomp.portalsdk.core.restful.domain.EcompRole;
+import org.onap.portalsdk.core.restful.domain.EcompRole;
import org.openecomp.sdc.be.user.Role;
import org.openecomp.sdc.common.log.wrappers.Logger;
diff --git a/catalog-be/src/main/java/org/openecomp/sdc/be/ecomp/converters/EcompUserConverter.java b/catalog-be/src/main/java/org/openecomp/sdc/be/ecomp/converters/EcompUserConverter.java
index 0297abeacb..61b29a3986 100644
--- a/catalog-be/src/main/java/org/openecomp/sdc/be/ecomp/converters/EcompUserConverter.java
+++ b/catalog-be/src/main/java/org/openecomp/sdc/be/ecomp/converters/EcompUserConverter.java
@@ -21,8 +21,9 @@
package org.openecomp.sdc.be.ecomp.converters;
import fj.data.Either;
-import org.openecomp.portalsdk.core.restful.domain.EcompRole;
-import org.openecomp.portalsdk.core.restful.domain.EcompUser;
+
+import org.onap.portalsdk.core.restful.domain.EcompRole;
+import org.onap.portalsdk.core.restful.domain.EcompUser;
import org.openecomp.sdc.be.dao.utils.UserStatusEnum;
import org.openecomp.sdc.be.model.User;
import org.openecomp.sdc.be.user.Role;
diff --git a/catalog-be/src/main/resources/key.properties b/catalog-be/src/main/resources/key.properties
new file mode 100644
index 0000000000..0315075e53
--- /dev/null
+++ b/catalog-be/src/main/resources/key.properties
@@ -0,0 +1,41 @@
+###
+# ============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============================================
+#
+#
+###
+
+# Properties read by the ECOMP Framework library (epsdk-fw)
+
+cipher.enc.key = AGLDdG4D04BKm2IxIWEr8o== \ No newline at end of file
diff --git a/catalog-be/src/main/resources/portal.properties b/catalog-be/src/main/resources/portal.properties
index c67261f962..fbedd05028 100644
--- a/catalog-be/src/main/resources/portal.properties
+++ b/catalog-be/src/main/resources/portal.properties
@@ -1,25 +1,76 @@
-# Portal REST URL, ends "/auxapi"
-ecomp_rest_url = https://ecomp.homer.att.com/ecompportal/auxapi
-
-# Java implementation of interface
+###
+# ============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============================================
+#
+#
+###
+# Properties read by ECOMP Framework library, ecompFW.jar
+
+##########################################################################
+# The following properties should NOT be changed by partner applications.
+##########################################################################
+
+portal.api.prefix = /api
+max.idle.time = 5
+user.attribute.name = user_attribute
+
+#Use REST API instead of UEB to fetch the functional menu data
+use_rest_for_functional_menu=true
+
+##########################################################################
+# The following properties MUST be changed by partner applications.
+##########################################################################
+
+# Name of java class that implements the OnBoardingApiService interface.
portal.api.impl.class = org.openecomp.sdc.be.ecomp.EcompIntImpl
-# CSP-SSO URL
-ecomp_redirect_url = https://www.e-access.att.com/ecomp_portal_ist/ecompportal/process_csp
-# Cookie set by CSP-SSO
-csp_cookie_name = attESSec
-# CSP setting, most use PROD; DEV also recognized
-csp_gate_keeper_prod_key = PROD
-
-# Comma-separated list of UEB server names
-ueb_url_list = uebsb91kcdc.it.att.com,uebsb92kcdc.it.att.com,uebsb93kcdc.it.att.com
-# UEB topic where Portal listens
-ecomp_portal_inbox_name = ECOMP-PORTAL-INBOX-TEST
-# UEB key generated while on-boarding
-ueb_app_key = app_key_here
-# UEB secret generated while on-boarding
-ueb_app_secret = app_secret_here
-# UEB topic where App listens
-ueb_app_mailbox_name = app_topic_name_here
-# Consumer group name; most Apps should use {UUID}
-ueb_app_consumer_group_name = {UUID} \ No newline at end of file
+# URL of the Portal where this app is onboarded
+ecomp_redirect_url = http://portal.api.simpledemo.onap.org:8989/ONAPPORTAL/login.htm
+
+# URL of the ECOMP Portal REST API
+ecomp_rest_url = http://portal.api.simpledemo.onap.org:8989/ecompportal/auxapi
+
+# Applications do not need to run a UEB listener after 1607.
+ueb_listeners_enable = false
+
+#Portal user & key
+portal_user = Ipwxi2oLvDxctMA1royaRw1W0jhucLx+grHzci3ePIA=
+portal_pass = j85yNhyIs7zKYbR1VlwEfNhS6b7Om4l0Gx5O8931sCI=
+
+# UEB Configuration
+# If key ueb_listeners_enable is set to false,
+# then only the ueb_app_key is required.
+ueb_app_key = REPLACE-ME-UEB-APP-KEY-EPSDK-APP-OS
+
+
diff --git a/catalog-be/src/main/resources/portal.properties.old b/catalog-be/src/main/resources/portal.properties.old
new file mode 100644
index 0000000000..df59ba392d
--- /dev/null
+++ b/catalog-be/src/main/resources/portal.properties.old
@@ -0,0 +1,25 @@
+# Portal REST URL, ends "/auxapi"
+ecomp_rest_url = https://ecomp.homer.att.com/ecompportal/auxapi
+
+# Java implementation of interface
+portal.api.impl.class = org.openecomp.sdc.be.ecomp.EcompIntImpl
+
+# CSP-SSO URL
+ecomp_redirect_url = https://www.e-access.att.com/ecomp_portal_ist/ecompportal/process_csp
+# Cookie set by CSP-SSO
+csp_cookie_name = attESSec
+# CSP setting, most use PROD; DEV also recognized
+csp_gate_keeper_prod_key = PROD
+
+# Comma-separated list of UEB server names
+ueb_url_list = uebsb91kcdc.it.att.com,uebsb92kcdc.it.att.com,uebsb93kcdc.it.att.com
+# UEB topic where Portal listens
+ecomp_portal_inbox_name = ECOMP-PORTAL-INBOX-TEST
+# UEB key generated while on-boarding
+ueb_app_key = app_key_here
+# UEB secret generated while on-boarding
+ueb_app_secret = app_secret_here
+# UEB topic where App listens
+ueb_app_mailbox_name = app_topic_name_here
+# Consumer group name; most Apps should use {UUID}
+ueb_app_consumer_group_name = {UUID} \ No newline at end of file
diff --git a/catalog-be/src/main/webapp/WEB-INF/web.xml b/catalog-be/src/main/webapp/WEB-INF/web.xml
index 74092fe9cb..93c5194c0c 100644
--- a/catalog-be/src/main/webapp/WEB-INF/web.xml
+++ b/catalog-be/src/main/webapp/WEB-INF/web.xml
@@ -151,7 +151,7 @@
<!-- ECOMP Portal -->
<servlet>
<servlet-name>ECOMPServlet</servlet-name>
- <servlet-class>org.openecomp.portalsdk.core.onboarding.crossapi.PortalRestAPIProxy</servlet-class>
+ <servlet-class>org.onap.portalsdk.core.onboarding.crossapi.PortalRestAPIProxy</servlet-class>
<load-on-startup>3</load-on-startup>
<async-supported>true</async-supported>
</servlet>
diff --git a/catalog-be/src/test/java/org/openecomp/sdc/be/ecomp/EcompIntImplTest.java b/catalog-be/src/test/java/org/openecomp/sdc/be/ecomp/EcompIntImplTest.java
index e4e13d6477..fd5bbdb74a 100644
--- a/catalog-be/src/test/java/org/openecomp/sdc/be/ecomp/EcompIntImplTest.java
+++ b/catalog-be/src/test/java/org/openecomp/sdc/be/ecomp/EcompIntImplTest.java
@@ -2,9 +2,9 @@ package org.openecomp.sdc.be.ecomp;
import org.junit.Test;
import org.mockito.Mockito;
-import org.openecomp.portalsdk.core.onboarding.exception.PortalAPIException;
-import org.openecomp.portalsdk.core.restful.domain.EcompRole;
-import org.openecomp.portalsdk.core.restful.domain.EcompUser;
+import org.onap.portalsdk.core.onboarding.exception.PortalAPIException;
+import org.onap.portalsdk.core.restful.domain.EcompRole;
+import org.onap.portalsdk.core.restful.domain.EcompUser;
import javax.servlet.http.HttpServletRequest;
import java.util.List;
@@ -64,10 +64,10 @@ public class EcompIntImplTest {
// default test
testSubject = createTestSubject();
- result = testSubject.getAvailableRoles();
+ result = testSubject.getAvailableRoles("Mock");
}
- @Test(expected=PortalAPIException.class)
+ @Test(expected= PortalAPIException.class)
public void testGetUserRoles() throws Exception {
EcompIntImpl testSubject;
String loginId = "";
diff --git a/catalog-be/src/test/java/org/openecomp/sdc/be/ecomp/converters/EcompRoleConverterTest.java b/catalog-be/src/test/java/org/openecomp/sdc/be/ecomp/converters/EcompRoleConverterTest.java
index 528b9b6b69..53d8d5f7c6 100644
--- a/catalog-be/src/test/java/org/openecomp/sdc/be/ecomp/converters/EcompRoleConverterTest.java
+++ b/catalog-be/src/test/java/org/openecomp/sdc/be/ecomp/converters/EcompRoleConverterTest.java
@@ -1,7 +1,7 @@
package org.openecomp.sdc.be.ecomp.converters;
import org.junit.Test;
-import org.openecomp.portalsdk.core.restful.domain.EcompRole;
+import org.onap.portalsdk.core.restful.domain.EcompRole;
import org.openecomp.sdc.be.user.Role;
public class EcompRoleConverterTest {
diff --git a/catalog-be/src/test/java/org/openecomp/sdc/be/ecomp/converters/EcompUserConverterTest.java b/catalog-be/src/test/java/org/openecomp/sdc/be/ecomp/converters/EcompUserConverterTest.java
index 91cf1417dd..301de32f6f 100644
--- a/catalog-be/src/test/java/org/openecomp/sdc/be/ecomp/converters/EcompUserConverterTest.java
+++ b/catalog-be/src/test/java/org/openecomp/sdc/be/ecomp/converters/EcompUserConverterTest.java
@@ -1,13 +1,11 @@
package org.openecomp.sdc.be.ecomp.converters;
import fj.data.Either;
-import fj.data.Either;
import org.junit.Test;
-import org.openecomp.portalsdk.core.restful.domain.EcompRole;
-import org.openecomp.portalsdk.core.restful.domain.EcompUser;
+import org.onap.portalsdk.core.restful.domain.EcompRole;
+import org.onap.portalsdk.core.restful.domain.EcompUser;
import org.openecomp.sdc.be.model.User;
-
import java.util.Collections;
import static org.assertj.core.api.AssertionsForClassTypes.assertThat;