The construction of big data applications based on open source software has become increasingly uncomplicated since the advent of projects like Data on EKS, an open source project from AWS to provide blueprints for building data and machine learning (ML) applications on Amazon Elastic Kubernetes Service (Amazon EKS). In the realm of big data, securing data on cloud applications is crucial. This post explores the deployment of Apache Ranger for permission management within the Hadoop ecosystem on Amazon EKS. We show how Ranger integrates with Hadoop components like Apache Hive, Spark, Trino, Yarn, and HDFS, providing secure and efficient data management in a cloud environment. Join us as we navigate these advanced security strategies in the context of Kubernetes and cloud computing.
Overview of solution The Amber Group’s Data on EKS Platform (DEP) is a Kubernetes-based, cloud-centered big data platform that revolutionizes the way we handle data in EKS environments. Developed by Amber Group’s Data Team, DEP integrates with familiar components like Apache Hive, Spark, Flink, Trino, HDFS, and more, making it a versatile and comprehensive solution for data management and BI platforms.
The following diagram illustrates the solution architecture.
Effective permission management is crucial for several key reasons:
Apache Ranger is a comprehensive framework designed for data governance and security in Hadoop ecosystems. It provides a centralized framework to define, administer, and manage security policies consistently across various Hadoop components. Ranger specializes in fine-grained access control, offering detailed management of user permissions and auditing capabilities.
Ranger’s architecture is designed to integrate smoothly with various big data tools such as Hadoop, Hive, HBase, and Spark. The key components of Ranger include:
The following flowchart illustrates the priority levels for matching policies.
The priority levels are as follows:
Our Amazon EKS-based deployment includes the following components:
By the end of this deployment process, we will have realized the following benefits:
Deploy a big data cluster on Amazon EKS and configure Ranger for access control In this section, we outline the process of deploying a big data cluster on AWS EKS and configuring Ranger for access control. We use AWS CloudFormation templates for quick deployment of a big data environment on Amazon EKS with Apache Ranger.
Complete the following steps:
dep-demo-eks-cluster-ap-northeast-1. For example:
aws eks update-kubeconfig --name dep-eks-cluster-ap-northeast-1 --region ap-northeast-1## Check pod status.kubectl get pods --namespace hadoopkubectl get pods --namespace platformkubectl get pods --namespace trinolocalhost:6080 in your browser.By default, you have already created two policies: Hive and Trino, and granted all access to the LDAP user you created (depadmin in this case).
Also, the LDAP user sync service is set up and will automatically sync all users from the LDAP service created in this template.
Example permission configuration In a practical application within a company, permissions for tables and fields in the data warehouse are divided based on business departments, isolating sensitive data for different business units. This provides data security and orderly conduct of daily business operations. The following screenshots show an example business configuration.
The following is an example of an Apache Ranger permission configuration.
The following screenshots show users associated with roles.
When performing data queries, using Hive and Spark as examples, we can demonstrate the comparison before and after permission configuration.
The following screenshot shows an example of Hive SQL (running on superset) with privileges denied.
The following screenshot shows an example of Spark SQL (running on IDE) with privileges denied.
The following screenshot shows an example of Spark SQL (running on IDE) with permissions permitting.
Based on this example and considering your enterprise requirements, it becomes feasible and flexible to manage permissions in the data warehouse effectively.
Conclusion This post provided a comprehensive guide on permission management in big data, particularly within the Amazon EKS platform using Apache Ranger, that equips you with the essential knowledge and tools for robust data security and management. By implementing the strategies and understanding the components detailed in this post, you can effectively manage permissions, implementing data security and compliance in your big data environments.
About the Authors Yuzhu Xiao is a Senior Data Development Engineer at Amber Group with extensive experience in cloud data platform architecture. He has many years of experience in AWS Cloud platform data architecture and development, primarily focusing on efficiency optimization and cost control of enterprise cloud architectures. Xin Zhang is an AWS Solutions Architect, responsible for solution consulting and design based on the AWS Cloud platform. He has a rich experience in R&D and architecture practice in the fields of system architecture, data warehousing, and real-time computing.