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 AB2DB200CE1 for ; Fri, 11 Aug 2017 00:07:07 +0200 (CEST) Received: by cust-asf.ponee.io (Postfix) id A94A216C49E; Thu, 10 Aug 2017 22:07:07 +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 0293A16C49F for ; Fri, 11 Aug 2017 00:07:06 +0200 (CEST) Received: (qmail 99873 invoked by uid 500); 10 Aug 2017 22:07:05 -0000 Mailing-List: contact yarn-dev-help@hadoop.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Delivered-To: mailing list yarn-dev@hadoop.apache.org Received: (qmail 99772 invoked by uid 99); 10 Aug 2017 22:07:04 -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; Thu, 10 Aug 2017 22:07:04 +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 D2281180850 for ; Thu, 10 Aug 2017 22:07:02 +0000 (UTC) X-Virus-Scanned: Debian amavisd-new at spamd3-us-west.apache.org X-Spam-Flag: NO X-Spam-Score: -100.002 X-Spam-Level: X-Spam-Status: No, score=-100.002 tagged_above=-999 required=6.31 tests=[RP_MATCHES_RCVD=-0.001, SPF_PASS=-0.001, USER_IN_WHITELIST=-100] autolearn=disabled Received: from mx1-lw-eu.apache.org ([10.40.0.8]) by localhost (spamd3-us-west.apache.org [10.40.0.10]) (amavisd-new, port 10024) with ESMTP id bMG9oXyfKI-K for ; Thu, 10 Aug 2017 22:07:02 +0000 (UTC) Received: from mailrelay1-us-west.apache.org (mailrelay1-us-west.apache.org [209.188.14.139]) by mx1-lw-eu.apache.org (ASF Mail Server at mx1-lw-eu.apache.org) with ESMTP id 855855FDB5 for ; Thu, 10 Aug 2017 22:07: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 C82D8E0E07 for ; Thu, 10 Aug 2017 22:07: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 6B04023FFD for ; Thu, 10 Aug 2017 22:07:00 +0000 (UTC) Date: Thu, 10 Aug 2017 22:07:00 +0000 (UTC) From: "Vrushali C (JIRA)" To: yarn-dev@hadoop.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Created] (YARN-6989) Ensure timeline service v2 codebase gets UGI from HttpServletRequest in a consistent way MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 archived-at: Thu, 10 Aug 2017 22:07:07 -0000 Vrushali C created YARN-6989: -------------------------------- Summary: Ensure timeline service v2 codebase gets UGI from HttpServletRequest in a consistent way Key: YARN-6989 URL: https://issues.apache.org/jira/browse/YARN-6989 Project: Hadoop YARN Issue Type: Sub-task Reporter: Vrushali C As noticed during discussions in YARN-6820, the webservices in timeline service v2 get the UGI created from the user obtained by invoking getRemoteUser on the HttpServletRequest . It will be good to use getUserPrincipal instead of invoking getRemoteUser on the HttpServletRequest. Filing jira to update the code. Per Java EE documentations for 6 and 7, the behavior around getRemoteUser and getUserPrincipal is listed at: http://docs.oracle.com/javaee/6/tutorial/doc/gjiie.html#bncba https://docs.oracle.com/javaee/7/tutorial/security-webtier003.htm {code} getRemoteUser, which determines the user name with which the client authenticated. The getRemoteUser method returns the name of the remote user (the caller) associated by the container with the request. If no user has been authenticated, this method returns null. getUserPrincipal, which determines the principal name of the current user and returns a java.security.Principal object. If no user has been authenticated, this method returns null. Calling the getName method on the Principal returned by getUserPrincipal returns the name of the remote user. {code} -- This message was sent by Atlassian JIRA (v6.4.14#64029) --------------------------------------------------------------------- To unsubscribe, e-mail: yarn-dev-unsubscribe@hadoop.apache.org For additional commands, e-mail: yarn-dev-help@hadoop.apache.org