remove mariadb superuser sql statements 59/33259/1
authorJorge Hernandez <jh1730@att.com>
Tue, 27 Feb 2018 21:14:14 +0000 (15:14 -0600)
committerJorge Hernandez <jh1730@att.com>
Tue, 27 Feb 2018 21:14:14 +0000 (15:14 -0600)
PE installation as part of data upgrade invokes
"set global" statements that are typically used
by priviledged accounts as the "root" mariadb user.

As part of the effort to clean up the mariadb docker install,
only permissions to a regular mariadb user (policy_user by default)
are given in 3 databases: onap_sdk, log, and support.
This account cannot do changes outside those.

In any case the usage of the global timeouts is questionable.
We should keep an eye if there's any potential bad side effect,
and correct it if it doesn't.   It's preferable to keep
"policy_user" with a restricted set of privileges, instead
of being a superuser (otherwise can plainly user the root account).

Change-Id: I17b1a6a2cb62a319464e1db4b3aafbc1dbf20d78
Issue-ID: POLICY-650
Signed-off-by: Jorge Hernandez <jh1730@att.com>
packages/base/src/files/install/mysql/data/161000_upgrade_script.sql

index 4c64c64..fe9aec9 100755 (executable)
@@ -48,9 +48,6 @@ set foreign_key_checks=0;
 -- Increasing the Database variable timeouts
 --
 
-set global wait_timeout=2147483;   
-set global interactive_timeout=2147483;
-
 set wait_timeout=2147483;   
 set interactive_timeout=2147483;
 
@@ -6364,4 +6361,4 @@ INSERT INTO `risktype` VALUES (1,'demo','2016-12-29 20:20:48','demo','SampleRisk
 insert into sequence (seq_name, seq_count) values ('SEQ_GEN', 3050); 
 
 set foreign_key_checks=1; 
-commit; 
\ No newline at end of file
+commit;