Skip to content

Commit 1fb194e

Browse files
authored
Doc: Add policy documentation (#1460)
1 parent 913829f commit 1fb194e

File tree

2 files changed

+25
-2
lines changed

2 files changed

+25
-2
lines changed

site/content/in-dev/unreleased/access-control.md

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -123,6 +123,8 @@ To grant the full set of privileges (drop, list, read, write, etc.) on an object
123123
| TABLE_READ_DATA | Enables reading data from the table by receiving short-lived read-only storage credentials from the catalog. |
124124
| TABLE_WRITE_DATA | Enables writing data to the table by receiving short-lived read+write storage credentials from the catalog. |
125125
| TABLE_FULL_METADATA | Grants all table privileges, except TABLE_READ_DATA and TABLE_WRITE_DATA, which need to be granted individually. |
126+
| TABLE_ATTACH_POLICY | Enables attaching policy to a table. Applying policy at a table will override the same policy type defined at namespace and catalog |
127+
| TABLE_DETACH_POLICY | Enables detaching policy from a table |
126128

127129
### View privileges
128130

@@ -145,6 +147,8 @@ To grant the full set of privileges (drop, list, read, write, etc.) on an object
145147
| NAMESPACE_READ_PROPERTIES | Enables reading all the namespace properties. |
146148
| NAMESPACE_WRITE_PROPERTIES | Enables configuring namespace properties. |
147149
| NAMESPACE_FULL_METADATA | Grants all namespace privileges. |
150+
| NAMESPACE_ATTACH_POLICY | Enables attaching policy to a namespace. A policy applied at this level will override the same policy type define at the parent namespace and catalog and all entities registered under the namespace will inherit this policy unless they have a different policy of the same type. Only inheritable policy such as, table compaction and snapshot expiry policy are allowed in this level. |
151+
| NAMESPACE_DETACH_POLICY | Enables detaching policy from a namespace. |
148152

149153
### Catalog privileges
150154

@@ -155,6 +159,21 @@ To grant the full set of privileges (drop, list, read, write, etc.) on an object
155159
| CATALOG_MANAGE_METADATA | Enables full management of the catalog, catalog roles, namespaces, and tables. |
156160
| CATALOG_READ_PROPERTIES | Enables listing catalogs and reading properties of the catalog. |
157161
| CATALOG_WRITE_PROPERTIES | Enables configuring catalog properties. |
162+
| NAMESPACE_ATTACH_POLICY | Enables attaching policy to a catalog. All entities registered under the namespace will inherit this policy unless they have a different policy of the same type. Only inheritable policy such as, table compaction and snapshot expiry policy are allowed in this level. |
163+
| CATALOG_DETACH_POLICY | Enables detaching policy from a catalog. |
164+
165+
### Policy privileges
166+
167+
| Privilege | Description |
168+
| -----------------------| ----------- |
169+
| POLICY_CREATE | Enables creating a policy under specified namespace |
170+
| POLICY_READ | Enables reading policy content and metadata |
171+
| POLICY_WRITE | Enables updating the policy details such as its content or description |
172+
| POLICY_LIST | Enables listing any policy from the catalog |
173+
| POLICY_DROP | Enables dropping a policy if it is not attached to any resource entity |
174+
| POLICY_FULL_METADATA | Grants all policy privileges. |
175+
| POLICY_ATTACH | Enables policy to be attached to entities |
176+
| POLICY_DETACH | Enables policy to be detached from entities |
158177

159178
## RBAC example
160179

site/content/in-dev/unreleased/entities.md

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,6 @@ In Polaris, namespaces can be nested. For example, `a.b.c.d.e.f.g` is a valid na
4646

4747
For information on managing namespaces with the REST API or for more information on what data can be associated with a namespace, see [the API docs]({{% github-polaris "client/python/docs/CreateNamespaceRequest.md" %}}).
4848

49-
5049
## Table
5150

5251
Polaris tables are entities that map to [Apache Iceberg tables](https://iceberg.apache.org/docs/nightly/configuration/), [Delta tables](https://docs.databricks.com/aws/en/delta/table-properties), or [Hudi tables](https://hudi.apache.org/docs/next/configurations#TABLE_CONFIG).
@@ -71,13 +70,18 @@ Polaris principal roles are labels that may be granted to [principals](#principa
7170

7271
For information on managing principal roles with the REST API or for more information on what data can be associated with a principal role, see [the API docs]({{% github-polaris "client/python/docs/CreatePrincipalRoleRequest.md" %}}).
7372

74-
7573
## Catalog Role
7674

7775
Polaris catalog roles are labels that may be granted to [catalogs](#catalog). Each catalog may have one or more catalog roles, and the same catalog role may be granted to multiple catalogs. Catalog roles may be assigned based on the nature of data that will reside in a catalog, or by the groups of users and services that might need to access that data.
7876

7977
Each catalog role may have multiple [privileges](#privilege) granted to it, and each catalog role can be granted to one or more [principal roles](#principal-role). This is the mechanism by which principals are granted access to entities inside a catalog such as namespaces and tables.
8078

79+
## Policy
80+
81+
Polaris policy is a set of rules governing actions on specified resources under predefined conditions. Polaris support policy for Iceberg table compaction, snapshot expiry, row-level access control, and custom policy definitions.
82+
83+
Policy can be applied at catalog level, namespace level, or table level. Policy inheritance can be achieved by attaching one to a higher-level scope, such as namespace or catalog. As a result, tables registered under those entities do not need to be declared individually for the same policy. If a table or a namespace requires a different policy, user can assign a different policy, hence overriding policy of the same type declared at the higher level entities.
84+
8185
## Privilege
8286

8387
Polaris privileges are granted to [catalog roles](#catalog-role) in order to grant principals with a given principal role some degree of access to catalogs with a given catalog role. When a privilege is granted to a catalog role, any principal roles granted that catalog role receive the privilege. In turn, any principals who are granted that principal role receive it.

0 commit comments

Comments
 (0)