You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@impala.apache.org by jo...@apache.org on 2019/05/03 21:26:13 UTC
[impala] 03/04: IMPALA-8485: Authorization policy file clean up
This is an automated email from the ASF dual-hosted git repository.
joemcdonnell pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/impala.git
commit 84addd2a4b74454bd929d6b2ada0f501a2c6b0cb
Author: Austin Nobis <an...@cloudera.com>
AuthorDate: Thu May 2 23:53:48 2019 -0500
IMPALA-8485: Authorization policy file clean up
This patch cleans up references to the deprecated authorization_policy_file
flag. The authz-policy.ini file is no longer created during the test config
creation. The reference is also removed from the gitignore.
Testing:
- All FE tests were run
- All authorization E2E tests were run
- test_authorization.py E2E test was updated to no longer have
references to the authz-policy.ini file.
Change-Id: Ib1e90973cb3d5b243844d379e5cdcb2add4eec75
Reviewed-on: http://gerrit.cloudera.org:8080/13222
Reviewed-by: Impala Public Jenkins <im...@cloudera.com>
Tested-by: Impala Public Jenkins <im...@cloudera.com>
---
bin/create-test-configuration.sh | 1 -
fe/.gitignore | 3 ---
tests/authorization/test_authorization.py | 6 ++----
3 files changed, 2 insertions(+), 8 deletions(-)
diff --git a/bin/create-test-configuration.sh b/bin/create-test-configuration.sh
index 936ab9e..208d4f8 100755
--- a/bin/create-test-configuration.sh
+++ b/bin/create-test-configuration.sh
@@ -196,7 +196,6 @@ fi
generate_config log4j.properties.template log4j.properties
generate_config hbase-site.xml.template hbase-site.xml
-generate_config authz-policy.ini.template authz-policy.ini
$IMPALA_HOME/bin/generate_xml_config.py sentry-site.xml.py sentry-site.xml
for SENTRY_VARIANT in oo oo_nogrant no_oo ; do
diff --git a/fe/.gitignore b/fe/.gitignore
index 08d2c7f..fbade49 100644
--- a/fe/.gitignore
+++ b/fe/.gitignore
@@ -28,9 +28,6 @@ src/test/resources/hbase-site.xml
# Generated core-site.xml file
src/test/resources/core-site.xml
-# Generated authorization policy file
-src/test/resources/authz-policy.ini
-
# Generated minicluster config
src/test/resources/minicluster-conf.xml
diff --git a/tests/authorization/test_authorization.py b/tests/authorization/test_authorization.py
index a7e7361..f8ff36f 100644
--- a/tests/authorization/test_authorization.py
+++ b/tests/authorization/test_authorization.py
@@ -41,7 +41,6 @@ from tests.common.file_utils import assert_file_in_dir_contains,\
from tests.hs2.hs2_test_suite import operation_id_to_query_id
from tests.util.filesystem_utils import WAREHOUSE
-AUTH_POLICY_FILE = "%s/authz-policy.ini" % WAREHOUSE
SENTRY_CONFIG_DIR = os.getenv('IMPALA_HOME') + '/fe/src/test/resources/'
SENTRY_CONFIG_FILE = SENTRY_CONFIG_DIR + 'sentry-site.xml'
@@ -230,11 +229,10 @@ class TestAuthorization(CustomClusterTestSuite):
@pytest.mark.execute_serially
@CustomClusterTestSuite.with_args("--server_name=server1\
- --authorization_policy_file=%s\
--authorized_proxy_user_config=foo=bar\
--authorized_proxy_group_config=foo=bar\
--abort_on_failed_audit_event=false\
- --audit_event_log_dir=%s" % (AUTH_POLICY_FILE, AUDIT_LOG_DIR))
+ --audit_event_log_dir=%s" % (AUDIT_LOG_DIR))
def test_no_matching_user_and_group_impersonation(self):
open_session_req = TCLIService.TOpenSessionReq()
open_session_req.username = 'hue'
@@ -387,7 +385,7 @@ class TestAuthorization(CustomClusterTestSuite):
@pytest.mark.execute_serially
@CustomClusterTestSuite.with_args("--server_name=server1\
- --authorization_policy_file=%s" % (AUTH_POLICY_FILE),
+ --authorization_policy_file=ignored_file",
impala_log_dir=tempfile.mkdtemp(prefix="test_deprecated_",
dir=os.getenv("LOG_DIR")))
def test_deprecated_flags(self):