yuqi1129 opened a new pull request, #12696: URL: https://github.com/apache/gravitino/pull/12696
> **Draft: depends on #12561.** This branch is stacked on it, so the diff shown here includes the earlier PRs' commits until they merge. ### What changes were proposed in this pull request? Authorizes the Lance REST table mutation and deletion operations. - `drop_columns` and `alter_columns` require `MODIFY_TABLE` or ownership. - `deregister-table` and `drop-table` require ownership of the table or of one of its ancestors. `MODIFY_TABLE` alters a table but never removes it, matching the Gravitino and Iceberg REST surfaces. - Every expression is guarded on the addressed entity type, so an identifier that resolves to a catalog or a schema cannot be authorized as if it addressed a table. Fix: #12562 ### Does this PR introduce _any_ user-facing change? Yes. With authorization enabled, column changes, deregister, and drop are authorized and denied requests return 403 before any metadata or storage mutation. A table the caller may not remove is reported as forbidden whether or not it exists, so these endpoints cannot be used to probe for existence. ### How was this patch tested? - `TestLanceMetadataAuthorizationMethodInterceptor`: new tests covering `MODIFY_TABLE` for column changes, ownership for removal (including that `MODIFY_TABLE` alone is not enough), and identifiers of the wrong depth. - `LanceTableAuthorizationIT`: three new tests using a dedicated `MODIFY_TABLE`-only user, covering denied column changes, denied removal leaving the table in place, removal by the creating owner, and concealed-not-found on deregister. - `./gradlew :lance:lance-rest-server:build :lance:lance-common:build` — 191 tests, all passing. -- 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]
