You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues-all@impala.apache.org by "ASF subversion and git services (Jira)" <ji...@apache.org> on 2019/12/20 18:25:00 UTC

[jira] [Commented] (IMPALA-9149) Re-enabe Ranger-related tests after bumping up CDP_BUILD_NUMBER

    [ https://issues.apache.org/jira/browse/IMPALA-9149?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17001072#comment-17001072 ] 

ASF subversion and git services commented on IMPALA-9149:
---------------------------------------------------------

Commit 1b4ca58a98a1509e6129132c9645fe059c9079d9 in impala's branch refs/heads/master from Fang-Yu Rao
[ https://gitbox.apache.org/repos/asf?p=impala.git;h=1b4ca58 ]

IMPALA-9149: part 1: Re-enabe Ranger-related FE tests

In IMPALA-9047, we disabled some Ranger-related FE and BE tests due to
changes in Ranger's behavior after upgrading Ranger from 1.2 to 2.0.
This patch aims to re-enable those disabled FE tests in
AuthorizationStmtTest.java and RangerAuditLogTest.java to increase
Impala's test coverage of authorization via Ranger.

There are at least two major changes in Ranger's behavior in the newer
versions.

1. The first is that the owner of the requested resource no longer has
to be explicitly granted privileges in order to access the resource.

2. The second is that a user not explicitly granted the privilege of
creating a database is able to do so.

Due to these changes, some of previous Ranger authorization requests
that were expected to be rejected are now granted after the upgrade.

To re-enable the tests affected by the first change described above, we
modify AuthorizationTestBase.java to allow our FE Ranger authorization
tests to specify the requesting user in an authorization test. Those
tests failed after the upgrade because the default requesting user in
Impala's AuthorizationTestBase.java happens to be the owner of the
resources involved in our FE authorization tests. After this patch, a
requesting user can be either a non-owner user or an owner user in a
Ranger authorization test and the requesting user would correspond to a
non-owner user if it is not explicitly specified. Note that in a Sentry
authorization test, we do not use the non-owner user as the requesting
user by default as we do in the Ranger authorization tests. Instead, we
set the name of the requesting user to a name that is the same as the
owner user in Ranger authorization tests to avoid the need for providing
a customized group mapping service when instantiating a Sentry
ResourceAuthorizationProvider as we do in AuthorizationTest.java, our
FE tests specifically for testing authorization via Sentry.

On the other hand, to re-enable the tests affected by the second change,
we remove from the Ranger policy for all databases the allowed
condition that grants any user the privilege of creating a database,
which is not by default granted by Sentry. After the removal of the
allowed codition, those tests in AuthorizationStmtTest.java and
RangerAuditLogTest.java affected by the second change now result in the
same authorization errors before the upgrade of Ranger.

Testing:
- Passed AuthorizationStmtTest.java in a local dev environment
- Passed RangerAuditLogTest.java in a local dev environment

Change-Id: I228533aae34b9ac03bdbbcd51a380770ff17c7f2
Reviewed-on: http://gerrit.cloudera.org:8080/14798
Reviewed-by: Quanlong Huang <hu...@gmail.com>
Tested-by: Impala Public Jenkins <im...@cloudera.com>


> Re-enabe Ranger-related tests after bumping up CDP_BUILD_NUMBER
> ---------------------------------------------------------------
>
>                 Key: IMPALA-9149
>                 URL: https://issues.apache.org/jira/browse/IMPALA-9149
>             Project: IMPALA
>          Issue Type: Improvement
>          Components: Frontend
>            Reporter: Fang-Yu Rao
>            Assignee: Fang-Yu Rao
>            Priority: Major
>
> In https://issues.apache.org/jira/browse/IMPALA-9047, we temporarily disabled some Ranger tests in the following 4 files due to a change of behavior of new Ranger server (https://issues.apache.org/jira/browse/RANGER-2536). We should re-enable those tests to increase the test coverage of Ranger authorization on Impala.
> # test_authorized_proxy.py
> # test_ranger.py
> # AuthorizationStmtTest.java
> # RangerAuditLogTest.java



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

---------------------------------------------------------------------
To unsubscribe, e-mail: issues-all-unsubscribe@impala.apache.org
For additional commands, e-mail: issues-all-help@impala.apache.org