Return-Path: X-Original-To: apmail-hbase-issues-archive@www.apache.org Delivered-To: apmail-hbase-issues-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 0E3F5173F6 for ; Thu, 30 Oct 2014 19:58:37 +0000 (UTC) Received: (qmail 65071 invoked by uid 500); 30 Oct 2014 19:58:36 -0000 Delivered-To: apmail-hbase-issues-archive@hbase.apache.org Received: (qmail 64989 invoked by uid 500); 30 Oct 2014 19:58:36 -0000 Mailing-List: contact issues-help@hbase.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Delivered-To: mailing list issues@hbase.apache.org Received: (qmail 64753 invoked by uid 99); 30 Oct 2014 19:58:36 -0000 Received: from arcas.apache.org (HELO arcas.apache.org) (140.211.11.28) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 30 Oct 2014 19:58:36 +0000 Date: Thu, 30 Oct 2014 19:58:36 +0000 (UTC) From: "Andrew Purtell (JIRA)" To: issues@hbase.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Commented] (HBASE-12346) Scan's default auths behavior under Visibility labels MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 [ https://issues.apache.org/jira/browse/HBASE-12346?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14190714#comment-14190714 ] Andrew Purtell commented on HBASE-12346: ---------------------------------------- {quote} 1. Something similar to EnforcingScanLabelGenerator as the first SLG. But we need to change it a little: a. Get the defined set for the user from the labels table ONLY IF the auths in the scan is null. b. Otherwise does nothing, pass on the auths in the scan to the next SLG. 2. The current DefaultScanLabelGenerator (without the patch) as the second SLG. This SLG will filter/drop labels from the passed in Auths as needed. {quote} Yes. And: - We could rename 'DefaultScanLabelGenerator' to something more suitable. - The default SLG configuration becomes this combined stack. > Scan's default auths behavior under Visibility labels > ----------------------------------------------------- > > Key: HBASE-12346 > URL: https://issues.apache.org/jira/browse/HBASE-12346 > Project: HBase > Issue Type: Bug > Components: API, security > Affects Versions: 0.98.7, 0.99.1 > Reporter: Jerry He > Fix For: 0.98.8, 0.99.2 > > Attachments: HBASE-12346-master-v2.patch, HBASE-12346-master.patch > > > In Visibility Labels security, a set of labels (auths) are administered and associated with a user. > A user can normally only see cell data during scan that are part of the user's label set (auths). > Scan uses setAuthorizations to indicates its wants to use the auths to access the cells. > Similarly in the shell: > {code} > scan 'table1', AUTHORIZATIONS => ['private'] > {code} > But it is a surprise to find that setAuthorizations seems to be 'mandatory' in the default visibility label security setting. Every scan needs to setAuthorizations before the scan can get any cells even the cells are under the labels the request user is part of. > The following steps will illustrate the issue: > Run as superuser. > {code} > 1. create a visibility label called 'private' > 2. create 'table1' > 3. put into 'table1' data and label the data as 'private' > 4. set_auths 'user1', 'private' > 5. grant 'user1', 'RW', 'table1' > {code} > Run as 'user1': > {code} > 1. scan 'table1' > This show no cells. > 2. scan 'table1', scan 'table1', AUTHORIZATIONS => ['private'] > This will show all the data. > {code} > I am not sure if this is expected by design or a bug. > But a more reasonable, more client application backward compatible, and less surprising default behavior should probably look like this: > A scan's default auths, if its Authorizations attributes is not set explicitly, should be all the auths the request user is administered and allowed on the server. > If scan.setAuthorizations is used, then the server further filter the auths during scan: use the input auths minus what is not in user's label set on the server. -- This message was sent by Atlassian JIRA (v6.3.4#6332)