Upgrade Portal SDK to resolve Security Issues 51/56251/2
authorMichael Mokry <mm117s@att.com>
Wed, 11 Jul 2018 21:13:13 +0000 (16:13 -0500)
committerMichael Mokry <mm117s@att.com>
Thu, 12 Jul 2018 13:52:48 +0000 (08:52 -0500)
Upgraded version in pom to 2.3.1
Added SQL scripts from Portal to Upgrade Portal related db tables
Added SQL downgrade script and license header
Sorted SQL commands in upgrade script by function_cd per Jim

Change-Id: Id6bef295956b6ec5b13d8fbd0006bbfe98c1c0ac
Issue-ID: POLICY-918
Signed-off-by: Mike Mokry <mm117s@att.com>
ONAP-SDK-APP/pom.xml
POLICY-SDK-APP/pom.xml
packages/base/src/files/install/mysql/data/181002_downgrade_script.sql [new file with mode: 0644]
packages/base/src/files/install/mysql/data/181002_upgrade_script.sql [new file with mode: 0644]

index d246de9..ec9bfc2 100644 (file)
@@ -29,7 +29,7 @@
        <packaging>war</packaging>
        <properties>
                <encoding>UTF-8</encoding>
-               <epsdk.version>2.1.0</epsdk.version>
+               <epsdk.version>2.3.1</epsdk.version>
                <springframework.version>4.2.0.RELEASE</springframework.version>
                <hibernate.version>4.3.11.Final</hibernate.version>
                <!-- Skip assembling the zip; assemble via mvn -Dskipassembly=false .. -->
index 9af91f0..7017017 100644 (file)
@@ -68,7 +68,7 @@
        </build>
        <properties>
                <encoding>UTF-8</encoding>
-               <epsdk.version>2.1.0</epsdk.version>
+               <epsdk.version>2.3.1</epsdk.version>
                <springframework.version>4.2.0.RELEASE</springframework.version>
                <hibernate.version>4.3.11.Final</hibernate.version>
                <logback.version>1.2.3</logback.version>
diff --git a/packages/base/src/files/install/mysql/data/181002_downgrade_script.sql b/packages/base/src/files/install/mysql/data/181002_downgrade_script.sql
new file mode 100644 (file)
index 0000000..a2488af
--- /dev/null
@@ -0,0 +1,28 @@
+-- ============LICENSE_START=======================================================
+-- ONAP Policy Engine
+-- ================================================================================
+-- Copyright (C) 2018 AT&T Intellectual Property. All rights reserved.
+-- ================================================================================
+-- Licensed under the Apache License, Version 2.0 (the "License");
+-- you may not use this file except in compliance with the License.
+-- You may obtain a copy of the License at
+--
+--      http://www.apache.org/licenses/LICENSE-2.0
+--
+-- Unless required by applicable law or agreed to in writing, software
+-- distributed under the License is distributed on an "AS IS" BASIS,
+-- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+-- See the License for the specific language governing permissions and
+-- limitations under the License.
+-- ============LICENSE_END=========================================================
+use onap_sdk;
+
+ALTER TABLE fn_function DROP INDEX function;
+
+ALTER TABLE fn_function
+DROP COLUMN type;
+
+ALTER TABLE fn_function
+DROP COLUMN action;
+
+commit;
\ No newline at end of file
diff --git a/packages/base/src/files/install/mysql/data/181002_upgrade_script.sql b/packages/base/src/files/install/mysql/data/181002_upgrade_script.sql
new file mode 100644 (file)
index 0000000..022a311
--- /dev/null
@@ -0,0 +1,72 @@
+-- ============LICENSE_START=======================================================
+-- ONAP Policy Engine
+-- ================================================================================
+-- Copyright (C) 2018 AT&T Intellectual Property. All rights reserved.
+-- ================================================================================
+-- Licensed under the Apache License, Version 2.0 (the "License");
+-- you may not use this file except in compliance with the License.
+-- You may obtain a copy of the License at
+--
+--      http://www.apache.org/licenses/LICENSE-2.0
+--
+-- Unless required by applicable law or agreed to in writing, software
+-- distributed under the License is distributed on an "AS IS" BASIS,
+-- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+-- See the License for the specific language governing permissions and
+-- limitations under the License.
+-- ============LICENSE_END=========================================================
+use onap_sdk;
+
+SET FOREIGN_KEY_CHECKS=0;
+
+alter table fn_function
+add type VARCHAR(20) NOT NULL;
+
+alter table fn_function
+add action VARCHAR(20) NOT NULL;
+
+ALTER TABLE fn_function
+ADD CONSTRAINT function UNIQUE (FUNCTION_CD,TYPE,ACTION);
+
+delete from fn_function where function_cd='1';
+
+update fn_function set type = 'menu' , action = '*' where function_cd = 'menu_process';
+update fn_function set type = 'menu' , action = '*' where function_cd = 'menu_map';
+update fn_function set type = 'menu' , action = '*' where function_cd = 'menu_sample';
+update fn_function set type = 'menu' , action = '*' where function_cd = 'menu_home';
+update fn_function set type = 'menu' , action = '*' where function_cd = 'menu_customer';
+update fn_function set type = 'menu' , action = '*' where function_cd = 'menu_reports';
+update fn_function set type = 'menu' , action = '*' where function_cd = 'menu_admin';
+update fn_function set type = 'menu' , action = '*' where function_cd = 'menu_feedback';
+update fn_function set type = 'menu' , action = '*' where function_cd = 'menu_help';
+update fn_function set type = 'menu' , action = '*' where function_cd = 'menu_logout';
+update fn_function set type = 'menu' , action = '*' where function_cd = 'menu_notes';
+update fn_function set type = 'menu' , action = '*' where function_cd = 'menu_ajax';
+update fn_function set type = 'menu' , action = '*' where function_cd = 'menu_customer_create';
+update fn_function set type = 'menu' , action = '*' where function_cd = 'menu_tab';
+update fn_function set type = 'menu' , action = '*' where function_cd = 'menu_test';
+update fn_function set type = 'menu' , action = '*' where function_cd = 'menu_task';
+update fn_function set type = 'menu' , action = '*' where function_cd = 'menu_task_search';
+update fn_function set type = 'menu' , action = '*' where function_cd = 'menu_profile';
+update fn_function set type = 'menu' , action = '*' where function_cd = 'menu_profile_create';
+update fn_function set type = 'menu' , action = '*' where function_cd = 'menu_profile_import';
+update fn_function set type = 'menu' , action = '*' where function_cd = 'menu_hiveconfig';
+update fn_function set type = 'menu' , action = '*' where function_cd = 'menu_hiveconfig_search';
+update fn_function set type = 'menu' , action = '*' where function_cd = 'menu_hiveconfig_create';
+update fn_function set type = 'menu' , action = '*' where function_cd = 'menu_doclib';
+update fn_function set type = 'menu' , action = '*' where function_cd = 'doclib';
+update fn_function set type = 'menu' , action = '*' where function_cd = 'doclib_admin';
+update fn_function set type = 'menu' , action = '*' where function_cd = 'menu_concept';
+update fn_function set type = 'menu' , action = '*' where function_cd = 'menu_itracker';
+update fn_function set type = 'menu' , action = '*' where function_cd = 'menu_itracker_admin';
+update fn_function set type = 'menu' , action = '*' where function_cd = 'menu_job';
+update fn_function set type = 'menu' , action = '*' where function_cd = 'menu_job_create';
+update fn_function set type = 'menu' , action = '*' where function_cd = 'menu_job_designer';
+update fn_function set type = 'menu' , action = '*' where function_cd = 'menu_mapreduce';
+update fn_function set type = 'menu' , action = '*' where function_cd = 'menu_mapreduce_create';
+update fn_function set type = 'menu' , action = '*' where function_cd = 'menu_mapreduce_search';
+update fn_function set type = 'menu' , action = '*' where function_cd = 'view_reports';
+update fn_function set type = 'url'  , action = '*' where function_cd = 'login';
+update fn_function set type = 'url'  , action = '*' where function_cd = 'quantum_bd';
+    
+commit;
\ No newline at end of file