Skip to content

Site: Add a page for policy management #1600

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 5 commits into
base: main
Choose a base branch
from

Conversation

flyrain
Copy link
Contributor

@flyrain flyrain commented May 16, 2025

No description provided.


- **Custom policy types**: Can be defined for specific organizational needs (WIP)

- **FGAC (Fine-Grained Access Control) policies**: Row filtering and column masking (WIP)
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
- **FGAC (Fine-Grained Access Control) policies**: Row filtering and column masking (WIP)
- **FGAC (Fine-Grained Access Control) policies**: Row filtering, column masking, column hiding (WIP)


### Retrieving Applicable Policies

Here is an example to find all policies that apply to a specific resource (including inherited policies):
Copy link
Contributor

Choose a reason for hiding this comment

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

should we also mention the RBAC comes into picture ? as not every one can see all the policies applicable to a resource, for ex i think in current implementation we need to require permission on a resource to see the policy applicable ?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Added it


Policies can be inheritable or non-inheritable:

- **Inheritable policies**: Apply to the target resource and all its child resources
Copy link
Contributor

Choose a reason for hiding this comment

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

[doubt] is it possible to define the child resources type it needs to be applicable to ? for ex what would remove-orphans means for a view or generic tables ?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

That's a good point. Let me clarify a bit.


## What is a Policy?

A policy in Apache Polaris is a structured object that defines rules governing actions on specified resources under
Copy link
Contributor

Choose a reason for hiding this comment

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

[optional]

Suggested change
A policy in Apache Polaris is a structured object that defines rules governing actions on specified resources under
A policy in Apache Polaris is a structured entity that defines rules governing actions on specified resources under

Copy link
Contributor

@HonahX HonahX left a comment

Choose a reason for hiding this comment

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

@flyrain Thanks for adding these. Overall LGTM, added some comments.

Comment on lines +67 to +69
- **Custom policy types**: Can be defined for specific organizational needs (WIP)

- **FGAC (Fine-Grained Access Control) policies**: Row filtering, column masking, column hiding (WIP)
Copy link
Contributor

Choose a reason for hiding this comment

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

IMHO, the site contains only the features/concepts that has been finalized and implemented, but I also that mentioning these features here can help form a better understanding of the general scope of policy. Should we phrase this more generally, such as: 'Support for additional predefined system policy types and custom policy type definitions is in progress. For more details, please refer to the roadmap.' This way, we avoid over-sharing implementation details while still giving users a clear sense of the feature scope.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I think calling FGAC out explicitly will provide a clear picture of what we are trying to do, as the questions about FGAC policy will come up naturally from anyone who understand policies. However, I'm OK with either way. Let me know if you strongly feel which way is better. I can make the changes correspondently.

Copy link
Contributor

Choose a reason for hiding this comment

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

That makes total sense—thanks for the clear explanation! My main concern was that listing those three specific FGAC policy types might give the impression that the community has already made concrete decisions on the direction. Maybe we could just mark them as tentative examples to make it clearer they're still under discussion (i.e. extends the WIP a little bit)?

- **`system.data-compaction`**: Defines rules for data compaction operations
- Schema Definition: @https://polaris.apache.org/schemas/policies/system/data-compaction/2025-02-03.json
- Controls file compaction to optimize storage and query performance

Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
Applicable resources: Iceberg table, namespace, catalog

Copy link
Contributor

@singhpk234 singhpk234 left a comment

Choose a reason for hiding this comment

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

was wondering, can we follow an E2E example
for ex :

  1. define policy 1, policy 2
  2. attach policy 1 on table (NS1.tb1) and policy 2 on namsepace (NS1)
  3. get applicable policy on table t1

This will help the E2E flow ? WDYT ?

Comment on lines +163 to +164
read permission on that resource. The permission model may be enhanced in the future when Fine-Grained Access Control
policy is introduced, which will provide more granular control over policy visibility and management.
Copy link
Contributor

@singhpk234 singhpk234 May 20, 2025

Choose a reason for hiding this comment

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

should we skip this part for now ? as its bit too much info.

Suggested change
read permission on that resource. The permission model may be enhanced in the future when Fine-Grained Access Control
policy is introduced, which will provide more granular control over policy visibility and management.
read permission on that resource.

Copy link
Collaborator

@adnanhemani adnanhemani left a comment

Choose a reason for hiding this comment

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

Overall, LGTM but a few questions :)

}
```

The policy content is validated against a schema specific to its type. Here are a few policy content examples
Copy link
Collaborator

Choose a reason for hiding this comment

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

Suggested change
The policy content is validated against a schema specific to its type. Here are a few policy content examples
The policy content is validated against a schema specific to its type. Here are a few policy content examples:

}
```

For inheritable policies, only one policy of a given type can be attached to a resource. For non-inheritable policies, multiple policies of the same type can be attached.
Copy link
Collaborator

Choose a reason for hiding this comment

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

[not requesting change]: is there a document about why this is the case?

Polaris supports several predefined system policy types (prefixed with `system.`):

- **`system.data-compaction`**: Defines rules for data compaction operations
- Schema Definition: @https://polaris.apache.org/schemas/policies/system/data-compaction/2025-02-03.json
Copy link
Collaborator

Choose a reason for hiding this comment

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

question: what does the "@" do for links in this framework?

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.

4 participants