SlideShare a Scribd company logo
Hadoop Security
Architecture
Owen O’Malley
oom@yahoo-inc.com

Hadoop
Outline
•
•
•
•
•
•

Problem Statement
Security Threats
Solutions to Threats
HDFS
MapReduce
Oozie

• Interfaces
• Performance
• Reliability and Availability
• Operations and Monitoring
Hadoop

2
Problem Statement
• The fundamental goal of adding Hadoop security is that Yahoo's data
stored in HDFS must be secure from unauthorized access.
Furthermore, it must do so without adding significant effort to operating
or using the Grid. Based on that goal, there are a few implications.
– All HDFS clients must be authenticated to ensure that the user is
who they claim to be. That implies that all map/reduce users,
including services such as Oozie, must be also authenticated and
that tasks must run with the privileges and identity of the submitting
user.
– Since Data Nodes and TaskTrackers are entrusted with user data
and credentials, they must authenticate themselves to ensure they
are running as part of the Grid and are not trojan horses.
– Kerberos will be the underlying authentication service so that users
can be authenticated using their system credentials.
Hadoop
Communication and Threats

User
Process

Job
Tracker

Name
Node

Task
Tracker

Oozie

Data
Node

Task

NFS

MObStor

ZooKeeper

Hadoop

4
Security Threats in Hadoop
•

User to Service Authentication
– No User Authentication on NameNode or JobTracker
•

Client code supplies user and group names

– No User Authorization on DataNode – Fixed in 0.21
•

Users can read/write any block

– No User Authorization on JobTracker
•
•

•

Users can modify or kill other user’s jobs
Users can modify the persistent state of JobTracker

Service to Service Authentication
– No Authentication of DataNodes and TaskTrackers
•

•

Users can start fake DataNodes and TaskTrackers

No Encryption on Wire or Disk

Hadoop
Solutions to Threats
• Add Kerberos-based authentication to NameNode
and JobTracker.
• Add delegation tokens to HDFS and support for
them in MapReduce.
• Determine user’s group membership on the
NameNode and JobTracker.
• Protect MapReduce system directory from users.
• Add authorization model to MapReduce so that
only submitting user can modify or kill job.
• Add Backyard authentication to Web UI’s.

Hadoop

6
Out of Scope for 0.20.100
• Protecting against root on slave nodes:
– Encryption of RPC messages
– Encryption of block transfer protocol
– Encryption of MapReduce transient files
– Encryption of HDFS block files
• Passing Kerberos tickets to MapReduce
tasks for third party Kerborized services.
Hadoop

7
HDFS Security
• Users authenticate via Kerberos
• MapReduce jobs can obtain delegation
tokens for later use.
• When clients are reading or writing an HDFS
file, the NameNode generates a block
access token that will be verified by the
DataNode.
Hadoop

8
HDFS Authentication
ke r

)
b(joe

Application

Name
Node

delg(jo
e)

MapReduce
Task

kerb(hdfs)
bloc

k to

ken

Data
Node

o
ck t
blo

k en

• Clients authenticate to NameNode via:
– Kerberos
– Delegation tokens
• Client demonstrates authorization to DataNode via block
access token
• DataNode authenticates to NameNode via Kerberos
Hadoop
What does this *really* look like?
• Need a Kerberos ticket to work
– kinit –l 7d oom@DS.CORP.YAHOO.COM
– hadoop fs –ls
– hadoop jar my.jar in-dir out-dir
• Works using ticket cache!

– Can display ticket cache with klist.
Hadoop

10
Kerberos Dataflows
Key
Distribution
Center

Get TGT

Request Service Ticket

Name Node
hdfs/host@YGRID

User
joe@DS.CORP

Connect with Service Ticket

Hadoop

11
Delegation Token
• Advantages over using Kerberos directly:
– Don’t trust JobTracker with credentials
– Avoid MapReduce task authorization flood
– Renewable by third party (ie. JobTracker)
– Revocable when job finishes
• tokenId = {owner prin, renewer prin, issueDate, maxDate}
• tokenAuthenticator = HMAC(masterKey, tokenId)
• Token = {tokenId, tokenAuthenticator}
Hadoop

12
Block Access Token
• Only NameNode knows the set of users allowed to
access a specific block, so the NameNodes gives
an authorized clients a block access token.
• Capabilities include read, write, copy, or replace.
• The NameNode and DataNodes share a
dynamically rolled secret key to secure the tokens.
• tokenId={expiration, keygen, owner, block, access}
• tokenAuthenticator = HMAC(blockKey, tokenId)
• token = {tokenId, tokenAuthenticator}
Hadoop

13
MapReduce Security
• Require Kerberos authentication from client.
• Secure the information about pending and running jobs
– Store the job configuration and input splits in HDFS
under ~user/.staging/$jobid
– Store the job’s location and secrets in private directory
• JobTracker creates a random job token. It it used for:
– Connecting to TaskTracker’s RPC
– Authorizing http get for shuffle
• HMAC(job token, URL) sent from reduce tasks to TaskTracker
Hadoop

14
MapReduce Authentication
Application

kerb(joe)

Job
Tracker

kerb(mapreduce)
Task
Tracker
job token

Task

HDFS
HDFS
HDFS
)
(joe
elg
d
other
credential

trus
t

Other
Service

NFS

•

Client authenticates to JobTracker via Kerberos

•

TaskTracker authenticates to JobTracker via Kerberos

•

Task authenticates to the TaskTrackers using the job token

•

Task authenticates to HDFS using a delegation token

•

NFS is not Kerberized.

Hadoop

15
MapReduce Task Security
• Users have separate task directories with
permissions set to 700.
• Distributed cache is now divided based on
the source’s visibility
– Global – shared with other users
– Private - protected from other users

Hadoop

16
Web UI
• MapReduce makes heavy use of Web UI for
displaying state of cluster and running jobs.
• HDFS also has a web browsing interface.
• Use Backyard to authenticate Web UI users
• Only allow submitting user of job to view
stdout and stderr of job’s tasks.
• HDFS web browser checks user’s
authorization.
Hadoop

17
Oozie

• Client authenticates to Oozie
– Custom auth for Yahoo!
• Oozie authenticates to HDFS and MapReduce as
“oozie” principal
• “oozie” is configured as a super-user for HDFS and
MapReduce and may act as other users.
Hadoop

18
Proxy Services Trust Model
• Requires trust that service (eg. Oozie) principal is
secure.
• Explored and rejected
– Having user headless principals stored on
Oozie machine “x/oozie” for user “x”
– Passing user headless principal keytab to Oozie
– Generalizing delegation token to have token
granting tokens.
Hadoop

19
Protocols
• RPC
– Change RPC to use SASL and either:
• Kerberos authentication (GSSAPI)
• Tokens (DIGEST-MD5)

– User’s Kerberos tickets obtained at login used
automatically.
– Changes RPC format
– Can easily add encryption later
• Block transfer protocol
– Block access tokens in data stream
Hadoop

20
Protocols
• HTTP
– User/Browser facing
• Yahoo – Custom Authentication
• External – SPNEGO or Kerberos login module

– Web Services
• HFTP – Hadoop File Transfer Protocol
• Others later
• SPNEGO or Delegation Token via RPC

– Shuffle
• Use HMAC of URL hashed with Job Token
Hadoop

21
Summary
• RPC
– Kerberos
• Application to NameNode, JobTracker
• DataNode to NameNode
• TaskTracker to JobTracker

– Digest-MD5
• MapReduce task to NameNode, TaskTracker

• Block Access Token
• Backyard
– User to Web UI
Hadoop

22
Task
Accessing as user
Accessing as user

Backyard

Browser, 2ndNN, fsck
Browser, 2ndNN, fsck

HFTP

HTTP

NN

DIGEST-MD5

RPC

Kerberos

User (initial access),
User (initial access),
2ndNN, Balancer
2ndNN, Balancer

HTTP-DIGEST w/ delegation token
HTTP-DIGEST w/ delegation token

Task
distcp accessing as user
distcp accessing as user

HFTP

User, DN, Balancer, Task
User, DN, Balancer, Task

DN

HTTP

access token

Task

Socket

Backyard

Kerberos

Browser

Forward delegation token
Forward delegation token

Task
distcp accessing as user
distcp accessing as user

Hadoop
Backyard

JT

HTTP

RPC

User
User

Kerberos

TT

Browser
Browser

TT

Browser
Browser

HTTP

RPC

Task

DIGEST-MD5

Backyard

Kerberos

-HMAC

Local Task
Local Task

Hadoop

Task
Reduce Task getting
Reduce Task getting
Map output
Map output
Authentication Paths
Job
Tracker

Oozie

Browser

Name
Node

Data
Node

Task
Tracker

NFS
User
Process

Task

MObStor

ZooKeeper

Hadoop

HTTP backyard
HTTP HMAC
RPC Kerberos
RPC DIGEST
Block Access
Third Party

25
Interfaces (and their scope and stability)
•

Imported Interfaces
–
–

SASL – Standard for supporting token and Kerberos authentication

–

GSSAPI – Kerberos part of SASL authentication

–

HMAC-SHA1 – Shared secret authentication

–

•

JAAS – Java API for supporting authentication

SPNEGO – Use Kerberos tickets over HTTP

Exported Interfaces – Both Limited Private
–
–

•

HDFS adds a method to get delegation tokens
RPC adds a doAs method

Major Internal (Inter-system Interfaces)
–

MapReduce Shuffle uses HMAC-SHA1

–

RPC uses Kerberos and DIGEST-MD5

Hadoop

26
Pluggability
• Pluggability in Hadoop supports different environments
• HTTP browser user authentication
– Yahoo – Backyard
– External – SPNEGO or Kerberos login module
• RPC transport
– SASL supports DIGEST-MD5, Kerberos, and others
• Acquiring credentials
– JAAS supports Kerberos, and others

Hadoop

27
Performance
• The authentication should not introduce
substantial performance penalties.
• Delegation token design to avoid
authentication flood by MapReduce tasks
• Required to be less than 3% on GridMix.

Hadoop

28
Reliability and Availability
• The Kerberos KDC can not be a single point of failure.
– Kerberos clients automatically fail over to secondary KDC’s
– Secondary KDC’s can be sync’ed automatically from the primary
since the data rarely changes.
• The cluster must remain stable when Kerberos fails.
– The slaves (TaskTrackers and DataNodes) will lose their ability to
reconnect to the master, when their RPC socket closes, their service
ticket has expired, and both the primary and secondary KDC’s have
failed.
– Decided not to use special tokens to handle this case.
• Once the MapReduce job is submitted, the KDC is not required for the
job to continue running.
Hadoop

29
Operations and Monitoring
• The number of Kerberos authorizations will be
logged on the NameNode and JobTracker.
• Authorization failures will be logged.
• Authentication failures will be logged.
• The authorization logs will be a separate log4j
logger, so they can be directed to a separate file.

Hadoop

30

More Related Content

What's hot (20)

PPTX
Hive + Tez: A Performance Deep Dive
DataWorks Summit
 
PPTX
ORC File - Optimizing Your Big Data
DataWorks Summit
 
PPTX
Apache Ranger
Rommel Garcia
 
PPTX
Introduction to Hadoop and Hadoop component
rebeccatho
 
PPTX
Apache Tez - A New Chapter in Hadoop Data Processing
DataWorks Summit
 
PDF
Efficient Data Storage for Analytics with Apache Parquet 2.0
Cloudera, Inc.
 
PPTX
Hadoop Backup and Disaster Recovery
Cloudera, Inc.
 
PPTX
Hadoop Security Today & Tomorrow with Apache Knox
Vinay Shukla
 
PDF
Introduction and Overview of Apache Kafka, TriHUG July 23, 2013
mumrah
 
PDF
Spark shuffle introduction
colorant
 
PPTX
Processing Large Data with Apache Spark -- HasGeek
Venkata Naga Ravi
 
PDF
H2O - the optimized HTTP server
Kazuho Oku
 
PDF
Spark SQL
Joud Khattab
 
PDF
Apache Spark PDF
Naresh Rupareliya
 
PDF
Apache Spark Introduction
sudhakara st
 
PDF
Efficient Data Storage for Analytics with Parquet 2.0 - Hadoop Summit 2014
Julien Le Dem
 
PDF
Hadoop Security
Timothy Spann
 
PPTX
Using Apache Hive with High Performance
Inderaj (Raj) Bains
 
PPTX
Apache Spark
SugumarSarDurai
 
PDF
Understanding Query Plans and Spark UIs
Databricks
 
Hive + Tez: A Performance Deep Dive
DataWorks Summit
 
ORC File - Optimizing Your Big Data
DataWorks Summit
 
Apache Ranger
Rommel Garcia
 
Introduction to Hadoop and Hadoop component
rebeccatho
 
Apache Tez - A New Chapter in Hadoop Data Processing
DataWorks Summit
 
Efficient Data Storage for Analytics with Apache Parquet 2.0
Cloudera, Inc.
 
Hadoop Backup and Disaster Recovery
Cloudera, Inc.
 
Hadoop Security Today & Tomorrow with Apache Knox
Vinay Shukla
 
Introduction and Overview of Apache Kafka, TriHUG July 23, 2013
mumrah
 
Spark shuffle introduction
colorant
 
Processing Large Data with Apache Spark -- HasGeek
Venkata Naga Ravi
 
H2O - the optimized HTTP server
Kazuho Oku
 
Spark SQL
Joud Khattab
 
Apache Spark PDF
Naresh Rupareliya
 
Apache Spark Introduction
sudhakara st
 
Efficient Data Storage for Analytics with Parquet 2.0 - Hadoop Summit 2014
Julien Le Dem
 
Hadoop Security
Timothy Spann
 
Using Apache Hive with High Performance
Inderaj (Raj) Bains
 
Apache Spark
SugumarSarDurai
 
Understanding Query Plans and Spark UIs
Databricks
 

Viewers also liked (20)

PPTX
Hadoop security
Shivaji Dutta
 
PPTX
Kerberos, Token and Hadoop
Kai Zheng
 
PDF
Hadoop Security: Overview
Cloudera, Inc.
 
PDF
Hadoop & Security - Past, Present, Future
Uwe Printz
 
PPTX
Apache Knox Gateway "Single Sign On" expands the reach of the Enterprise Users
DataWorks Summit
 
PPTX
Big Data and Security - Where are we now? (2015)
Peter Wood
 
PPTX
An Approach for Multi-Tenancy Through Apache Knox
DataWorks Summit/Hadoop Summit
 
PPTX
Apache Knox setup and hive and hdfs Access using KNOX
Abhishek Mallick
 
PPT
Information security in big data -privacy and data mining
harithavijay94
 
PPTX
Built-In Security for the Cloud
DataWorks Summit
 
PPTX
Improvements in Hadoop Security
DataWorks Summit
 
PPTX
Securing Hadoop's REST APIs with Apache Knox Gateway Hadoop Summit June 6th, ...
Kevin Minder
 
PPTX
Hdp security overview
Hortonworks
 
PDF
Big Data Security with Hadoop
Cloudera, Inc.
 
PPTX
Troubleshooting Kerberos in Hadoop: Taming the Beast
DataWorks Summit
 
PPTX
Treat your enterprise data lake indigestion: Enterprise ready security and go...
DataWorks Summit
 
PPTX
Hadoop and Data Access Security
Cloudera, Inc.
 
PDF
OAuth - Open API Authentication
leahculver
 
PDF
Hadoop Internals (2.3.0 or later)
Emilio Coppa
 
Hadoop security
Shivaji Dutta
 
Kerberos, Token and Hadoop
Kai Zheng
 
Hadoop Security: Overview
Cloudera, Inc.
 
Hadoop & Security - Past, Present, Future
Uwe Printz
 
Apache Knox Gateway "Single Sign On" expands the reach of the Enterprise Users
DataWorks Summit
 
Big Data and Security - Where are we now? (2015)
Peter Wood
 
An Approach for Multi-Tenancy Through Apache Knox
DataWorks Summit/Hadoop Summit
 
Apache Knox setup and hive and hdfs Access using KNOX
Abhishek Mallick
 
Information security in big data -privacy and data mining
harithavijay94
 
Built-In Security for the Cloud
DataWorks Summit
 
Improvements in Hadoop Security
DataWorks Summit
 
Securing Hadoop's REST APIs with Apache Knox Gateway Hadoop Summit June 6th, ...
Kevin Minder
 
Hdp security overview
Hortonworks
 
Big Data Security with Hadoop
Cloudera, Inc.
 
Troubleshooting Kerberos in Hadoop: Taming the Beast
DataWorks Summit
 
Treat your enterprise data lake indigestion: Enterprise ready security and go...
DataWorks Summit
 
Hadoop and Data Access Security
Cloudera, Inc.
 
OAuth - Open API Authentication
leahculver
 
Hadoop Internals (2.3.0 or later)
Emilio Coppa
 
Ad

Similar to Hadoop Security Architecture (20)

PPTX
Securing the Hadoop Ecosystem
DataWorks Summit
 
PPT
Hadoop Security Preview
Hadoop User Group
 
PPT
Hadoop Security Preview
Hadoop User Group
 
PPT
Hadoop Security Preview
Hadoop User Group
 
PPTX
Securing Hadoop - MapR Technologies
MapR Technologies
 
PPT
1 hadoop security_in_details_hadoop_summit2010
Hadoop User Group
 
PPT
Hadoop Security in Detail__HadoopSummit2010
Yahoo Developer Network
 
PDF
Plugging the Holes: Security and Compatability in Hadoop
Owen O'Malley
 
PDF
Hw09 Security And Api Compatibility
Cloudera, Inc.
 
PDF
Technical tips for secure Apache Hadoop cluster #ApacheConAsia #ApacheCon
Yahoo!デベロッパーネットワーク
 
PDF
Hadoop World 2011: Hadoop Gateway - Konstantin Schvako, eBay
Cloudera, Inc.
 
PPTX
Big data security
Joey Echeverria
 
PPTX
Big Data Warehousing Meetup: Securing the Hadoop Ecosystem by Cloudera
Caserta
 
PPTX
Apache Hadoop India Summit 2011 talk "Making Apache Hadoop Secure" by Devaraj...
Yahoo Developer Network
 
PPTX
Map r hadoop-security-mar2014 (2)
MapR Technologies
 
PPTX
Securing Hadoop by MapR's Senior Principal Technologist Keys Botzum
MapR Technologies
 
PDF
2014 sept 4_hadoop_security
Adam Muise
 
PPTX
Improvements in Hadoop Security
Chris Nauroth
 
PPTX
Hadoop security @ Philly Hadoop Meetup May 2015
Shravan (Sean) Pabba
 
PDF
Securing Hadoop by Sr. Principal Technologist Keys Botzum
MapR Technologies
 
Securing the Hadoop Ecosystem
DataWorks Summit
 
Hadoop Security Preview
Hadoop User Group
 
Hadoop Security Preview
Hadoop User Group
 
Hadoop Security Preview
Hadoop User Group
 
Securing Hadoop - MapR Technologies
MapR Technologies
 
1 hadoop security_in_details_hadoop_summit2010
Hadoop User Group
 
Hadoop Security in Detail__HadoopSummit2010
Yahoo Developer Network
 
Plugging the Holes: Security and Compatability in Hadoop
Owen O'Malley
 
Hw09 Security And Api Compatibility
Cloudera, Inc.
 
Technical tips for secure Apache Hadoop cluster #ApacheConAsia #ApacheCon
Yahoo!デベロッパーネットワーク
 
Hadoop World 2011: Hadoop Gateway - Konstantin Schvako, eBay
Cloudera, Inc.
 
Big data security
Joey Echeverria
 
Big Data Warehousing Meetup: Securing the Hadoop Ecosystem by Cloudera
Caserta
 
Apache Hadoop India Summit 2011 talk "Making Apache Hadoop Secure" by Devaraj...
Yahoo Developer Network
 
Map r hadoop-security-mar2014 (2)
MapR Technologies
 
Securing Hadoop by MapR's Senior Principal Technologist Keys Botzum
MapR Technologies
 
2014 sept 4_hadoop_security
Adam Muise
 
Improvements in Hadoop Security
Chris Nauroth
 
Hadoop security @ Philly Hadoop Meetup May 2015
Shravan (Sean) Pabba
 
Securing Hadoop by Sr. Principal Technologist Keys Botzum
MapR Technologies
 
Ad

More from Owen O'Malley (20)

PPTX
Running An Apache Project: 10 Traps and How to Avoid Them
Owen O'Malley
 
PPTX
Big Data's Journey to ACID
Owen O'Malley
 
PPTX
ORC Deep Dive 2020
Owen O'Malley
 
PPTX
Protect your private data with ORC column encryption
Owen O'Malley
 
PPTX
Fine Grain Access Control for Big Data: ORC Column Encryption
Owen O'Malley
 
PPTX
Fast Access to Your Data - Avro, JSON, ORC, and Parquet
Owen O'Malley
 
PDF
Strata NYC 2018 Iceberg
Owen O'Malley
 
PPTX
Fast Spark Access To Your Complex Data - Avro, JSON, ORC, and Parquet
Owen O'Malley
 
PPTX
ORC Column Encryption
Owen O'Malley
 
PPTX
File Format Benchmarks - Avro, JSON, ORC, & Parquet
Owen O'Malley
 
PPTX
Protecting Enterprise Data in Apache Hadoop
Owen O'Malley
 
PPTX
Data protection2015
Owen O'Malley
 
PPTX
Structor - Automated Building of Virtual Hadoop Clusters
Owen O'Malley
 
PPTX
Adding ACID Updates to Hive
Owen O'Malley
 
PPTX
ORC File and Vectorization - Hadoop Summit 2013
Owen O'Malley
 
PDF
ORC Files
Owen O'Malley
 
PPTX
ORC File Introduction
Owen O'Malley
 
PDF
Optimizing Hive Queries
Owen O'Malley
 
PDF
Next Generation Hadoop Operations
Owen O'Malley
 
PDF
Next Generation MapReduce
Owen O'Malley
 
Running An Apache Project: 10 Traps and How to Avoid Them
Owen O'Malley
 
Big Data's Journey to ACID
Owen O'Malley
 
ORC Deep Dive 2020
Owen O'Malley
 
Protect your private data with ORC column encryption
Owen O'Malley
 
Fine Grain Access Control for Big Data: ORC Column Encryption
Owen O'Malley
 
Fast Access to Your Data - Avro, JSON, ORC, and Parquet
Owen O'Malley
 
Strata NYC 2018 Iceberg
Owen O'Malley
 
Fast Spark Access To Your Complex Data - Avro, JSON, ORC, and Parquet
Owen O'Malley
 
ORC Column Encryption
Owen O'Malley
 
File Format Benchmarks - Avro, JSON, ORC, & Parquet
Owen O'Malley
 
Protecting Enterprise Data in Apache Hadoop
Owen O'Malley
 
Data protection2015
Owen O'Malley
 
Structor - Automated Building of Virtual Hadoop Clusters
Owen O'Malley
 
Adding ACID Updates to Hive
Owen O'Malley
 
ORC File and Vectorization - Hadoop Summit 2013
Owen O'Malley
 
ORC Files
Owen O'Malley
 
ORC File Introduction
Owen O'Malley
 
Optimizing Hive Queries
Owen O'Malley
 
Next Generation Hadoop Operations
Owen O'Malley
 
Next Generation MapReduce
Owen O'Malley
 

Recently uploaded (20)

PDF
Empower Inclusion Through Accessible Java Applications
Ana-Maria Mihalceanu
 
PDF
Empowering Cloud Providers with Apache CloudStack and Stackbill
ShapeBlue
 
PDF
Building Resilience with Digital Twins : Lessons from Korea
SANGHEE SHIN
 
PDF
Blockchain Transactions Explained For Everyone
CIFDAQ
 
PDF
SFWelly Summer 25 Release Highlights July 2025
Anna Loughnan Colquhoun
 
PDF
Women in Automation Presents: Reinventing Yourself — Bold Career Pivots That ...
DianaGray10
 
PPTX
UiPath Academic Alliance Educator Panels: Session 2 - Business Analyst Content
DianaGray10
 
PDF
Fl Studio 24.2.2 Build 4597 Crack for Windows Free Download 2025
faizk77g
 
PDF
Rethinking Security Operations - SOC Evolution Journey.pdf
Haris Chughtai
 
PDF
Smart Air Quality Monitoring with Serrax AQM190 LITE
SERRAX TECHNOLOGIES LLP
 
PDF
Building Real-Time Digital Twins with IBM Maximo & ArcGIS Indoors
Safe Software
 
PDF
Chris Elwell Woburn, MA - Passionate About IT Innovation
Chris Elwell Woburn, MA
 
PPTX
Top iOS App Development Company in the USA for Innovative Apps
SynapseIndia
 
PDF
NewMind AI Journal - Weekly Chronicles - July'25 Week II
NewMind AI
 
PDF
July Patch Tuesday
Ivanti
 
PDF
Apache CloudStack 201: Let's Design & Build an IaaS Cloud
ShapeBlue
 
PDF
TrustArc Webinar - Data Privacy Trends 2025: Mid-Year Insights & Program Stra...
TrustArc
 
PDF
Complete JavaScript Notes: From Basics to Advanced Concepts.pdf
haydendavispro
 
PPTX
Building a Production-Ready Barts Health Secure Data Environment Tooling, Acc...
Barts Health
 
PDF
SWEBOK Guide and Software Services Engineering Education
Hironori Washizaki
 
Empower Inclusion Through Accessible Java Applications
Ana-Maria Mihalceanu
 
Empowering Cloud Providers with Apache CloudStack and Stackbill
ShapeBlue
 
Building Resilience with Digital Twins : Lessons from Korea
SANGHEE SHIN
 
Blockchain Transactions Explained For Everyone
CIFDAQ
 
SFWelly Summer 25 Release Highlights July 2025
Anna Loughnan Colquhoun
 
Women in Automation Presents: Reinventing Yourself — Bold Career Pivots That ...
DianaGray10
 
UiPath Academic Alliance Educator Panels: Session 2 - Business Analyst Content
DianaGray10
 
Fl Studio 24.2.2 Build 4597 Crack for Windows Free Download 2025
faizk77g
 
Rethinking Security Operations - SOC Evolution Journey.pdf
Haris Chughtai
 
Smart Air Quality Monitoring with Serrax AQM190 LITE
SERRAX TECHNOLOGIES LLP
 
Building Real-Time Digital Twins with IBM Maximo & ArcGIS Indoors
Safe Software
 
Chris Elwell Woburn, MA - Passionate About IT Innovation
Chris Elwell Woburn, MA
 
Top iOS App Development Company in the USA for Innovative Apps
SynapseIndia
 
NewMind AI Journal - Weekly Chronicles - July'25 Week II
NewMind AI
 
July Patch Tuesday
Ivanti
 
Apache CloudStack 201: Let's Design & Build an IaaS Cloud
ShapeBlue
 
TrustArc Webinar - Data Privacy Trends 2025: Mid-Year Insights & Program Stra...
TrustArc
 
Complete JavaScript Notes: From Basics to Advanced Concepts.pdf
haydendavispro
 
Building a Production-Ready Barts Health Secure Data Environment Tooling, Acc...
Barts Health
 
SWEBOK Guide and Software Services Engineering Education
Hironori Washizaki
 

Hadoop Security Architecture

  • 2. Outline • • • • • • Problem Statement Security Threats Solutions to Threats HDFS MapReduce Oozie • Interfaces • Performance • Reliability and Availability • Operations and Monitoring Hadoop 2
  • 3. Problem Statement • The fundamental goal of adding Hadoop security is that Yahoo's data stored in HDFS must be secure from unauthorized access. Furthermore, it must do so without adding significant effort to operating or using the Grid. Based on that goal, there are a few implications. – All HDFS clients must be authenticated to ensure that the user is who they claim to be. That implies that all map/reduce users, including services such as Oozie, must be also authenticated and that tasks must run with the privileges and identity of the submitting user. – Since Data Nodes and TaskTrackers are entrusted with user data and credentials, they must authenticate themselves to ensure they are running as part of the Grid and are not trojan horses. – Kerberos will be the underlying authentication service so that users can be authenticated using their system credentials. Hadoop
  • 5. Security Threats in Hadoop • User to Service Authentication – No User Authentication on NameNode or JobTracker • Client code supplies user and group names – No User Authorization on DataNode – Fixed in 0.21 • Users can read/write any block – No User Authorization on JobTracker • • • Users can modify or kill other user’s jobs Users can modify the persistent state of JobTracker Service to Service Authentication – No Authentication of DataNodes and TaskTrackers • • Users can start fake DataNodes and TaskTrackers No Encryption on Wire or Disk Hadoop
  • 6. Solutions to Threats • Add Kerberos-based authentication to NameNode and JobTracker. • Add delegation tokens to HDFS and support for them in MapReduce. • Determine user’s group membership on the NameNode and JobTracker. • Protect MapReduce system directory from users. • Add authorization model to MapReduce so that only submitting user can modify or kill job. • Add Backyard authentication to Web UI’s. Hadoop 6
  • 7. Out of Scope for 0.20.100 • Protecting against root on slave nodes: – Encryption of RPC messages – Encryption of block transfer protocol – Encryption of MapReduce transient files – Encryption of HDFS block files • Passing Kerberos tickets to MapReduce tasks for third party Kerborized services. Hadoop 7
  • 8. HDFS Security • Users authenticate via Kerberos • MapReduce jobs can obtain delegation tokens for later use. • When clients are reading or writing an HDFS file, the NameNode generates a block access token that will be verified by the DataNode. Hadoop 8
  • 9. HDFS Authentication ke r ) b(joe Application Name Node delg(jo e) MapReduce Task kerb(hdfs) bloc k to ken Data Node o ck t blo k en • Clients authenticate to NameNode via: – Kerberos – Delegation tokens • Client demonstrates authorization to DataNode via block access token • DataNode authenticates to NameNode via Kerberos Hadoop
  • 10. What does this *really* look like? • Need a Kerberos ticket to work – kinit –l 7d [email protected] – hadoop fs –ls – hadoop jar my.jar in-dir out-dir • Works using ticket cache! – Can display ticket cache with klist. Hadoop 10
  • 11. Kerberos Dataflows Key Distribution Center Get TGT Request Service Ticket Name Node hdfs/host@YGRID User [email protected] Connect with Service Ticket Hadoop 11
  • 12. Delegation Token • Advantages over using Kerberos directly: – Don’t trust JobTracker with credentials – Avoid MapReduce task authorization flood – Renewable by third party (ie. JobTracker) – Revocable when job finishes • tokenId = {owner prin, renewer prin, issueDate, maxDate} • tokenAuthenticator = HMAC(masterKey, tokenId) • Token = {tokenId, tokenAuthenticator} Hadoop 12
  • 13. Block Access Token • Only NameNode knows the set of users allowed to access a specific block, so the NameNodes gives an authorized clients a block access token. • Capabilities include read, write, copy, or replace. • The NameNode and DataNodes share a dynamically rolled secret key to secure the tokens. • tokenId={expiration, keygen, owner, block, access} • tokenAuthenticator = HMAC(blockKey, tokenId) • token = {tokenId, tokenAuthenticator} Hadoop 13
  • 14. MapReduce Security • Require Kerberos authentication from client. • Secure the information about pending and running jobs – Store the job configuration and input splits in HDFS under ~user/.staging/$jobid – Store the job’s location and secrets in private directory • JobTracker creates a random job token. It it used for: – Connecting to TaskTracker’s RPC – Authorizing http get for shuffle • HMAC(job token, URL) sent from reduce tasks to TaskTracker Hadoop 14
  • 15. MapReduce Authentication Application kerb(joe) Job Tracker kerb(mapreduce) Task Tracker job token Task HDFS HDFS HDFS ) (joe elg d other credential trus t Other Service NFS • Client authenticates to JobTracker via Kerberos • TaskTracker authenticates to JobTracker via Kerberos • Task authenticates to the TaskTrackers using the job token • Task authenticates to HDFS using a delegation token • NFS is not Kerberized. Hadoop 15
  • 16. MapReduce Task Security • Users have separate task directories with permissions set to 700. • Distributed cache is now divided based on the source’s visibility – Global – shared with other users – Private - protected from other users Hadoop 16
  • 17. Web UI • MapReduce makes heavy use of Web UI for displaying state of cluster and running jobs. • HDFS also has a web browsing interface. • Use Backyard to authenticate Web UI users • Only allow submitting user of job to view stdout and stderr of job’s tasks. • HDFS web browser checks user’s authorization. Hadoop 17
  • 18. Oozie • Client authenticates to Oozie – Custom auth for Yahoo! • Oozie authenticates to HDFS and MapReduce as “oozie” principal • “oozie” is configured as a super-user for HDFS and MapReduce and may act as other users. Hadoop 18
  • 19. Proxy Services Trust Model • Requires trust that service (eg. Oozie) principal is secure. • Explored and rejected – Having user headless principals stored on Oozie machine “x/oozie” for user “x” – Passing user headless principal keytab to Oozie – Generalizing delegation token to have token granting tokens. Hadoop 19
  • 20. Protocols • RPC – Change RPC to use SASL and either: • Kerberos authentication (GSSAPI) • Tokens (DIGEST-MD5) – User’s Kerberos tickets obtained at login used automatically. – Changes RPC format – Can easily add encryption later • Block transfer protocol – Block access tokens in data stream Hadoop 20
  • 21. Protocols • HTTP – User/Browser facing • Yahoo – Custom Authentication • External – SPNEGO or Kerberos login module – Web Services • HFTP – Hadoop File Transfer Protocol • Others later • SPNEGO or Delegation Token via RPC – Shuffle • Use HMAC of URL hashed with Job Token Hadoop 21
  • 22. Summary • RPC – Kerberos • Application to NameNode, JobTracker • DataNode to NameNode • TaskTracker to JobTracker – Digest-MD5 • MapReduce task to NameNode, TaskTracker • Block Access Token • Backyard – User to Web UI Hadoop 22
  • 23. Task Accessing as user Accessing as user Backyard Browser, 2ndNN, fsck Browser, 2ndNN, fsck HFTP HTTP NN DIGEST-MD5 RPC Kerberos User (initial access), User (initial access), 2ndNN, Balancer 2ndNN, Balancer HTTP-DIGEST w/ delegation token HTTP-DIGEST w/ delegation token Task distcp accessing as user distcp accessing as user HFTP User, DN, Balancer, Task User, DN, Balancer, Task DN HTTP access token Task Socket Backyard Kerberos Browser Forward delegation token Forward delegation token Task distcp accessing as user distcp accessing as user Hadoop
  • 26. Interfaces (and their scope and stability) • Imported Interfaces – – SASL – Standard for supporting token and Kerberos authentication – GSSAPI – Kerberos part of SASL authentication – HMAC-SHA1 – Shared secret authentication – • JAAS – Java API for supporting authentication SPNEGO – Use Kerberos tickets over HTTP Exported Interfaces – Both Limited Private – – • HDFS adds a method to get delegation tokens RPC adds a doAs method Major Internal (Inter-system Interfaces) – MapReduce Shuffle uses HMAC-SHA1 – RPC uses Kerberos and DIGEST-MD5 Hadoop 26
  • 27. Pluggability • Pluggability in Hadoop supports different environments • HTTP browser user authentication – Yahoo – Backyard – External – SPNEGO or Kerberos login module • RPC transport – SASL supports DIGEST-MD5, Kerberos, and others • Acquiring credentials – JAAS supports Kerberos, and others Hadoop 27
  • 28. Performance • The authentication should not introduce substantial performance penalties. • Delegation token design to avoid authentication flood by MapReduce tasks • Required to be less than 3% on GridMix. Hadoop 28
  • 29. Reliability and Availability • The Kerberos KDC can not be a single point of failure. – Kerberos clients automatically fail over to secondary KDC’s – Secondary KDC’s can be sync’ed automatically from the primary since the data rarely changes. • The cluster must remain stable when Kerberos fails. – The slaves (TaskTrackers and DataNodes) will lose their ability to reconnect to the master, when their RPC socket closes, their service ticket has expired, and both the primary and secondary KDC’s have failed. – Decided not to use special tokens to handle this case. • Once the MapReduce job is submitted, the KDC is not required for the job to continue running. Hadoop 29
  • 30. Operations and Monitoring • The number of Kerberos authorizations will be logged on the NameNode and JobTracker. • Authorization failures will be logged. • Authentication failures will be logged. • The authorization logs will be a separate log4j logger, so they can be directed to a separate file. Hadoop 30