Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,18 @@
import jakarta.annotation.Nullable;
import java.util.List;

/** List of privileges */
/**
* Enumerates the privileges used by the built-in RBAC authorizer ({@link
* org.apache.polaris.core.auth.PolarisAuthorizerImpl}). In Polaris' RBAC model, a
* <em>securable</em> is a Polaris entity (such as a catalog, namespace, table, or policy) on which
* access may be controlled by granting privileges to a grantee (typically a catalog role or
* principal role). Each privilege in this enum targets a specific {@link PolarisEntityType} of
* securable and is checked against that securable during authorization.
*
* <p>Alternative authorizer implementations such as the OPA-based authorizer may not use these
Copy link
Contributor

Choose a reason for hiding this comment

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

nit: While this statement is valid, is it relevant to this class? Why should the reader be concerned with OPA in the context of PolarisPrivilege? The paragraph above already scopes it down to the Internal Authorizer πŸ€”

Copy link
Contributor Author

Choose a reason for hiding this comment

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

OPA is an example here, I understand that it looks like duplication, just to clarify more to avoid confusions. I can remove this paragraph if you feel strongly about it.

* privileges. They operate at the {@link org.apache.polaris.core.auth.PolarisAuthorizableOperation}
* level and delegate all privilege/permission logic to external PDPs.
*/
public enum PolarisPrivilege {
SERVICE_MANAGE_ACCESS(1, PolarisEntityType.ROOT),
CATALOG_MANAGE_ACCESS(2, PolarisEntityType.CATALOG),
Expand Down