yuqi1129 commented on PR #14908: URL: https://github.com/apache/gravitino/pull/14908#issuecomment-6822856669
The overall approach looks appropriate for a focused fix: staged-create commits should use schema-level `CREATE_TABLE`, while ordinary updates should continue to require `MODIFY_TABLE`. The classification matches the existing hook/backend handling, and the backend still validates `AssertTableDoesNotExist`, so adding the assertion cannot overwrite an existing table. I did not find a blocking issue at a5977e8ed00b5e2808e63748a61659ffa167a310. Three non-blocking observations: 1. **Denial audit expression:** `UpdateTableAuthzHandler` evaluates the create-table expression, but `BaseMetadataAuthorizationMethodInterceptor` still obtains the denial-event expression from the endpoint's static `MODIFY_TABLE` annotation. When staged creation is denied, `auth.expression` therefore reports the wrong check. The actual authorization decision and 403 are correct. A small follow-up should report the evaluated expression and assert it in an audit-event test. 2. **Request-context reuse:** constructing a new `AuthorizationRequestContext` discards the user-info cache populated by the interceptor's membership check and can repeat the user-info lookup during ownership evaluation. This is bounded to staged-create commits and follows an existing handler pattern; I would defer shared-context cleanup rather than expand this release fix. 3. **Scope:** the `visibleConfigs` documentation addresses a separate issue. Splitting it would make tracking and rollback clearer, although the documentation itself looks consistent with `ConfigServlet` and is not a merge blocker. Validation: all 704 Iceberg REST server unit tests passed. A temporary probe against the actual Iceberg `CatalogHandlers` confirmed that a forged staged-create request against an existing table is rejected without changing its properties. Removing the new interceptor wiring caused 5 of the 8 new tests to fail; after restoration, all 8 passed. The server-common run had one mutual-TLS test failure, and all 7 tests in that class passed on retry; I have not established the cause of that transient failure. No real Spark CTAS or Docker integration test was run. These observations do not require broadening the authorization framework in this PR. Merge remains subject to the required CI checks 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]
