From 92e3a3fabd55b2548fc041d0283639250c081a22 Mon Sep 17 00:00:00 2001 From: Tu Quoc Tran Date: Wed, 2 Mar 2022 22:30:10 +0700 Subject: [PATCH] FEATURE: MSF-23046 fix log4j issue CVE-2021-44228 --- ci/redshift/pom.xml | 7 +++---- .../cloud_resources/redshift/drivers/.gitkeepme | 0 .../redshift/drivers/log4j.properties | 15 --------------- .../cloud_resources/redshift/redshift_client.rb | 2 -- 4 files changed, 3 insertions(+), 21 deletions(-) create mode 100644 lib/gooddata/cloud_resources/redshift/drivers/.gitkeepme delete mode 100644 lib/gooddata/cloud_resources/redshift/drivers/log4j.properties diff --git a/ci/redshift/pom.xml b/ci/redshift/pom.xml index 7a282a91e..c16cc90a0 100644 --- a/ci/redshift/pom.xml +++ b/ci/redshift/pom.xml @@ -30,10 +30,9 @@ 1.11.633 - log4j - log4j - 1.2.17 - compile + org.slf4j + slf4j-api + 1.7.2 diff --git a/lib/gooddata/cloud_resources/redshift/drivers/.gitkeepme b/lib/gooddata/cloud_resources/redshift/drivers/.gitkeepme new file mode 100644 index 000000000..e69de29bb diff --git a/lib/gooddata/cloud_resources/redshift/drivers/log4j.properties b/lib/gooddata/cloud_resources/redshift/drivers/log4j.properties deleted file mode 100644 index 4ac89baf8..000000000 --- a/lib/gooddata/cloud_resources/redshift/drivers/log4j.properties +++ /dev/null @@ -1,15 +0,0 @@ -# -# Copyright (C) 2007-2019, GoodData(R) Corporation. All rights reserved. -# - -#======================================================================================================================= -# Root Logger -#======================================================================================================================= -#log4j.rootCategory=INFO, Syslog, Console -log4j.rootCategory=INFO - -#======================================================================================================================= -# Logger with Higher Verbosity -#======================================================================================================================= -log4j.logger.com.amazonaws=INFO - diff --git a/lib/gooddata/cloud_resources/redshift/redshift_client.rb b/lib/gooddata/cloud_resources/redshift/redshift_client.rb index 41c58d341..2ad27a128 100644 --- a/lib/gooddata/cloud_resources/redshift/redshift_client.rb +++ b/lib/gooddata/cloud_resources/redshift/redshift_client.rb @@ -39,8 +39,6 @@ def initialize(options = {}) @debug = options['debug'] == true || options['debug'] == 'true' Java.com.amazon.redshift.jdbc42.Driver - base = Pathname(__FILE__).dirname - org.apache.log4j.PropertyConfigurator.configure("#{base}/drivers/log4j.properties") end def realize_query(query, _params)