Return-Path: X-Original-To: archive-asf-public-internal@cust-asf2.ponee.io Delivered-To: archive-asf-public-internal@cust-asf2.ponee.io Received: from cust-asf.ponee.io (cust-asf.ponee.io [163.172.22.183]) by cust-asf2.ponee.io (Postfix) with ESMTP id 14BE7200C17 for ; Fri, 27 Jan 2017 03:22:30 +0100 (CET) Received: by cust-asf.ponee.io (Postfix) id 132DD160B50; Fri, 27 Jan 2017 02:22:30 +0000 (UTC) Delivered-To: archive-asf-public@cust-asf.ponee.io Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by cust-asf.ponee.io (Postfix) with SMTP id 5BFFF160B4C for ; Fri, 27 Jan 2017 03:22:29 +0100 (CET) Received: (qmail 21138 invoked by uid 500); 27 Jan 2017 02:22:28 -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 21127 invoked by uid 99); 27 Jan 2017 02:22:28 -0000 Received: from pnap-us-west-generic-nat.apache.org (HELO spamd3-us-west.apache.org) (209.188.14.142) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 27 Jan 2017 02:22:28 +0000 Received: from localhost (localhost [127.0.0.1]) by spamd3-us-west.apache.org (ASF Mail Server at spamd3-us-west.apache.org) with ESMTP id EE51118C8E0 for ; Fri, 27 Jan 2017 02:22:27 +0000 (UTC) X-Virus-Scanned: Debian amavisd-new at spamd3-us-west.apache.org X-Spam-Flag: NO X-Spam-Score: -1.199 X-Spam-Level: X-Spam-Status: No, score=-1.199 tagged_above=-999 required=6.31 tests=[KAM_ASCII_DIVIDERS=0.8, KAM_LAZY_DOMAIN_SECURITY=1, RP_MATCHES_RCVD=-2.999] autolearn=disabled Received: from mx1-lw-us.apache.org ([10.40.0.8]) by localhost (spamd3-us-west.apache.org [10.40.0.10]) (amavisd-new, port 10024) with ESMTP id 0k_1HDdFEpUH for ; Fri, 27 Jan 2017 02:22:27 +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 9B2E75F46F for ; Fri, 27 Jan 2017 02:22:26 +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 983E2E040D for ; Fri, 27 Jan 2017 02:22:25 +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 7AADD25290 for ; Fri, 27 Jan 2017 02:22:24 +0000 (UTC) Date: Fri, 27 Jan 2017 02:22:24 +0000 (UTC) From: "Xiaoyu Yao (JIRA)" To: common-issues@hadoop.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Commented] (HADOOP-13988) KMSClientProvider does not work with WebHDFS and Apache Knox w/ProxyUser MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 archived-at: Fri, 27 Jan 2017 02:22:30 -0000 [ https://issues.apache.org/jira/browse/HADOOP-13988?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15840849#comment-15840849 ] Xiaoyu Yao commented on HADOOP-13988: ------------------------------------- Open HADOOP-14029 to fix the non-secure proxy use case and resolve this one. > KMSClientProvider does not work with WebHDFS and Apache Knox w/ProxyUser > ------------------------------------------------------------------------ > > Key: HADOOP-13988 > URL: https://issues.apache.org/jira/browse/HADOOP-13988 > Project: Hadoop Common > Issue Type: Bug > Components: common, kms > Affects Versions: 2.8.0, 2.7.3 > Environment: HDP 2.5.3.0 > WebHDFSUser --> Knox --> HA NameNodes(WebHDFS) --> DataNodes > Reporter: Greg Senia > Assignee: Xiaoyu Yao > Fix For: 2.9.0, 3.0.0-alpha3 > > Attachments: HADOOP-13988.01.patch, HADOOP-13988.02.patch, HADOOP-13988.03.patch, HADOOP-13988.patch, HADOOP-13988.patch > > > After upgrading to HDP 2.5.3.0 noticed that all of the KMSClientProvider issues have not been resolved. We put a test build together and applied HADOOP-13558 and HADOOP-13749 these two fixes did still not solve the issue with requests coming from WebHDFS through to Knox to a TDE zone. > So we added some debug to our build and determined effectively what is happening here is a double proxy situation which does not seem to work. So we propose the following fix in getActualUgi Method: > {noformat} > } > // Use current user by default > UserGroupInformation actualUgi = currentUgi; > if (currentUgi.getRealUser() != null) { > // Use real user for proxy user > if (LOG.isDebugEnabled()) { > LOG.debug("using RealUser for proxyUser); > } > actualUgi = currentUgi.getRealUser(); > if (getDoAsUser() != null) { > if (LOG.isDebugEnabled()) { > LOG.debug("doAsUser exists"); > LOG.debug("currentUGI realUser shortName: {}", currentUgi.getRealUser().getShortUserName()); > LOG.debug("processUGI loginUser shortName: {}", UserGroupInformation.getLoginUser().getShortUserName()); > } > if (currentUgi.getRealUser().getShortUserName() != UserGroupInformation.getLoginUser().getShortUserName()) { > if (LOG.isDebugEnabled()) { > LOG.debug("currentUGI.realUser does not match UGI.processUser); > } > actualUgi = UserGroupInformation.getLoginUser(); > if (LOG.isDebugEnabled()) { > LOG.debug("LoginUser for Proxy: {}", actualUgi.getLoginUser()); > } > } > } > > } else if (!currentUgiContainsKmsDt() && > !currentUgi.hasKerberosCredentials()) { > // Use login user for user that does not have either > // Kerberos credential or KMS delegation token for KMS operations > if (LOG.isDebugEnabled()) { > LOG.debug("using loginUser no KMS Delegation Token no Kerberos Credentials"); > } > actualUgi = currentUgi.getLoginUser(); > } > return actualUgi; > } > {noformat} -- This message was sent by Atlassian JIRA (v6.3.4#6332) --------------------------------------------------------------------- To unsubscribe, e-mail: common-issues-unsubscribe@hadoop.apache.org For additional commands, e-mail: common-issues-help@hadoop.apache.org