The Queen's Guard: A Secure Enforcement of Fine-grained Access Control In Distributed Data Analytics Platforms

Fahad Shaon, Sazzadur Rahaman, Murat Kantarcioglu

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.spark packages) 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.spark packages and invocations of Class.forName and 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

Abstract

Distributed data analytics platforms (i.e., Apache Spark, Hadoop) provide high-level APIs to programmatically write analytics tasks that are run distributedly in multiple computing nodes. The design of these frameworks was primarily motivated by performance and usability. Thus, the security takes a back seat. Consequently, they do not inherently support fine-grained access control or offer any plugin mechanism to enable it, making them risky to be used in multi-tier organizational settings.There have been attempts to build “add-on” solutions to enable fine-grained access control for distributed data analytics platforms. In this paper, first, we show that straightforward enforcement of “add-on” access control is insecure under adversarial code execution. Specifically, we show that an attacker can abuse platform-provided APIs to evade access controls without leaving any traces. Second, we designed a two-layered (i.e., proactive and reactive) defense system to protect against API abuses. On submission of a user code, our proactive security layer statically screens it to find potential attack signatures prior to its execution. The reactive security layer employs code instrumentation-based runtime checks and sandboxed execution to throttle any exploits at runtime. Next, we propose a new fine-grained access control framework with an enhanced policy language that supports map and filter primitives. Finally, we build a system named SecureDL with our new access control framework and defense system on top of Apache Spark, which ensures secure access control policy enforcement under adversaries capable of executing code. To the best of our knowledge, this is the first fine-grained attribute-based access control framework for distributed data analytics platforms that is secure against platform API abuse attacks. Performance evaluation showed that the overhead due to added security is low.
BibTeX
@inproceedings{shaon2023queen,
  author = {Fahad Shaon and Sazzadur Rahaman and Murat Kantarcioglu},
  title = {{The Queen's Guard: A Secure Enforcement of Fine-grained Access Control In Distributed Data Analytics Platforms}},
  booktitle = {ACSAC},
  year = {2023},
  doi = {10.1145/3627106.3627132},
}
Figure