Commit Graph

7 Commits

Author SHA1 Message Date
Adam Holley
7002ad3b35 IMPALA-7398: Add logged_in_user alias for effective_user
This patch adds an alias to the effective_user function so that
views created in Hive using the logged_in_user function will work
in Impala.

Example:
CREATE VIEW foo.view1 AS SELECT * FROM foo.table1 WHERE
name=logged_in_user();

Tests:
- Added function and ran delegation tests
- Ran backend tests
- Ran custom-cluster tests including delegation

Change-Id: Id63f243e0fffbe2798f1f9dbc4cc3ebe9d9529a6
Reviewed-on: http://gerrit.cloudera.org:8080/11184
Reviewed-by: Impala Public Jenkins <impala-public-jenkins@cloudera.com>
Tested-by: Impala Public Jenkins <impala-public-jenkins@cloudera.com>
2018-08-11 06:02:52 +00:00
Zoltan Ivanfi
c23dc3a53a IMPALA-1659: Netezza compatibility functions: metadata
Added the SQL functions current_catalog(), current_user() and session_user() as
aliases to existing ones and a new SQL function current_sid().

Change-Id: I9b5d1009bbf42acc175a942d2df484e1c64822ca
Reviewed-on: http://gerrit.cloudera.org:8080/4063
Reviewed-by: Tim Armstrong <tarmstrong@cloudera.com>
Reviewed-by: Marcel Kornacker <marcel@cloudera.com>
Tested-by: Internal Jenkins
2016-08-26 16:29:24 +00:00
Dan Hecht
ffa7829b70 IMPALA-3918: Remove Cloudera copyrights and add ASF license header
For files that have a Cloudera copyright (and no other copyright
notice), make changes to follow the ASF source file header policy here:

http://www.apache.org/legal/src-headers.html#headers

Specifically:
1) Remove the Cloudera copyright.
2) Modify NOTICE.txt according to
   http://www.apache.org/legal/src-headers.html#notice
   to follow that format and add a line for Cloudera.
3) Replace or add the existing ASF license text with the one given
   on the website.

Much of this change was automatically generated via:

git grep -li 'Copyright.*Cloudera' > modified_files.txt
cat modified_files.txt | xargs perl -n -i -e 'print unless m#Copyright.*Cloudera#i;'
cat modified_files_txt | xargs fix_apache_license.py [1]

Some manual fixups were performed following those steps, especially when
license text was completely missing from the file.

[1] https://gist.github.com/anonymous/ff71292094362fc5c594 with minor
    modification to ORIG_LICENSE to match Impala's license text.

Change-Id: I2e0bd8420945b953e1b806041bea4d72a3943d86
Reviewed-on: http://gerrit.cloudera.org:8080/3779
Reviewed-by: Dan Hecht <dhecht@cloudera.com>
Tested-by: Internal Jenkins
2016-08-09 08:19:41 +00:00
Taras Bobrovytsky
609b80410e Clean up Python test import statements
Many of our test scripts have import statements that look like
"from xxx import *". It is a good practice to explicitly name what
needs to be imported. This commit implements this practice. Also,
unused import statements are removed.

Change-Id: I6a33bb66552ae657d1725f765842f648faeb26a8
Reviewed-on: http://gerrit.cloudera.org:8080/3444
Reviewed-by: Michael Brown <mikeb@cloudera.com>
Tested-by: Internal Jenkins
2016-07-15 23:26:18 +00:00
Casey Ching
074e5b4349 Remove hashbang from non-script python files
Many python files had a hashbang and the executable bit set though
they were not intended to be run a standalone script. That makes
determining which python files are actually scripts very difficult.
A future patch will update the hashbang in real python scripts so they
use $IMPALA_HOME/bin/impala-python.

Change-Id: I04eafdc73201feefe65b85817a00474e182ec2ba
Reviewed-on: http://gerrit.cloudera.org:8080/599
Reviewed-by: Casey Ching <casey@cloudera.com>
Reviewed-by: Taras Bobrovytsky <tbobrovytsky@cloudera.com>
Tested-by: Internal Jenkins
2015-08-04 05:26:07 +00:00
Sailesh Mukil
e61782249e IMPALA-1870: Support users containing commas in --authorized_proxy_user_config
This patch adds a '--authorized_user_proxy_config_delimiter' flag which can specify a delimiter with which
'--authorized_user_proxy_config' separates proxy users. If it is not specified, it defaults to comma.
If it is specified and made blank, then it will not separate proxy users.

Eg:
--authorized_user_proxy_config="user1=proxy1/proxy2/prox,y3;user2=proxy4"
--authorized_user_proxy_config_delimiter=/

The proxies for user1 are:
-proxy1
-proxy2
-prox,y3

Change-Id: Ifd87413e173677f872151820cbcda71088c90c0a
Reviewed-on: http://gerrit.cloudera.org:8080/477
Reviewed-by: Henry Robinson <henry@cloudera.com>
Tested-by: Internal Jenkins
2015-06-20 02:44:55 +00:00
Henry Robinson
79913b01e6 IMPALA-2064: Add effective_user() builtin
The user() builtin always returns the connecteduser. However, if the
client wants to see which user its queries are actually delegated to,
there was no easy way to do that.

This patch adds effective_user(), which returns the proxy delegated user
for authorization purposes. If no delegated user is set, the effective
user is the same as that returned from user().

The only way to test this is via a new custom cluster test, which sets
impala.doas.user so that the effective user might be different from the
connected one.

Change-Id: I7048c27c6808a6986dbe1246929816176dca9f76
Reviewed-on: http://gerrit.cloudera.org:8080/458
Reviewed-by: Henry Robinson <henry@cloudera.com>
Tested-by: Internal Jenkins
2015-06-16 23:42:40 +00:00