Skip to content

feat: add CATALOG_READ_DATA privilege for data analyst read-only catalog access#3927

Open
Praneeth-Sagar-13 wants to merge 3 commits intoapache:mainfrom
Praneeth-Sagar-13:feat/add-catalog-read-data-privilege
Open

feat: add CATALOG_READ_DATA privilege for data analyst read-only catalog access#3927
Praneeth-Sagar-13 wants to merge 3 commits intoapache:mainfrom
Praneeth-Sagar-13:feat/add-catalog-read-data-privilege

Conversation

@Praneeth-Sagar-13
Copy link

@Praneeth-Sagar-13 Praneeth-Sagar-13 commented Mar 3, 2026

Introduces a new catalog-level privilege CATALOG_READ_DATA (code 103) that grants read-only access to all data and navigational metadata within a specific catalog. This is intended for data analyst principals who need broad read access across an entire catalog without any write or administrative capabilities.

CATALOG_READ_DATA subsumes the following privileges when granted on a catalog:

  • NAMESPACE_LIST and NAMESPACE_READ_PROPERTIES (catalog navigation)
  • TABLE_LIST, TABLE_READ_PROPERTIES, and TABLE_READ_DATA (table access)
  • VIEW_LIST and VIEW_READ_PROPERTIES (view access)

It is itself subsumed by CATALOG_MANAGE_CONTENT (the existing full-access catalog privilege), preserving the existing privilege hierarchy.

Changes:

  • PolarisPrivilege.java: add CATALOG_READ_DATA enum constant (code 103)
  • PolarisAuthorizerImpl.java: register subsumption rules in SUPER_PRIVILEGES
  • polaris-management-service.yml: add CATALOG_READ_DATA to CatalogPrivilege enum
  • PolarisPrivilegeTest.java: update code-to-privilege mapping test

Checklist

  • 🛡️ Don't disclose security issues! (contact security@apache.org)
  • 🔗 Clearly explained why the changes are needed, or linked related issues: Fixes #
  • 🧪 Added/updated tests with good coverage, or manually tested (and explained how)
  • 💡 Added comments for complex logic
  • 🧾 Updated CHANGELOG.md (if needed)
  • 📚 Updated documentation in site/content/in-dev/unreleased (if needed)

…log access

Introduces a new catalog-level privilege CATALOG_READ_DATA (code 103) that
grants read-only access to all data and navigational metadata within a
specific catalog. This is intended for data analyst principals who need
broad read access across an entire catalog without any write or
administrative capabilities.

CATALOG_READ_DATA subsumes the following privileges when granted on a catalog:
- NAMESPACE_LIST and NAMESPACE_READ_PROPERTIES (catalog navigation)
- TABLE_LIST, TABLE_READ_PROPERTIES, and TABLE_READ_DATA (table access)
- VIEW_LIST and VIEW_READ_PROPERTIES (view access)

It is itself subsumed by CATALOG_MANAGE_CONTENT (the existing full-access
catalog privilege), preserving the existing privilege hierarchy.

Changes:
- PolarisPrivilege.java: add CATALOG_READ_DATA enum constant (code 103)
- PolarisAuthorizerImpl.java: register subsumption rules in SUPER_PRIVILEGES
- polaris-management-service.yml: add CATALOG_READ_DATA to CatalogPrivilege enum
- PolarisPrivilegeTest.java: update code-to-privilege mapping test

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Copy link
Contributor

@dimas-b dimas-b left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for your contribution, @Praneeth-Sagar-13 !

The changes LGTM 👍

Still, given this PR affects the Polaris RBAC model, I believe it would be wise for the sake of community awareness to have a "[DISCUSS]" thread for it on the dev ML before merging.

Would you be comfortable starting this email thread (you may want to subscribe to dev too)?

@dimas-b dimas-b requested a review from collado-mike March 3, 2026 18:38
@collado-mike
Copy link
Contributor

I feel ok with this change. +1 on the ML discussion. Also @dennishuo may have an opinion

@Praneeth-Sagar-13
Copy link
Author

Started a [DISCUSS] thread :https://lists.apache.org/thread/p6fjxh7y65s2mdywc330gor6yrj2vngz

adutra
adutra previously approved these changes Mar 6, 2026
@github-project-automation github-project-automation bot moved this from PRs In Progress to Ready to merge in Basic Kanban Board Mar 6, 2026
dimas-b
dimas-b previously approved these changes Mar 6, 2026
Copy link
Contributor

@dimas-b dimas-b left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM 👍

@dimas-b
Copy link
Contributor

dimas-b commented Mar 6, 2026

@Praneeth-Sagar-13 : Please run ./gradlew spotlessApply - see CI reports for specific formatting errors.

@Praneeth-Sagar-13
Copy link
Author

The formatting has been fixed with ./gradlew spotlessApply. Could @dimas-b and @adutra please re-review? The only change since your last approval was the spotless formatting fix.

* #TABLE_LIST}, {@link #TABLE_READ_PROPERTIES}, {@link #TABLE_READ_DATA}, {@link #VIEW_LIST}, and
* {@link #VIEW_READ_PROPERTIES}.
*/
CATALOG_READ_DATA(103, PolarisEntityType.CATALOG),
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The privilege is good to have, otherwise, user have to grant/invoke 7+ privileges for the same purpose.

The name CATALOG_READ_DATA implies data-only access (reading table contents), but it actually subsumes metadata-plane privileges too like TABLE_READ_PROPERTIES, NAMESPACE_READ_PROPERTIES, VIEW_READ_PROPERTIES, and the *_LIST privileges. I am wondering if we can give a more descriptive name, like CATALOG_READ or CATALOG_READ_ALL.

A related question: why doesn't it subsume CATALOG_READ_PROPERTIES?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants