[#8674] fix(authz): Isolate Ranger catalog owner roles by catalog ID (#12517)

### What changes were proposed in this pull request?

Pass the stable catalog entity ID to authorization plugins and use it to
create catalog-specific Ranger owner roles.

Catalog owner roles now follow this format:

`GRAVITINO_CATALOG_OWNER_ROLE_<catalog_id>`

The chained authorization plugin also propagates the catalog ID to its
child plugins.

### Why are the changes needed?

Ranger previously used one shared `GRAVITINO_CATALOG_OWNER_ROLE` for
every catalog. As a result, the owner of one catalog could receive owner
permissions on other catalogs using the same Ranger service.

Using the stable catalog ID isolates role membership without depending
on the mutable catalog name.

Fix: #8674

### Does this PR introduce _any_ user-facing change?

Yes. Ranger creates a separate catalog owner role for each catalog using
the catalog ID as the role-name suffix.

No user-configurable property is added.

### How was this patch tested?

- Added unit tests for passing catalog IDs to authorization plugins.
- Added unit tests for generating and creating catalog-specific Ranger
owner roles.
- Updated the Ranger integration test expectation.
- Ran Spotless successfully.
12 files changed
tree: 9f04f6705dc62e571e4ea23ddc74652535cb939b
  1. .claude/
  2. .github/
  3. .idea/
  4. agent-skills/
  5. api/
  6. authorizations/
  7. bin/
  8. bundles/
  9. catalogs/
  10. catalogs-contrib/
  11. clients/
  12. common/
  13. conf/
  14. core/
  15. design-docs/
  16. dev/
  17. docs/
  18. flink-connector/
  19. gradle/
  20. iceberg/
  21. integration-test-common/
  22. lance/
  23. licenses/
  24. lineage/
  25. maintenance/
  26. mcp-server/
  27. plugins/
  28. rfc/
  29. scripts/
  30. server/
  31. server-common/
  32. spark-connector/
  33. trino-connector/
  34. web/
  35. web-v2/
  36. .asf.yaml
  37. .gitattributes
  38. .gitignore
  39. AGENTS.md
  40. build.gradle.kts
  41. CODE_OF_CONDUCT.md
  42. CONTRIBUTING.md
  43. GETTING_STARTED.md
  44. GOVERNANCE.md
  45. gradle.properties
  46. gradlew
  47. LICENSE
  48. LICENSE.bin
  49. LICENSE.iceberg
  50. LICENSE.lance
  51. LICENSE.trino
  52. MAINTAINERS.md
  53. NOTICE
  54. NOTICE.bin
  55. NOTICE.iceberg
  56. NOTICE.lance
  57. NOTICE.trino
  58. README.md
  59. ROADMAP.md
  60. SECURITY.md
  61. settings.gradle.kts
README.md

Apache Gravitino™

GitHub Actions Build GitHub Actions Integration Test License Contributors Release Open Issues Last Committed OpenSSF Best Practices

Introduction

Apache Gravitino is a high-performance, geo-distributed, and federated metadata lake. It manages metadata directly in different sources, types, and regions, providing users with unified metadata access for data and AI assets.

Gravitino Architecture

🚀 Key Features

  • Unified Metadata Management: Manage diverse metadata sources through a single model and API (e.g., Hive, MySQL, MariaDB, HDFS, S3).
  • End-to-End Data Governance: Features like access control, auditing, and discovery across all metadata assets.
  • Direct Metadata Integration: Changes in underlying systems are immediately reflected via Gravitino’s connectors.
  • Geo-Distribution Support: Share metadata across regions and clouds to support global architectures.
  • Multi-Engine Compatibility: Seamlessly integrates with query engines without modifying SQL dialects.
  • AI Asset Management (WIP): Support for AI model and feature tracking.

🌐 Common Use Cases

  • Federated metadata discovery across data lakes and data warehouses
  • Multi-region metadata synchronization for hybrid or multi-cloud setups
  • Data and AI asset governance with unified audit and access control
  • Plug-and-play access for engines like Trino or Spark
  • Support for evolving metadata standards, including AI model lineage

📚 Documentation

The latest Gravitino documentation is available at gravitino.apache.org/docs/latest.

This README provides a basic overview; visit the site for full installation, configuration, and development documentation.

🧪 Quick Start

Use Gravitino Playground (Recommended)

Gravitino provides a Docker Compose–based playground for a full-stack experience.
Clone or download the Gravitino Playground repository and follow its README.

Run Gravitino Locally

  1. Download and extract a binary release.
  2. Edit conf/gravitino.conf to configure settings.
  3. Start the server:
./bin/gravitino.sh start
  1. To stop:
./bin/gravitino.sh stop
  1. (Optional) Choose UI version
  • By default, Gravitino uses the Web V2 UI.

  • To switch back to the legacy v1 UI at runtime, edit conf/gravitino-env.sh (or set the environment variable before starting) and set GRAVITINO_USE_WEB_V2 to false:

export GRAVITINO_USE_WEB_V2=false
./bin/gravitino.sh restart
  • To use Web V2 explicitly, set GRAVITINO_USE_WEB_V2=true.

🧊 Iceberg REST Catalog

Gravitino provides a native Iceberg REST catalog service.
See: Iceberg REST catalog service

🗄️ Lance REST Catalog

Gravitino provides a native Lance REST catalog service.
See: Lance REST catalog service

🔌 Trino Integration

Gravitino includes a Trino connector for federated metadata access.
See: Using Trino with Gravitino

🛠️ Building from Source

Gravitino uses Gradle. Windows is not currently supported.

Clean build without tests:

./gradlew clean build -x test

Build a distribution:

./gradlew compileDistribution -x test

Skip building and packaging both Web UIs:

./gradlew compileDistribution -PskipWebBuild=true -x test

Or compressed package:

./gradlew assembleDistribution -x test

Artifacts are output to the distribution/ directory.

More build options: How to build Gravitino

👨‍💻 Developer Resources

🤝 Contributing

We welcome all kinds of contributions—code, documentation, testing, connectors, and more!

To get started, please read our CONTRIBUTING.md guide.

🔗 ASF Resources

🪪 License

Apache Gravitino is licensed under the Apache License, Version 2.0.
See the LICENSE file for details.

Apache®, Apache Gravitino™, Apache Hadoop®, Apache Hive™, Apache Iceberg™, Apache Kafka®, Apache Spark™, Apache Submarine™, Apache Thrift™, and Apache Zeppelin™ are trademarks of the Apache Software Foundation in the United States and/or other countries.