Skip to main content
BRILLIQS

Apache Ranger

An open source framework for defining and enforcing access policies across Hadoop and related data services.

Apache Ranger is an open source project for managing access to data services. Policies are defined centrally through an administration interface and enforced by plugins installed into each supported service. It covers permissions on databases, tables and columns, and records access decisions for auditing.

Access control in an environment of many services

A Hadoop environment is not one system. It is several services that happen to share storage and a cluster: a query engine, a store for records, an ingestion service, a processing framework.

Each has some notion of permissions of its own. Left alone, that means access rules configured separately in every service, in different formats, by whoever set that service up.

The consequences are predictable. The same rule is expressed differently in different places. A person removed from a team loses access in three services and keeps it in a fourth. Nobody can state with confidence who can reach a particular table, because answering requires checking several systems.

Apache Ranger addresses this by defining policies centrally and enforcing them within each service.

Two parts

The design has two components, and understanding the split explains most of its behaviour.

Administration is central. There is one place where policies are defined, reviewed and changed, with an interface for managing them.

Enforcement is distributed. Each supported service has a plugin installed into it. The plugin retrieves policies and evaluates each incoming request against them.

The reason for enforcing inside the service rather than in front of it is worth stating, because it is the part that matters for whether the control is real.

A control placed in front of a service protects requests going through the front. Anything reaching the service by another route is unaffected. In an environment where services are accessed by several tools, through several interfaces, that is a meaningful gap.

A plugin running within the service evaluates requests arriving by any supported path. The control is at the point where access actually happens.

What a policy can say

Policies grant permissions to users and groups, and they can be specific about what.

Access is expressible at database, table and column level. That granularity matters because sensitivity is rarely uniform across a table. A table of customer records may be broadly useful while three columns in it are not, and without column level control the choice is between exposing everything and exposing nothing.

The usual result of that binary choice is that people copy the data, remove the sensitive columns and share the copy. That copy then has no governance at all, which is worse than the problem it solved.

Auditing

Access decisions are recorded.

The reason this is a core feature rather than an addition is that governance obligations are usually about demonstrating something rather than only doing it. The question is not only whether access is controlled but whether you can show who could reach particular data and who did.

Records of decisions provide that basis. Without them, the answer to an auditor's question is an assertion about how the system is configured, which is a considerably weaker position.

Alongside Atlas

Ranger is frequently deployed with Apache Atlas, and they address different things.

Atlas is about metadata and classification: what data exists, what it means, how it is labelled.

Ranger is about access: who may reach it.

The connection between them is that classification is useful input to policy. A rule referring to data classified in a particular way is more durable than one naming specific tables, because new data carrying that classification falls under it without anyone writing a new rule.

Who uses it

Apache Ranger is used by platform and security teams operating Hadoop and related data environments. It is packaged with several Hadoop distributions, so many organisations encounter it as part of a platform rather than adopting it separately.

Points to consider

Ranger is an Apache project under an open source licence, and the official project site is the reference for supported services, versions and configuration.

Coverage is defined by which plugins exist and are installed. A service without a plugin is not governed by these policies, and assuming otherwise leaves a gap that is invisible until someone looks for it.

Its natural setting is a Hadoop and related services environment. Estates spanning cloud data platforms may need it alongside other controls, or a platform designed to span both, which is the space commercial products in this area occupy.

Policies still require design and review. Central definition removes duplication rather than the need to decide what the rules should be, and rules that go unexamined drift away from what the organisation actually intends.

Getting started

The official project documentation covers the architecture, installing plugins for supported services, defining policies and the auditing configuration. Setting a column level policy on a single table and querying as two different users demonstrates the enforcement model directly.

Key features of Apache Ranger

Capabilities described in the official documentation.

Central policy administration

Policies for the supported services are defined in one place rather than configured service by service.

Plugins inside each service

Enforcement happens within the service itself through a plugin that evaluates policy on each request.

Permissions down to columns

Access can be granted at database, table and column level rather than only per system.

Audit records of access

Decisions about access are recorded so it can be established who requested what and what happened.

Advantages of Apache Ranger

Factual advantages that follow from the features above.

One place to define the rules

Central administration avoids the same policy being configured differently in several services.

Enforcement is not bypassed

Because plugins run inside the service, policy applies to requests reaching it by any route.

Access questions have evidence

Audit records provide a basis for answering who accessed what, rather than relying on recollection.

It is open source

The project is available under an Apache licence and is widely packaged with Hadoop distributions.

Common use cases for Apache Ranger

Situations the official documentation describes this tool as being used for.

Telecommunications

Controlling access to Hive tables

Policies determine which groups may query which tables and columns in a Hadoop environment.

Banking

Restricting columns holding personal data

Column level rules keep sensitive fields from users whose role does not require them.

Public sector

Producing evidence for audits

Access records are used to demonstrate who could reach particular data and who did.

Energy

Applying consistent rules across services

Several data services in one environment are governed from a single policy definition point.

Official website

Everything on this page is based on the official documentation for Apache Ranger. You can read the source here.

Apache Ranger official documentation

Frequently asked questions about Apache Ranger

Answers taken from the official documentation for this tool.

Through plugins installed into each supported service. When a request arrives, the plugin evaluates it against the policies it has retrieved from the central administration component and permits or denies it. Enforcement therefore happens inside the service rather than at a gateway in front of it.

They address different aspects and are often used together. Atlas is concerned with metadata and classification, recording what data exists and how it is labelled. Ranger is concerned with access, deciding who may reach it. Classifications maintained in one can inform policies in the other.

It supports a set of Hadoop and related data services through service specific plugins. Which services are covered depends on the version and on the distribution being used, so the official project documentation is the reference rather than a general list.

Because a control placed only in front of a service can be bypassed by anything reaching the service another way. When the plugin runs within the service, requests arriving through any supported path are evaluated against the same policy.