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 2023/11/20 14:45:00 UTC

[jira] [Commented] (IMPALA-12552) impala-shell should not call encode on kerberos_host_fqdn in python 3 env

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

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

Commit 04bdb4d32c598bd66c4774eac59947e4d95e0173 in impala's branch refs/heads/master from Gergely Farkas
[ https://gitbox.apache.org/repos/asf?p=impala.git;h=04bdb4d32 ]

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/my.kerberos.host.fqdn@MY.REALM
(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 <mi...@cloudera.com>
Tested-by: Impala Public Jenkins <im...@cloudera.com>
Reviewed-by: Wenzhe Zhou <wz...@cloudera.com>


> impala-shell should not call encode on kerberos_host_fqdn in python 3 env
> -------------------------------------------------------------------------
>
>                 Key: IMPALA-12552
>                 URL: https://issues.apache.org/jira/browse/IMPALA-12552
>             Project: IMPALA
>          Issue Type: Bug
>    Affects Versions: Impala 4.3.0
>            Reporter: Gergely Farkas
>            Assignee: Gergely Farkas
>            Priority: Major
>              Labels: impala-shell
>
> This is a python 3 compatibility problem: 
> 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: 
> {noformat}
> my_service_name/b'my.kerberos.host.fqdn'@MY.REALM{noformat}
> instead of the correct one, which is:
> {noformat}
> my_service_name/my.kerberos.host.fqdn@MY.REALM{noformat}



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

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