From common-issues-return-161912-archive-asf-public=cust-asf.ponee.io@hadoop.apache.org Sat Dec 8 00:15: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 3809B18067A for ; Sat, 8 Dec 2018 00:15:05 +0100 (CET) Received: (qmail 72033 invoked by uid 500); 7 Dec 2018 23:15:04 -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 72022 invoked by uid 99); 7 Dec 2018 23:15: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; Fri, 07 Dec 2018 23:15: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 DA8671806A4 for ; Fri, 7 Dec 2018 23:15:03 +0000 (UTC) X-Virus-Scanned: Debian amavisd-new at spamd3-us-west.apache.org X-Spam-Flag: NO X-Spam-Score: -109.501 X-Spam-Level: X-Spam-Status: No, score=-109.501 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, USER_IN_DEF_SPF_WL=-7.5, 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 2poS2UhC24Lj for ; Fri, 7 Dec 2018 23:15: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 C785D5F543 for ; Fri, 7 Dec 2018 23:15: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 CE6A7E0F4C for ; Fri, 7 Dec 2018 23:15: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 4482E252D1 for ; Fri, 7 Dec 2018 23:15:00 +0000 (UTC) Date: Fri, 7 Dec 2018 23:15:00 +0000 (UTC) From: "Thomas Marquardt (JIRA)" To: common-issues@hadoop.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Commented] (HADOOP-15954) ABFS: Enable owner and group conversion for MSI and login user using OAuth 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-15954?page=3Dcom.atlassi= an.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=3D16= 713397#comment-16713397 ]=20 Thomas Marquardt commented on HADOOP-15954: ------------------------------------------- I have a few ideas about how we should design this feature: 1) There should be a public interface named CustomIdentityTransformer in th= e org.apache.hadoop.fs.azurebfs.extensions package. =C2=A0 =C2=A0 a) This class is already implemented in patch 004, but the na= me should be changed from CustomIdentityTransformerAdaptee to CustomIdentit= yTransformer. =C2=A0 =C2=A0 b) transformUserName and transformGroupName should be combine= d into a single function named transformOwner if possible. Note that these = methods are invoked to transform the input of a FileSystem.setOwner call. =C2=A0 =C2=A0 c) All implementations of identity transformer will=C2=A0impl= ement this interface, including=C2=A0the default implementation. 2) The AbfsConfiguration.getIdentityTransformer method should do the follow= ing: =C2=A0 =C2=A0 a) If "*fs.azure.identity.transformer.type*" is not set, retu= rn immediately without doing any additional work. =C2=A0 =C2=A0 b) If "*fs.azure.identity.transformer.type*" is set: =C2=A0 =C2=A0 =C2=A0 =C2=A0 i) Load the class. =C2=A0 =C2=A0 =C2=A0 =C2=A0 ii) Create a new instance. =C2=A0 =C2=A0 =C2=A0 =C2=A0 iii) Call initialize and pass in the configurat= ion and account name. =C2=A0 =C2=A0 =C2=A0 =C2=A0 iv) Return the new initialized instance of Cust= omIdentityTransformer. 3) Remove the configuration "*fs.azure.account.identity.type*".=C2=A0 It is= superfluous. 4) Remove the enum TransformerType.=C2=A0 It is superfluous since the "*fs.= azure.identity.transformer.type*" will define the type of identity transfor= mer used. 5) Remove the class org.apache.hadoop.fs.azurebfs.oauth.CustomIdentityTrans= formerAdapter. =C2=A0 =C2=A0 a) The Adapter Design model is not appropriate here.=C2=A0 Th= e Adapter Design model is used when you have a public interface, but there = are external component that implement a different interface.=C2=A0 In our c= ase there is no need to have an adapter, because the external component can= implement our new public interface directly. 6) Provide a default implementation named DefaultIdentityTransformer in the= org.apache.hadoop.fs.azurebfs.oauth2 package. =C2=A0 =C2=A0 a) This class is partly implemented, but: =C2=A0 =C2=A0 =C2=A0 =C2=A0 i) The name should be changed from StandardSPId= entityTransformer to DefaultIdentityTransformer. =C2=A0 =C2=A0 =C2=A0 =C2=A0 ii) DefaultIdentityTransformer should implement= CustomIdentityTransformer. The IdentityTransformer code should be moved in= to DefaultIdentityTransformer. =C2=A0 7) Configuration used by DefaultIdentityTransformer should be prefixed with= =E2=80=9Cfs.azure.default.identity.transformer=E2=80=9D: =C2=A0 =C2=A0 a) =E2=80=9C*fs.azure.default.identity.transformer.enable.sho= rt.name*=E2=80=9D=C2=A0 =E2=80=93 user principal names (UPNs) have the form= at =E2=80=9C\{alias}@\{domain}=E2=80=9D.=C2=A0 If true, only \{alias} is in= cluded when a UPN would otherwise appear in the output of APIs like getFile= Status, getOwner, getAclStatus, etc.=C2=A0 =C2=A0 =C2=A0 b) =E2=80=9C*fs.azure.default.identity.transformer.domain.nam= e*=E2=80=9D =E2=80=93 If the domain name is specified and =E2=80=9Cfs.azure= .default.identity.transformer.enable.short.name=E2=80=9D is true, then the = \{alias} part of a UPN can be specified as input to APIs like setOwner and = setAcl and it will be transformed to a UPN by appending @ and the domain sp= ecified by this configuration property. =C2=A0 =C2=A0 c) =E2=80=9C*fs.azure.default.identity.transformer.service.pr= incipal.substitution.list*=E2=80=9D =E2=80=93 a comma separated list of nam= es to be replaced with the service principal ID specified by =E2=80=9C*fs.a= zure.default.identity.transformer.service.principal.id*=E2=80=9D.=C2=A0 Thi= s substitution occurs when setOwner, setAcl, modifyAclEntries, or removeAcl= Entries are invoked with identities contained in the substitution list. =C2=A0 =C2=A0 d) =E2=80=9C*fs.azure.default.identity.transformer.service.pr= incipal.id*=E2=80=9D =E2=80=93 an Azure Active Directory object ID used as = the replacement for names contained in the list specified by =E2=80=9C*fs.a= zure.default.identity.transformer.service.principal.substitution.list*=E2= =80=9D. =C2=A0 =C2=A0 e) The patch 004 properties defined in ConfigurationKeys shou= ld be replaced with the above.=C2=A0 Please include descriptions. 8) Remove the class org.apache.hadoop.fs.azurebfs.oauth.IdentityTransformer= . 9) Remove DEFAULT_ENABLE_SHORT_NAME from FileSystemConfigurations.=C2=A0 It= can be moved to DefaultIdentityTransformer if it is needed. 10) I don=E2=80=99t see any reason for IdentityTransformerException to exis= t, since it does not have any implementation.=C2=A0 If it truly cannot be r= emoved, I would rename it to *IdentityTransformerInitializationException*. 11) Update all the places in AzureBlobFileSystemStore where the CustomIdent= ityTransformer instance is invoked to check for null, and only perform the = transformation if non-null. 12) By default, there will be no transformation. A customer can set fs.azur= e.identity.transformer.type to the default or a custom implementation as ne= eded. 13) We should have tests for the implementation of DefaultIdentityTransform= er. =C2=A0 > ABFS: Enable owner and group conversion for MSI and login user using OAut= h > -------------------------------------------------------------------------= - > > Key: HADOOP-15954 > URL: https://issues.apache.org/jira/browse/HADOOP-15954 > Project: Hadoop Common > Issue Type: Sub-task > Components: fs/azure > Affects Versions: 3.2.0 > Reporter: junhua gu > Assignee: Da Zhou > Priority: Major > Attachments: HADOOP-15954-001.patch, HADOOP-15954-002.patch, HADO= OP-15954-003.patch, HADOOP-15954-004.patch > > > Add support for overwriting owner and group in set/get operations to be t= he service principal id when OAuth is used. Add support for upn short name = format. > =C2=A0 > Add Standard Transformer for SharedKey / Service=C2=A0 > Add interface provides an extensible model for customizing the acquisitio= n of Identity Transformer. -- 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