TL;DR
Distributed data analytics platforms like Spark and Hadoop are powerful but insecure by default, lacking fine-grained access control. This paper introduces "The Queen's Guard," a novel system that securely enforces fine-grained access control by combining proactive code analysis and reactive runtime defenses, specifically addressing "transient attacks" that evade detection.
What Problem Does This Paper Address?
Modern data analytics platforms, such as Apache Spark and Hadoop, are designed for performance and scalability, often at the expense of robust security. They typically offer only coarse-grained access control, usually at the file level, which is insufficient for sensitive data in multi-tier organizational settings. While "add-on" solutions exist to implement fine-grained access control, they are vulnerable to "transient attacks." These attacks, facilitated by abusing platform-provided APIs, allow attackers to bypass security controls without leaving any traces, making them particularly insidious. The paper aims to address this critical security gap by developing a system that can securely enforce fine-grained access control policies even in the presence of such sophisticated evasion techniques.
Methods
The Queen's Guard employs a two-layered defense strategy:
- Proactive Defense: This layer analyzes user-submitted code before execution. It uses static program analysis to identify and block potentially malicious code patterns that could lead to API abuse and evasion. This includes checking for specific rules related to blockable attack surfaces (like preventing classes in
org.apache.sparkpackages) and using a "soundy" (mostly sound) dataflow analysis for non-blockable surfaces like reflection APIs. An allowlisting mechanism is also used to permit legitimate uses of certain APIs. - Reactive Defense: This layer acts as a safety net during runtime. It includes:
- Binary Integrity Checking: Ensures the integrity of the trusted computing base (TCB).
- Runtime Checks: Uses Aspect-Oriented Programming (AOP) to instrument user code with inline reference monitors (IRMs). These IRMs enforce policies by injecting checks into the code.
- Sandboxing: Leverages Java Security Managers to restrict the execution of certain sensitive APIs.
- Code Rewriting: Rewrites user-submitted jobs to include runtime checks for APIs that might have evaded proactive analysis.
The system also introduces a new framework-agnostic, attribute-based access control (ABAC) framework with an enhanced policy language that supports map and filter primitives, allowing for versatile policy definitions on both structured and unstructured data.
Datasets
The paper evaluates its system using:
- TPCH Benchmark: Used to measure the performance overhead of the access control and defense mechanisms under various data sizes and cluster configurations.
- GitHub Repositories: A collection of 2120 repositories using Apache Spark was analyzed to evaluate the accuracy and soundness of the proactive defense mechanism.
Key Insights and Ideas
- Transient Attacks are a Real Threat: The paper convincingly demonstrates that simple "add-on" security solutions for distributed platforms are vulnerable to sophisticated, trace-less attacks that exploit platform APIs.
- Two-Layered Defense is Crucial: A combination of proactive static analysis and reactive runtime enforcement is necessary to effectively counter these transient attacks, as neither approach alone is sufficient.
- Framework Agnosticism is Achievable: The proposed ABAC framework and defense mechanisms are designed to be adaptable to different distributed data analytics platforms, as demonstrated by its implementation on both Spark and Hive.
- Policy Language Matters: The introduction of map and filter primitives in the policy language significantly enhances its expressiveness for handling complex access control scenarios, especially for unstructured data.
Key Results
- Low Performance Overhead: The SECUREDL system, implementing the Queen's Guard on Apache Spark, showed a median overhead of around 4.84% for AspectJ instrumentation and an additional 4.28% for JAR integrity checking, which is considered low.
- Effective Proactive Defense: Analysis of 247 analyzable JAR files from GitHub revealed issues in 21 jars, including attempts to define classes in
org.apache.sparkpackages and invocations ofClass.forNameand network access APIs, all of which were detected by the proactive defense. - TPCH Performance: For TPCH queries, the overheads ranged from approximately 2% to 16%, depending on the query complexity and the specific policies enforced. These overheads showed minimal variation with dataset size.
- Hive Integration: The system was also implemented on Hive, showing overheads ranging from 0.88% to 23.94%, with the variation attributed to whether queries accessed policy-controlled columns.
Limitations and Future Work
- Soundness of Static Analysis: The authors acknowledge that static dataflow analysis is not perfectly sound, meaning there's a theoretical possibility of missed detections. However, they mitigate this with runtime checks.
- Allowlisting Management: The effectiveness of the allowlisting mechanism relies on proper management of trusted libraries by administrators.
- Future Work: The authors suggest extending the policy language to support more complex rules, exploring more advanced static analysis techniques, and further investigating the framework-agnostic nature of their solution across a wider range of platforms. They also note that while their current map primitives are limited to regular languages, extending this to support stateful operations is a potential future direction.
Summary updated