Wenzhe Zhou has submitted this change and it was merged. ( http://gerrit.cloudera.org:8080/20691 )
Change subject: IMPALA-12552: Fix Kerberos authentication issue that occurs in python 3 environment when kerberos_host_fqdn option is used ...................................................................... IMPALA-12552: Fix Kerberos authentication issue that occurs in python 3 environment when kerberos_host_fqdn option is used In Pyhton 2, the sasl layer does not accept unicode strings, so we have to explicitly encode the kerberos_host_fqdn string to ascii. However, this is not the case in python 3, where we have to omit the encode, because if we don't do this, impala-shell wants to use the following service principal during Kerberos auth: my_service_name/b'my.kerberos.host.fqdn'@MY.REALM instead of the correct one, which is: my_service_name/[email protected] (This is because the output of the encode function is a byte array in python 3.) Tested with new unit tests and with a snapshot build manually in CDP PVC DS. Change-Id: I8b157d76824ad67faf531a529256a8afe2ab9d49 Reviewed-on: http://gerrit.cloudera.org:8080/20691 Reviewed-by: Michael Smith <[email protected]> Tested-by: Impala Public Jenkins <[email protected]> Reviewed-by: Wenzhe Zhou <[email protected]> --- M fe/src/test/java/org/apache/impala/customcluster/KerberosKdcEnvironment.java M fe/src/test/java/org/apache/impala/customcluster/LdapKerberosImpalaShellTest.java M fe/src/test/java/org/apache/impala/customcluster/RunShellCommand.java M infra/python/deps/py2-requirements.txt M infra/python/deps/py3-requirements.txt M shell/impala_client.py A shell/kerberos_util.py M shell/make_shell_tarball.sh M shell/packaging/make_python_package.sh A tests/shell/test_kerberos_util.py A tests/shell/test_shell_commandline_kerberos_auth.py 11 files changed, 255 insertions(+), 10 deletions(-) Approvals: Michael Smith: Looks good to me, but someone else must approve Impala Public Jenkins: Verified Wenzhe Zhou: Looks good to me, approved -- To view, visit http://gerrit.cloudera.org:8080/20691 To unsubscribe, visit http://gerrit.cloudera.org:8080/settings Gerrit-Project: Impala-ASF Gerrit-Branch: master Gerrit-MessageType: merged Gerrit-Change-Id: I8b157d76824ad67faf531a529256a8afe2ab9d49 Gerrit-Change-Number: 20691 Gerrit-PatchSet: 5 Gerrit-Owner: Gergely Farkas <[email protected]> Gerrit-Reviewer: Gergely Farkas <[email protected]> Gerrit-Reviewer: Impala Public Jenkins <[email protected]> Gerrit-Reviewer: Michael Smith <[email protected]> Gerrit-Reviewer: Wenzhe Zhou <[email protected]>
