From issues-return-13263-archive-asf-public=cust-asf.ponee.io@sentry.apache.org Mon Mar 12 23:16: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 D36C1180718 for ; Mon, 12 Mar 2018 23:16:04 +0100 (CET) Received: (qmail 37563 invoked by uid 500); 12 Mar 2018 22:16:04 -0000 Mailing-List: contact issues-help@sentry.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Delivered-To: mailing list issues@sentry.apache.org Received: (qmail 37553 invoked by uid 99); 12 Mar 2018 22:16:03 -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; Mon, 12 Mar 2018 22:16:03 +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 82A8C180678 for ; Mon, 12 Mar 2018 22:16:03 +0000 (UTC) X-Virus-Scanned: Debian amavisd-new at spamd3-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-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 guVtl6pZt1ny for ; Mon, 12 Mar 2018 22:16: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 5FD605F2EC for ; Mon, 12 Mar 2018 22:16: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 6956DE00D5 for ; Mon, 12 Mar 2018 22:16: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 1CEE6211EF for ; Mon, 12 Mar 2018 22:16:00 +0000 (UTC) Date: Mon, 12 Mar 2018 22:16:00 +0000 (UTC) From: =?utf-8?Q?Sergio_Pe=C3=B1a_=28JIRA=29?= To: issues@sentry.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Commented] (SENTRY-2178) Sentry permissions for Solr are deleted as part of migration process 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/SENTRY-2178?page=3Dcom.atlassia= n.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=3D163= 96156#comment-16396156 ]=20 Sergio Pe=C3=B1a commented on SENTRY-2178: ------------------------------------- [~hgadre] Can you re-submit the patch but renaming the file as SENTRY-2178.= patch ? > Sentry permissions for Solr are deleted as part of migration process > -------------------------------------------------------------------- > > Key: SENTRY-2178 > URL: https://issues.apache.org/jira/browse/SENTRY-2178 > Project: Sentry > Issue Type: Bug > Components: Solr Plugin > Affects Versions: 2.0.0 > Reporter: Hrishikesh Gadre > Assignee: Hrishikesh Gadre > Priority: Critical > Attachments: sentry2178.patch > > > SENTRY-1480 implemented a command-line tool to migrate Sentry permissions= from 1.x to 2.x. During upgrade testing I found a bug in the migration pro= cess where the pre-upgrade permissions are deleted. Specifically following = permission was configured on=C2=A0Sentry v1 > {noformat} > collection=3D*->action=3D* > {noformat} > After the migration, following permissions were available on Sentry servi= ce > {noformat} > admin=3Dcollections->action=3D* > admin=3Dcores->action=3D* > {noformat} > Note that the original permission is missing. From the following log snip= pet of Sentry service, it looks like the original permission was incorrectl= y revoked. > {noformat} > 2018-03-08 21:40:20,856 INFO DataNucleus.Datastore: Collection field "org= .apache.sentry.provider.db.service.model.MSentryRole.gmPrivileges" of "org.= apache.sentry.provider.db.service.model.MSentryRole@4dc76fa5" was asked to = add element "MSentryGMPrivilege [serverName=3Dservice1, componentName=3Dsol= r, authorizables=3DAdmin=3Dcollections, scope=3DAdmin, action=3D*, roles=3D= [...], createTime=3D1520574020823, grantOption=3Dfalse]" to the M-N bidirec= tional relation but the element already has this field in its collection (m= aybe added from the other side) > 2018-03-08 21:40:20,997 INFO sentry.generic.authorization.ddl.logger: \{"= serviceName":"Sentry-Service","userName":"solr","impersonator":"solr@GCE.CL= OUDERA.COM","ipAddress":"/172.31.117.188","operation":"GRANT_PRIVILEGE","ev= entTime":"1520574020991","operationText":"GRANT ALL ON Admin collections TO= ROLE solr-admin ON COMPONENT SOLR","allowed":"true","databaseName":null,"t= ableName":null,"column":null,"resourcePath":null,"objectType":"PRINCIPAL"} > 2018-03-08 21:40:21,015 INFO DataNucleus.Datastore: Collection field "org= .apache.sentry.provider.db.service.model.MSentryRole.gmPrivileges" of "org.= apache.sentry.provider.db.service.model.MSentryRole@46f3fe41" was asked to = add element "MSentryGMPrivilege [serverName=3Dservice1, componentName=3Dsol= r, authorizables=3DAdmin=3Dcores, scope=3DAdmin, action=3D*, roles=3D[...],= createTime=3D1520574021011, grantOption=3Dfalse]" to the M-N bidirectional= relation but the element already has this field in its collection (maybe a= dded from the other side) > 2018-03-08 21:40:21,022 INFO sentry.generic.authorization.ddl.logger: \{"= serviceName":"Sentry-Service","userName":"solr","impersonator":"solr@GCE.CL= OUDERA.COM","ipAddress":"/172.31.117.188","operation":"GRANT_PRIVILEGE","ev= entTime":"1520574021022","operationText":"GRANT ALL ON Admin cores TO ROLE = solr-admin ON COMPONENT SOLR","allowed":"true","databaseName":null,"tableNa= me":null,"column":null,"resourcePath":null,"objectType":"PRINCIPAL"} > 2018-03-08 21:40:21,035 INFO sentry.generic.authorization.ddl.logger: \{"= serviceName":"Sentry-Service","userName":"solr","impersonator":"solr@GCE.CL= OUDERA.COM","ipAddress":"/172.31.117.188","operation":"GRANT_PRIVILEGE","ev= entTime":"1520574021035","operationText":"GRANT ALL ON Collection * TO ROLE= solr-admin ON COMPONENT SOLR","allowed":"true","databaseName":null,"tableN= ame":null,"column":null,"resourcePath":null,"objectType":"PRINCIPAL"} > 2018-03-08 21:40:21,080 INFO sentry.generic.authorization.ddl.logger: \{"= serviceName":"Sentry-Service","userName":"solr","impersonator":"solr@GCE.CL= OUDERA.COM","ipAddress":"/172.31.117.188","operation":"REVOKE_PRIVILEGE","e= ventTime":"1520574021080","operationText":"REVOKE ALL ON Collection * FROM = ROLE solr-admin ON COMPONENT SOLR","allowed":"true","databaseName":null,"ta= bleName":null,"column":null,"resourcePath":null,"objectType":"PRINCIPAL"} > {noformat} -- This message was sent by Atlassian JIRA (v7.6.3#76005)