Return-Path: X-Original-To: apmail-hbase-dev-archive@www.apache.org Delivered-To: apmail-hbase-dev-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 7627A1889E for ; Thu, 24 Sep 2015 01:49:14 +0000 (UTC) Received: (qmail 76498 invoked by uid 500); 24 Sep 2015 01:49:04 -0000 Delivered-To: apmail-hbase-dev-archive@hbase.apache.org Received: (qmail 76333 invoked by uid 500); 24 Sep 2015 01:49:04 -0000 Mailing-List: contact dev-help@hbase.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@hbase.apache.org Delivered-To: mailing list dev@hbase.apache.org Received: (qmail 76135 invoked by uid 99); 24 Sep 2015 01:49:04 -0000 Received: from arcas.apache.org (HELO arcas.apache.org) (140.211.11.28) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 24 Sep 2015 01:49:04 +0000 Date: Thu, 24 Sep 2015 01:49:04 +0000 (UTC) From: "Enis Soztutar (JIRA)" To: dev@hbase.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Created] (HBASE-14475) Region split requests are always audited with "hbase" user rather than request user MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 Enis Soztutar created HBASE-14475: ------------------------------------- Summary: Region split requests are always audited with "hbase" user rather than request user Key: HBASE-14475 URL: https://issues.apache.org/jira/browse/HBASE-14475 Project: HBase Issue Type: Bug Reporter: Enis Soztutar [~madhan.neethiraj] from Ranger reported that when a region split request is initiated from the user, we always audit (and do the permission check) against the hbase user, not the request user. The issue is that a split request that is coming from the user is only processed at a later time from the CompactSplitThread asynchronously to the splitRegion RPC. RSRpcServices.splitRegion() only does a flush from the handler thread and then calls regionServer.compactSplitThread.requestSplit() which puts a SplitRequest to the split queue. The split request is handled by the split executor from CompactSplitThread. Since the split is actually executed from the compact split thread, the preSplit() for the AccessController is called from the executor thread. In this thread, we no longer have the user who initially requested the split, so the user in the context (UGI) is "hbase", causing the AC.preSplit() access control check to be always be performed against the hbase user, not the user who have submitted the request. The audit log also contains "hbase" user rather than the actual user. Luckily, the split forces a flush to the region in-line (from the handler thread), which requires a {{CREATE|ADMIN}} permission. split requires {{ADMIN}}, but due to this bug {{CREATE}} is also sufficient (although we have not verified it manually). {{CREATE}} permission can do flush and compactions, so this is not a security issue (I think). -- This message was sent by Atlassian JIRA (v6.3.4#6332)