You are viewing a plain text version of this content. The canonical link for it is here.
Posted to common-issues@hadoop.apache.org by "Guido Aulisi (JIRA)" <ji...@apache.org> on 2019/08/10 15:00:00 UTC

[jira] [Comment Edited] (HADOOP-14441) LoadBalancingKMSClientProvider#addDelegationTokens should add delegation tokens from all KMS instances

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

Guido Aulisi edited comment on HADOOP-14441 at 8/10/19 2:59 PM:
----------------------------------------------------------------

ThanksĀ [~jojochuang] for your answer.

I usually hit this in Spark2 application from executors, access to encrypted files is really transparent from the application. So I don't know how to call addDelegationTokens from Spark2 applications.

And what is the right patch to apply?


was (Author: tartina):
ThanksĀ [~jojochuang] for your answer.

I usually hit this in Spark2 application from executors, access to encrypted files is really transparent from the application. So I don't know how to call addDelegationTokens from Spark2 applications.

> LoadBalancingKMSClientProvider#addDelegationTokens should add delegation tokens from all KMS instances
> ------------------------------------------------------------------------------------------------------
>
>                 Key: HADOOP-14441
>                 URL: https://issues.apache.org/jira/browse/HADOOP-14441
>             Project: Hadoop Common
>          Issue Type: Bug
>          Components: kms
>    Affects Versions: 2.7.0
>         Environment: CDH5.7.4, Kerberized, SSL, KMS-HA, at rest encryption
>            Reporter: Wei-Chiu Chuang
>            Assignee: Wei-Chiu Chuang
>            Priority: Major
>         Attachments: HADOOP-14441.001.patch, HADOOP-14441.002.patch, HADOOP-14441.003.patch, HADOOP-14441.004.patch
>
>
> LoadBalancingKMSClientProvider only gets delegation token from one KMS instance, in a round-robin fashion. This is arguably a bug, as JavaDoc for {{KeyProviderDelegationTokenExtension#addDelegationTokens}} states:
> {quote}
> /**
>      * The implementer of this class will take a renewer and add all
>      * delegation tokens associated with the renewer to the 
>      * <code>Credentials</code> object if it is not already present, 
> ...
> **/
> {quote}
> This bug doesn't pop up very often, because HDFS clients such as MapReduce unintentionally calls {{FileSystem#addDelegationTokens}} multiple times.
> We have a custom client that accesses HDFS/KMS-HA using delegation token, and we were puzzled why it always throws "Failed to find any Kerberos tgt" exceptions talking to one KMS but not the other. Turns out that client couldn't talk to the KMS because {{FileSystem#addDelegationTokens}} only gets one KMS delegation token at a time.



--
This message was sent by Atlassian JIRA
(v7.6.14#76016)

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