Part One: Hadoop Clusters from an Audit Perspective

October 25, 2016 Rupam Bora

A fundamental component of Hadoop clusters and security models is Accounting. Along with identification, authentication and authorization functions for users and services, it is with Audit log capabilities that the security ecosystem is complete. Hadoop components handle accounting differently depending on the purpose of the component. Components such as HDFS and HBase are data repositories whereas MapReduce, Hive, Impala are query engines and processing frameworks. So, the auditable events are unique for different elements.

HDFS Audit Logs

HDFS provides 2 different audit logs – hdfs-audit.log is used audit general user activity. SecurityAuth-hdfs.audit is used to audit service-level authorization activity. The setup for these logfiles involves hooking into log4j.category.Securitylogger and

Auditable events show various actions performed e.g. listStatus, create, setPermission, rename etc. Also, the logs demonstrate who the user is that the event was for, timestamp, IP address and various other bits of information. Also, all unsuccessful access attempts will be recorded.

MapReduce Audit Logs

MapReduce follows a similar approach, it contains 2 audit log files – mapred-audit.log and SecurityAuth-mapred.audit.

Let’s take an example –

  • User Alice is identified by Kerberos principal and she has successfully used kinit to receive a valid TGT
  • MapReduce service-level authorization is not being used
  • Alice submits a MapReduce job
  • Alice kills the MapReduce job before it finishes

Example 1 (mapred-audit.log)

. . .

2016-10-14 18:11:46, 363 INFO mapred.Auditlogger: USER=alice IP=


Example 2 (SecurityAuth-mapred.audit)

. . .

2016-10-14 18:46:25, 200 INFO

Auth successful for (auth:SIMPLE)

2016-10-14 18:46:25,240 INFO : Authorization successful for (auth:KERBEROS) for

. . .

2016-10-14 18:47:11, 598 INFO

Auth successful for (auth:SIMPLE)

2016-10-14 18:47:11,667 INFO : Authorization successful for (auth:KERBEROS) for

. . .

Example 1 shows Alice performed the operation SUBMIT_JOB which results in MapReduce job id - job_201403112320_0001 along with date time and IP. Example 2 shows Alice authentication to job tracker, authorization and when Alice kills the running job.

YARN Audit Logs

YARN audit log events are scattered among the daemon logfiles. But they are easily identifiable because the class name is logged in the event. For the resource manager, it is org.apache.hadoop.yarn.server.resourcemanager.RMAuditLogger; and for the name manager it is org.apache.hadoop.yarn.server.nodemanager.NMAuditLogger. These class names can be used to parse out audit events from normal application logs. For YARN to log audit events, the log4j properties need to be set and the hook to set this up is the log4j.category.SecurityLogger.

HIVE Audit Logs

Hive auditing is like YARN in that it does not have a dedicated audit logfile. Audit events occur inside the actual Hive metastore service log so it can be a bit of a challenge. However, the audit logger class names can be used to identify audit events. Other Hive components, such as Hive-Server 2, do not have explicit auditing, but Audit like information can still be gleaned from the service logs.

The audit events are tagged to org.apache.hadoop.hive.metastore.HiveMetaStore.audit. This makes it easier to search the logs specifically for audit events.

With Hive, only the username is shown instead of the full Kerberos UPN, the action performed by the user is identified by the cmd field.

Cloudera Impala Audit Logs

Impala Audit trails are logged into dedicated audit logs used by each Impala daemon (impalad). The audit log directory is specified using the flag audit_event_log_dir. A typical choice is the directory /var/log/impalad/audits. These logfiles are rolled after they reach a certain “size” dictated by a number of lines, as specified using the flag max_audit_event_log_file_sizeA reasonable setting is 5,000 lines.

We will discuss HBase, Accumulo, Sentry and Log Aggregation in the next part.


As the industry is adopting Hadoop based Data Lakes, security is also maturing to enable CISO/CIO and business information security analysts to do forensics from an Audit perspective. Telecom, BFSI clients are demanding Audit log capabilities with a “boots on the ground” approach. To this effect, a better understanding of Hadoop and its ecosystems is paramount to achieving business objectives. For more information, please contact us

About the Author

Rupam Bora

ISMS & IT Manager HR, Admin & Operations - Guwahati, India Infrastructure

Previous Article
Zaloni Celebrates Diwali Through the Ancient Artform of Rangoli
Zaloni Celebrates Diwali Through the Ancient Artform of Rangoli

Diwali (or Deepawali) is one of the India's biggest festivals and is celebrated on a new moon night sometim...

Next Article
Zaloni, Dell EMC Collaboration for an End-to-End Big Data Solution
Zaloni, Dell EMC Collaboration for an End-to-End Big Data Solution

Zaloni and Dell EMC collaborate for an end-to-end Big Data solution that gives companies the ability to ing...


Get a custom demo for your team.

First Name
Last Name
Phone Number
Job Title
Comments - optional
I would like to subscribe to email updates about content and events
Zaloni is committed to the best experience for you. Read more on our Privacy Policy.
Thank you! We'll be in touch!
Error - something went wrong!