jarredhj0214 commented on PR #13846: URL: https://github.com/apache/gravitino/pull/13846#issuecomment-6164044190
This follows the table-like existence probing introduced in https://github.com/apache/gravitino/pull/12482. The gap is in existence-probe handling, rather than in the normal table/view read permissions: - `loadTable` first checks its normal authorization expression. If that denies access, it evaluates `PROBE_TABLE_LIKE_AUTHORIZATION_EXPRESSION`. A caller with probe permission can check existence through the internal table dispatcher: an absent table proceeds to the REST handler and returns 404, while an existing table remains forbidden without read permission. - `loadView` previously only checked its normal authorization expression, so the same caller could receive 403 for a missing candidate view before existence was checked. This matters for Flink name resolution: `getTable()` falls back to `loadView()` after `NoSuchTableException`. A candidate such as `current_db.source_db` can therefore return 404 as a table but 403 as a view, aborting resolution of the actual qualified table name. This PR applies the same probe expression and decision flow to views, using the internal view dispatcher. It preserves 403 for existing views without load permission and does not allow existence checks when probe permission is denied. Regression tests cover these cases and endpoint/executor wiring. -- 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]
