Skip to main content
sshimpi
Silver ⭐️⭐️⭐️
Nov 19, 2016 9:41 PM UTC

Ranger hdfs audit is showing wrong user

  • Oct 5, 2026 9:34 AM UTC
  • 0 replies
  • 625 views
  • Translate All

PROBLEM STATEMENT: We have a strange problem with ranger. When I do a "select * from <table>; "

I can see in ranger, on hive audit, that my user (dnid) is getting logged correctly. But when I look at the same situation on hdfs audit it shows that another user did the request. This Is to me very strange, I´ve tried with different users and the same problem happens again.

ERROR:

9634-img2.png

9636-img3.png

9637-img1.png

ROOT CAUSE: This is known issue and a BUG -

https://issues.apache.org/jira/browse/HIVE-13120

http://docs.hortonworks.com/HDPDocuments/HDP2/HDP-2.4.2/bk_HDP_RelNotes/content/fixed_issues.html

BUG-53108HIVE-13120

RESOLUTION:

Changed the below property in hiveserver2 configs and restarted hiveserver2 after which the Ranger HDFS audit was showing user as hive in HDFS audit.

From:
"hive.server2.enable.doAs"=true

TO:
"hive.server2.enable.doAs"=false


img3.png