roryqi commented on code in PR #13778:
URL: https://github.com/apache/gravitino/pull/13778#discussion_r4384866609
##########
iceberg/iceberg-rest-server/src/main/java/org/apache/gravitino/iceberg/RESTService.java:
##########
@@ -248,6 +251,15 @@ protected void configure() {
}
}
+ static IcebergReadRestrictionLoader loadReadRestrictionLoader(boolean
enableAuthorization) {
+ IcebergReadRestrictionLoader loader = IcebergReadRestrictionLoader.load();
+ if (loader.enabled() && !enableAuthorization) {
+ throw new IllegalStateException(
+ "Iceberg read restrictions require authorization; set
gravitino.authorization.enable=true");
+ }
+ return loader;
Review Comment:
Addressed in 75a81a057c. Discovery now logs a warning naming an installed
provider when it reports disabled, stating that read restrictions will not be
applied and pointing to deployment prerequisites, including policy dispatcher
availability. The no-provider fallback returns before this check, so ordinary
deployments without a provider do not warn. Tests cover disabled-provider
warnings, no warning for an enabled provider, and the real no-provider
discovery path with authorization disabled. Targeted REST service and loader
tests and formatting checks passed.
##########
docs/policies.md:
##########
@@ -103,6 +103,34 @@ mask := action("show-last-4") if is_group_member("support")
else := action("replace-with-null")
```
+When the experimental Iceberg REST read-restriction loader resolves several
row-filter policies
+for one table, a filter that resolves to `true` adds no restriction and is
ignored. Identical
+effective filters are deduplicated. Distinct restrictive filters conflict and
cause the load-table
+request to fail; the loader does not combine them.
+
+If the selected column-mask action is not applicable to a column type, the
experimental loader
+fails the load-table request rather than omitting the mask and exposing the
original values.
+Unselected actions do not need to be applicable to that column. For example,
`replace-with-null`
+cannot apply to a required column when that action is selected.
+
+Experimental Iceberg REST read restrictions require authorization to be
enabled with
+`gravitino.authorization.enable=true` and a policy dispatcher to be available.
When a policy dispatcher
+is available but authorization is disabled, the Iceberg REST service fails to
start with an error
Review Comment:
Addressed in 75a81a057c. The documentation now explicitly states that the
Iceberg REST startup failure also aborts Gravitino server startup in auxiliary
mode.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]