From common-issues-return-150122-archive-asf-public=cust-asf.ponee.io@hadoop.apache.org Wed Mar 21 23:38:05 2018 Return-Path: X-Original-To: archive-asf-public@cust-asf.ponee.io Delivered-To: archive-asf-public@cust-asf.ponee.io Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by mx-eu-01.ponee.io (Postfix) with SMTP id B0D5718067E for ; Wed, 21 Mar 2018 23:38:04 +0100 (CET) Received: (qmail 61987 invoked by uid 500); 21 Mar 2018 22:38:03 -0000 Mailing-List: contact common-issues-help@hadoop.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Delivered-To: mailing list common-issues@hadoop.apache.org Received: (qmail 61976 invoked by uid 99); 21 Mar 2018 22:38:03 -0000 Received: from pnap-us-west-generic-nat.apache.org (HELO spamd4-us-west.apache.org) (209.188.14.142) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 21 Mar 2018 22:38:03 +0000 Received: from localhost (localhost [127.0.0.1]) by spamd4-us-west.apache.org (ASF Mail Server at spamd4-us-west.apache.org) with ESMTP id 0FC8FC0144 for ; Wed, 21 Mar 2018 22:38:03 +0000 (UTC) X-Virus-Scanned: Debian amavisd-new at spamd4-us-west.apache.org X-Spam-Flag: NO X-Spam-Score: -109.511 X-Spam-Level: X-Spam-Status: No, score=-109.511 tagged_above=-999 required=6.31 tests=[ENV_AND_HDR_SPF_MATCH=-0.5, KAM_ASCII_DIVIDERS=0.8, RCVD_IN_DNSWL_MED=-2.3, SPF_PASS=-0.001, T_RP_MATCHES_RCVD=-0.01, USER_IN_DEF_SPF_WL=-7.5, USER_IN_WHITELIST=-100] autolearn=disabled Received: from mx1-lw-us.apache.org ([10.40.0.8]) by localhost (spamd4-us-west.apache.org [10.40.0.11]) (amavisd-new, port 10024) with ESMTP id 8DlxABceJyTV for ; Wed, 21 Mar 2018 22:38:02 +0000 (UTC) Received: from mailrelay1-us-west.apache.org (mailrelay1-us-west.apache.org [209.188.14.139]) by mx1-lw-us.apache.org (ASF Mail Server at mx1-lw-us.apache.org) with ESMTP id C75675FDE0 for ; Wed, 21 Mar 2018 22:38:01 +0000 (UTC) Received: from jira-lw-us.apache.org (unknown [207.244.88.139]) by mailrelay1-us-west.apache.org (ASF Mail Server at mailrelay1-us-west.apache.org) with ESMTP id EC9C0E0D76 for ; Wed, 21 Mar 2018 22:38:00 +0000 (UTC) Received: from jira-lw-us.apache.org (localhost [127.0.0.1]) by jira-lw-us.apache.org (ASF Mail Server at jira-lw-us.apache.org) with ESMTP id 5646B214CF for ; Wed, 21 Mar 2018 22:38:00 +0000 (UTC) Date: Wed, 21 Mar 2018 22:38:00 +0000 (UTC) From: "Rushabh S Shah (JIRA)" To: common-issues@hadoop.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Commented] (HADOOP-14445) Delegation tokens are not shared between KMS instances MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 [ https://issues.apache.org/jira/browse/HADOOP-14445?page=3Dcom.atlassi= an.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=3D16= 408698#comment-16408698 ]=20 Rushabh S Shah commented on HADOOP-14445: ----------------------------------------- One more high level comment. Lets say we are running in an environment where the job submitter and task= client are running with the new code but RM is not upgraded yet. Job submitter will have {{KMS_DELEGATION_TOKEN}} and {{kms-dt}} tokens in = its credentials bag. Lets say the job ran for more than 24 hours so that RM has to renew the to= ken. Since the RM is old, it will only renew {{kms-dt}} token and _will fail to= renew KMS_DELEGATION_TOKEN_. Now when the new task tries to select the token via {{getKMSToken}}, it wi= ll always select the token with kind {{KMS_DELEGATION_TOKEN}}.=20 If I understand the DelegationToken correctly, even if it fails to renew to= ken specific to \{{KMS_DELEGATION_TOKEN}}, that token will be valid since \= {{kms-dt}} is a copy of \{{KMS_D_T}}. Lets just write a=C2=A0test case to verify. > Delegation tokens are not shared between KMS instances > ------------------------------------------------------ > > Key: HADOOP-14445 > URL: https://issues.apache.org/jira/browse/HADOOP-14445 > Project: Hadoop Common > Issue Type: Bug > Components: kms > Affects Versions: 2.8.0, 3.0.0-alpha1 > Environment: CDH5.7.4, Kerberized, SSL, KMS-HA, at rest encryptio= n > Reporter: Wei-Chiu Chuang > Assignee: Xiao Chen > Priority: Major > Attachments: HADOOP-14445-branch-2.8.002.patch, HADOOP-14445-bran= ch-2.8.patch, HADOOP-14445.002.patch, HADOOP-14445.003.patch, HADOOP-14445.= 004.patch, HADOOP-14445.05.patch, HADOOP-14445.06.patch, HADOOP-14445.07.pa= tch > > > As discovered in HADOOP-14441, KMS HA using LoadBalancingKMSClientProvide= r do not share delegation tokens. (a client uses KMS address/port as the ke= y for delegation token) > {code:title=3DDelegationTokenAuthenticatedURL#openConnection} > if (!creds.getAllTokens().isEmpty()) { > InetSocketAddress serviceAddr =3D new InetSocketAddress(url.getHo= st(), > url.getPort()); > Text service =3D SecurityUtil.buildTokenService(serviceAddr); > dToken =3D creds.getToken(service); > {code} > But KMS doc states: > {quote} > Delegation Tokens > Similar to HTTP authentication, KMS uses Hadoop Authentication for delega= tion tokens too. > Under HA, A KMS instance must verify the delegation token given by anothe= r KMS instance, by checking the shared secret used to sign the delegation t= oken. To do this, all KMS instances must be able to retrieve the shared sec= ret from ZooKeeper. > {quote} > We should either update the KMS documentation, or fix this code to share = delegation tokens. -- This message was sent by Atlassian JIRA (v7.6.3#76005) --------------------------------------------------------------------- To unsubscribe, e-mail: common-issues-unsubscribe@hadoop.apache.org For additional commands, e-mail: common-issues-help@hadoop.apache.org