Skip to main content

Authorization Pushdown

Overview

Authorization pushdown applies a grant made in Gravitino to Apache Ranger, so the permission is enforced where the data is rather than only inside Gravitino. An engine that reads the table directly is still subject to it.

Pushdown is configured per catalog with the authorization-provider property. Set it to ranger when the catalog's permissions live in a single Ranger service, or to chain when one catalog needs its grants applied in more than one. A catalog without the property manages access in Gravitino alone.

Gravitino resolves which catalog holds the object being granted on, hands the operation to that catalog's plugin, and the plugin maps the Gravitino privilege onto Ranger's model and writes it through the Ranger admin REST API. The plugin interface is not specific to Ranger, so other permission systems can be added, and Ranger is what ships today.

Once a catalog is configured, grants are made through the ordinary authorization REST API. No separate pushdown call exists.

Ranger

The Ranger provider covers two Ranger service types. HadoopSQL governs schemas, tables, and columns for the Hive, Iceberg, and Paimon catalogs. HDFS governs paths, which is what a fileset catalog needs. A catalog selects one of them with authorization.ranger.service.type.

Spark reaches these catalogs through the Kyuubi authorization plugin. That plugin cannot push updates or deletes for a Paimon catalog.

Configuration

Property NameDescriptionDefault Value
authorization-providerSet to ranger to push grants into Apache Ranger(none)
authorization.ranger.admin.urlThe Ranger admin web URI(none)
authorization.ranger.service.typeHadoopSQL or HDFS(none)
authorization.ranger.service.nameThe Ranger service to write policies into(none)
authorization.ranger.auth.typesimple or kerberossimple
authorization.ranger.usernameRanger admin login username, or the Kerberos principal. Requires Ranger administrator permission(none)
authorization.ranger.passwordRanger admin login password, or the path to the keytab file(none)
authorization.ranger.service.create-if-absentCreates the Ranger service when it does not already existfalse

The remaining properties apply only when create-if-absent is true, since they describe the service Gravitino creates.

Property NameDescriptionDefault Value
authorization.ranger.jdbc.driverClassNameDriver class for a new HadoopSQL serviceorg.apache.hive.jdbc.HiveDriver
authorization.ranger.jdbc.urlJDBC URL for a new HadoopSQL servicejdbc:hive2://127.0.0.1:8081
authorization.ranger.hadoop.security.authenticationHadoop security authentication for a new HDFS servicesimple
authorization.ranger.hadoop.security.authorizationHadoop security authorization for a new HDFS service(none)
authorization.ranger.hadoop.rpc.protectionHadoop RPC protection for a new HDFS serviceauthentication
authorization.ranger.fs.default.nameDefault filesystem for a new HDFS servicehdfs://127.0.0.1:8090

Example

A Hive service is already managed by a Ranger service named hiveRepo, and Ranger is reachable at 172.0.0.100:6080. Adding that Hive service to Gravitino as a Hive catalog with pushdown enabled takes the following catalog properties.

authorization-provider=ranger
authorization.ranger.admin.url=172.0.0.100:6080
authorization.ranger.auth.type=simple
authorization.ranger.username={ranger_admin_user}
authorization.ranger.password={ranger_admin_password}
authorization.ranger.service.type=HadoopSQL
authorization.ranger.service.name=hiveRepo

Roles Gravitino Creates

Gravitino creates three roles in Ranger and manages their membership itself, so treat them as owned by Gravitino rather than editing them in the Ranger UI.

RolePurpose
GRAVITINO_METALAKE_OWNER_ROLEHolds the users and groups that own the metalake, carrying owner privileges in Ranger policies
GRAVITINO_CATALOG_OWNER_ROLEHolds the users and groups that own the catalog, carrying owner privileges in Ranger policies
GRAVITINO_OWNER_ROLELabels the policy items covering schema and table owner privileges, and holds no members

Chaining Plugins

One catalog often needs permissions applied in more than one place. A Hive catalog storing its data on HDFS needs both the table grant in the HadoopSQL service and the corresponding path grant in the HDFS service, or an engine reading the files directly bypasses the table permission.

The chain provider handles this. Set authorization.chain.plugins to a comma-separated list of names you choose, then configure each named plugin with authorization.chain.{plugin_name} as its property prefix. Every plugin in the chain is applied on each authorization operation.

Property NameDescription
authorization-providerSet to chain to apply several plugins to this catalog
authorization.chain.pluginsComma-separated plugin names, each naming a prefix below
authorization.chain.{plugin_name}.ranger.admin.urlThe admin URI for that plugin
authorization.chain.{plugin_name}.ranger.service.typeHadoopSQL or HDFS for that plugin
authorization.chain.{plugin_name}.ranger.service.nameThe Ranger service for that plugin
authorization.chain.{plugin_name}.ranger.usernameThe Ranger admin login username for that plugin
authorization.chain.{plugin_name}.ranger.passwordThe Ranger admin login password for that plugin

The names in authorization.chain.plugins are labels rather than plugin types, so any name works as long as it matches the prefix used by its properties. Every plugin in a chain is a Ranger plugin, since Ranger is the only provider available to chain.

Example

The Hive service is managed by the Ranger service hiveRepo and its underlying HDFS storage by hdfsRepo. Chaining the two keeps the table grant and the path grant in step.

authorization-provider=chain
authorization.chain.plugins=hive,hdfs
authorization.chain.hive.ranger.admin.url=http://ranger-service:6080
authorization.chain.hive.ranger.service.type=HadoopSQL
authorization.chain.hive.ranger.service.name=hiveRepo
authorization.chain.hive.ranger.auth.type=simple
authorization.chain.hive.ranger.username={ranger_admin_user}
authorization.chain.hive.ranger.password={ranger_admin_password}
authorization.chain.hdfs.ranger.admin.url=http://ranger-service:6080
authorization.chain.hdfs.ranger.service.type=HDFS
authorization.chain.hdfs.ranger.service.name=hdfsRepo
authorization.chain.hdfs.ranger.auth.type=simple
authorization.chain.hdfs.ranger.username={ranger_admin_user}
authorization.chain.hdfs.ranger.password={ranger_admin_password}

Further Reading