[core][test] Add REST management query authorization support - #9416
Conversation
|
|
||
| private MockResponse rollbackSchemaHandle(Identifier identifier, String data) throws Exception { | ||
| RollbackSchemaRequest requestBody = RESTApi.fromJson(data, RollbackSchemaRequest.class); | ||
| RollbackSchemaRequest requestBody = parseRequest(data, RollbackSchemaRequest.class); |
There was a problem hiding this comment.
Schema rollback bypasses the lifecycle validation added for policies and column permissions. This handler calls SchemaManager.rollbackTo directly, without validating the target schema, evolving assignments, refreshing tableMetadataStore, or serializing with the table/policy lifecycle locks. For example: create a query-auth table, add secret, create a column-mask policy on secret, then roll back to the schema before secret existed. The rollback currently succeeds, leaving the stored policy (and REST metadata) inconsistent with the actual schema. I reproduced this with a focused MockRESTCatalogTest; the expected rejection was not raised. Please apply the same target-schema validation/state update as alter/replace (or reject an incompatible rollback) and add a regression test.
leaves12138
left a comment
There was a problem hiding this comment.
The remaining concern is limited to the test REST server and is non-blocking. The production query-authorization and projection changes look good to me.
Purpose
Extract the non-Spark prerequisite from #9410 so the REST management runtime and test service can be reviewed independently.
Changes
Verification
git diff --checkThis is a prerequisite for #9410 and contains no Spark connector changes.