From issues-return-196916-archive-asf-public=cust-asf.ponee.io@hive.apache.org Fri Jul 31 11:57:00 2020 Return-Path: X-Original-To: archive-asf-public@cust-asf.ponee.io Delivered-To: archive-asf-public@cust-asf.ponee.io Received: from mailroute1-lw-us.apache.org (mailroute1-lw-us.apache.org [207.244.88.153]) by mx-eu-01.ponee.io (Postfix) with ESMTPS id C4DED180665 for ; Fri, 31 Jul 2020 13:57:00 +0200 (CEST) Received: from mail.apache.org (localhost [127.0.0.1]) by mailroute1-lw-us.apache.org (ASF Mail Server at mailroute1-lw-us.apache.org) with SMTP id 476C0125FE7 for ; Fri, 31 Jul 2020 11:55:02 +0000 (UTC) Received: (qmail 37938 invoked by uid 500); 31 Jul 2020 11:55:02 -0000 Mailing-List: contact issues-help@hive.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@hive.apache.org Delivered-To: mailing list issues@hive.apache.org Received: (qmail 37870 invoked by uid 99); 31 Jul 2020 11:55:02 -0000 Received: from mailrelay1-us-west.apache.org (HELO mailrelay1-us-west.apache.org) (209.188.14.139) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 31 Jul 2020 11:55:02 +0000 Received: from jira-he-de.apache.org (static.172.67.40.188.clients.your-server.de [188.40.67.172]) by mailrelay1-us-west.apache.org (ASF Mail Server at mailrelay1-us-west.apache.org) with ESMTP id 4FE2F43560 for ; Fri, 31 Jul 2020 11:55:01 +0000 (UTC) Received: from jira-he-de.apache.org (localhost.localdomain [127.0.0.1]) by jira-he-de.apache.org (ASF Mail Server at jira-he-de.apache.org) with ESMTP id 266FC78038A for ; Fri, 31 Jul 2020 11:55:00 +0000 (UTC) Date: Fri, 31 Jul 2020 11:55:00 +0000 (UTC) From: "Shubham Chaurasia (Jira)" To: issues@hive.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Commented] (HIVE-23339) SBA does not check permissions for DB location specified in Create or Alter database query 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/HIVE-23339?page=3Dcom.atlassian= .jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=3D1716= 8663#comment-17168663 ]=20 Shubham Chaurasia commented on HIVE-23339: ------------------------------------------ Thanks for the review and commit [~mgergely]. Closing it.=20 Note - It changes API in {{HiveAuthorizationProvider}} from=20 {code:java} public void authorize(Privilege[] readRequiredPriv, Privilege[] writeRequir= edPriv) throws HiveException, AuthorizationException; {code} to=20 {code:java} void authorizeDbLevelOperations(Privilege[] readRequiredPriv, Privilege[] w= riteRequiredPriv, Collection inputs, Collection ou= tputs) throws HiveException, AuthorizationException; {code} > SBA does not check permissions for DB location specified in Create or Alt= er database query > -------------------------------------------------------------------------= ----------------- > > Key: HIVE-23339 > URL: https://issues.apache.org/jira/browse/HIVE-23339 > Project: Hive > Issue Type: Bug > Components: Hive > Affects Versions: 3.1.0, 4.0.0 > Reporter: Riju Trivedi > Assignee: Shubham Chaurasia > Priority: Critical > Labels: pull-request-available > Fix For: 4.0.0 > > Attachments: HIVE-23339.01.patch, HIVE-23339.02.patch, HIVE-23339= .03.patch > > Time Spent: 0.5h > Remaining Estimate: 0h > > With doAs=3Dtrue and StorageBasedAuthorization provider, create database = with specific location succeeds even if user doesn't have access to that pa= th. > =C2=A0 > {code:java} > hadoop fs -ls -d /tmp/cannot_write > drwx------ - hive hadoop 0 2020-04-01 22:53 /tmp/cannot_write > create a database under /tmp/cannot_write. We would expect it to fail, bu= t is actually created successfully with "hive" as the owner: > rtrivedi@bdp01:~> beeline -e "create database rtrivedi_1 location '/tmp/c= annot_write/rtrivedi_1'" > INFO : OK > No rows affected (0.116 seconds) > hive@hpchdd2e:~> hadoop fs -ls /tmp/cannot_write > Found 1 items > drwx------ - hive hadoop 0 2020-04-01 23:05 /tmp/cannot_write/rtrivedi_1 > {code} > =C2=A0 -- This message was sent by Atlassian Jira (v8.3.4#803005)