Repository navigation
[Server] Reject privilege grants on invalid object types - #2014
Merged
yili-db merged 1 commit intoOct 23, 2026
Merged
Conversation
timothyw553
requested review from
dennyglee,
openinx,
tdas and
yili-db
as code owners
October 19, 2026 07:39
4 tasks done
timothyw553
force-pushed
the
fix/permission-grant-validation
branch
from
October 19, 2026 18:48
b1e7cb4 to
4b91e54
Compare
This was referenced Oct 19, 2026
timothyw553
force-pushed
the
fix/permission-grant-validation
branch
7 times, most recently
from
October 21, 2026 19:33
6fecf71 to
c6a5d3b
Compare
yili-db
pushed a commit
that referenced
this pull request
Oct 22, 2026
## 🥞 Stacked PR Use this [link](https://github.com/unitycatalog/unitycatalog/pull/2023/files) to review incremental changes. - [**feat/strict-privilege-checks**](#2023) [[Files changed](https://github.com/unitycatalog/unitycatalog/pull/2023/files)] ← _this PR_ - [fix/iceberg-credential-authorization](#2015) [[Files changed](https://github.com/unitycatalog/unitycatalog/pull/2015/files/d63e70154a6f21c4d23d596491c779b66a250367..1e627b250bb34d8df390f050d8307fd5442dddc6)] - [fix/model-rename-permissions](#2018) [[Files changed](https://github.com/unitycatalog/unitycatalog/pull/2018/files/d63e70154a6f21c4d23d596491c779b66a250367..49d68ec662b2f29c588c8f5d67ec74cfc3fe017f)] - [fix/permission-grant-validation](#2014) [[Files changed](https://github.com/unitycatalog/unitycatalog/pull/2014/files/d63e70154a6f21c4d23d596491c779b66a250367..c6a5d3bf21127e62fc81b2b291ea54bb56463b55)] - [fix/table-details-permissions](#2016) [[Files changed](https://github.com/unitycatalog/unitycatalog/pull/2016/files/d63e70154a6f21c4d23d596491c779b66a250367..6c897e034918a99ea3a2c4bdbeac64905c8f9d93)] - [fix/volume-rename-permissions](#2017) [[Files changed](https://github.com/unitycatalog/unitycatalog/pull/2017/files/d63e70154a6f21c4d23d596491c779b66a250367..0ad5aee5216d2ed8085e969c287cc7dee7cdfa98)] --------- **PR Checklist** - [x] A description of the changes is added to the description of this PR. - [x] If there is a related issue, make sure it is linked to this PR. - [x] If you've fixed a bug or added code that should be tested, add tests! - [x] If you've added or modified a feature, documentation in `docs` is updated **Description of changes** Add `server.authorization.strict-privilege-checks`, which defaults to `true`. The following permission fixes use this setting so deployments can keep the previous rules temporarily while updating their applications and grants. Setting it to `false` retains the previous behavior, including access that the corrected checks would deny. This PR adds the validated setting and passes it to authorization expressions as the trusted `#strict_privilege_checks` variable. Request values cannot change it. The setting also reaches response filtering through the shared evaluator. This base PR does not change permission decisions. Use the same value on every server instance and restart each instance after changing it. The fallback conditions and the setting can be deleted after the migration. Tests passed with JDK 17: ```sh build/sbt javafmtAll "server/testOnly io.unitycatalog.server.utils.ServerPropertiesTest io.unitycatalog.server.UnityCatalogServerTest" build/sbt "server/testOnly io.unitycatalog.server.auth.decorator.UnityAccessEvaluatorTest" ``` 33 tests passed. Combined validation with all five dependent fixes: `build/sbt -J-Xmx2G javafmtAll "server/test"`: 923 tests passed. Signed-off-by: Timothy Wang <[email protected]>
timothyw553
force-pushed
the
fix/permission-grant-validation
branch
from
October 22, 2026 02:07
c6a5d3b to
82edaf5
Compare
Collaborator
|
/review |
timothyw553
force-pushed
the
fix/permission-grant-validation
branch
2 times, most recently
from
October 22, 2026 18:26
896a437 to
5951bf4
Compare
Collaborator
Author
|
/review |
yili-db
reviewed
Oct 23, 2026
| summary: Update a permission | ||
| description: | | ||
| Updates the permissions for a securable. | ||
| When server.authorization.strict-privilege-checks is true (the default), each added |
Collaborator
There was a problem hiding this comment.
Can you remove this temp section here? This behavior changing flag is a implementation details of the server, not part of the protocol itself.
Collaborator
Author
There was a problem hiding this comment.
sure, removed it from the spec. keeping the flag details in the server docs.
yili-db
reviewed
Oct 23, 2026
| schema: | ||
| $ref: '#/components/schemas/PermissionsList' | ||
| '400': | ||
| description: With strict privilege checks enabled, an added privilege does not apply to the securable type. |
Collaborator
There was a problem hiding this comment.
It doesn't need to mention the strict privilege checks. And any invalid input can trigger it, rather than just added privilege does not apply to the securable type.
It's also optional. Most endpoints in this file don't repeat the common error cases, like "400 for invalid input".
Collaborator
Author
There was a problem hiding this comment.
yep, removed the 400 entry too.
Signed-off-by: Timothy Wang <[email protected]>
timothyw553
force-pushed
the
fix/permission-grant-validation
branch
from
October 23, 2026 18:45
5951bf4 to
4fab7c4
Compare
yili-db
approved these changes
Oct 23, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
PR Checklist
docsis updatedDescription of changes
Reject grants on the wrong object type, such as
USE CATALOGon a schema. Check all additions before saving any changes. Old invalid grants can still be revoked.server.authorization.strict-privilege-checks=falsekeeps the old behavior.Tests: 20 focused tests and formatting passed. API docs regenerated.