Hadoop Security Overview: Authentication, Authorization, Audit and Encryption
Default Hadoop Is Not Secure
Important: A fresh Hadoop cluster uses simple authentication: the client just says who it is. Anyone who can reach the cluster can pretend to be
hdfs and read everything. Security must be turned on deliberately.
The Four Pillars
| Pillar | Question | Tools |
|---|---|---|
| Authentication | Who are you? | Kerberos, LDAP/AD for UIs, delegation tokens |
| Authorization | What may you do? | HDFS permissions and ACLs, YARN queue ACLs, Apache Ranger |
| Audit | What did you do? | HDFS audit log, Ranger audit, SIEM |
| Data protection | Can others read it? | Wire encryption (TLS/SASL), HDFS encryption zones, disk encryption |
Layers in a Secure Cluster
text
Users / BI tools
| HTTPS (TLS)
[ Knox gateway ] <- single entry for REST and UIs, LDAP login
|
Kerberos-authenticated RPC with SASL privacy
|
HDFS / YARN / Hive / HBase / Kafka <- authorised by Ranger + native permissions
|
Encryption zones (KMS) + disk encryption (LUKS)
|
Audit -> Ranger audit store + syslog/SIEM
Authentication Options
| Method | Use |
|---|---|
| Kerberos | Service-to-service and users on the command line. The standard for Hadoop |
| LDAP / Active Directory | Users of web UIs and gateways like Knox, HiveServer2 |
| SPNEGO | Kerberos for browsers and REST endpoints |
| Delegation tokens | Short-lived credentials given to jobs so tasks do not need your ticket |
| Simple | Only in a closed lab |
Service Level Authorization
xml
<!-- core-site.xml -->
<property><name>hadoop.security.authorization</name><value>true</value></property>
<!-- hadoop-policy.xml : which users/groups may talk to which protocol -->
<property><name>security.client.protocol.acl</name><value>*</value></property>
<property><name>security.datanode.protocol.acl</name><value>hdfs</value></property>
<property><name>security.admin.operations.protocol.acl</name><value>hdfs hadoop_admins</value></property>
bash
hdfs dfsadmin -refreshServiceAcl
yarn rmadmin -refreshServiceAcl
Roles and Separation of Duties
- Platform admins: run services, no access to business data by default
- Security admins: manage Ranger policies, keys and Kerberos
- Data owners: approve access to their datasets
- Users: access only what they need through groups
Hardening Checklist
- Kerberos enabled for HDFS, YARN, Hive, HBase, Kafka, ZooKeeper
hadoop.rpc.protection=privacy,dfs.data.transfer.protection=privacydfs.http.policy=HTTPS_ONLYand TLS on all web UIs- Ranger plugins enabled with deny-by-default thinking
- Encryption zones for sensitive paths with KMS HA
- Service accounts per service, no shared logins
- Firewall: only edge and gateway nodes reachable by users
- Audit logs shipped off-cluster and retained
- OS patching and a vulnerability scan routine
- Remove default passwords on Ambari, databases, Grafana
Build in stages: Do not enable everything in one night. A typical order: Kerberos, then wire encryption and TLS, then Ranger, then encryption zones, then Knox. Test each stage.
Conclusion
Hadoop security means authentication, authorization, audit and encryption. Turn on Kerberos first, then layer TLS, Ranger, KMS encryption and a gateway, and keep audit data off the cluster.
Quick Summary: AAA + encryption; Kerberos first; Ranger for policies; Knox as gateway.

