Repository navigation
[API] Add five permission values and grant targets - #2091
Merged
Merged
Conversation
timothyw553
requested review from
dennyglee,
openinx,
tdas and
yili-db
as code owners
October 29, 2026 23:14
yili-db
reviewed
Oct 29, 2026
| case READ_FILES, WRITE_FILES, CREATE_EXTERNAL_TABLE -> | ||
| Set.of(EXTERNAL_LOCATION, CREDENTIAL); | ||
| case CREATE_EXTERNAL_VOLUME, CREATE_MANAGED_STORAGE -> Set.of(EXTERNAL_LOCATION); | ||
| case BROWSE, MANAGE, WRITE_VOLUME, CREATE_MODEL_VERSION, READ_METADATA -> Set.of(); |
Collaborator
There was a problem hiding this comment.
Either add a //TODO, or just add the correct list of securable types.
Collaborator
Author
There was a problem hiding this comment.
ill add the securables mapping here
This was referenced Oct 29, 2026
timothyw553
force-pushed
the
stack/permission-enums
branch
from
October 29, 2026 23:59
255f8f1 to
abfb57a
Compare
Collaborator
|
/review |
timothyw553
force-pushed
the
stack/permission-enums
branch
2 times, most recently
from
October 30, 2026 00:35
f74309a to
6f99227
Compare
timothyw553
commented
Oct 30, 2026
| case TABLE -> Set.of(Privilege.SELECT, Privilege.MODIFY, Privilege.MANAGE); | ||
| case FUNCTION -> Set.of(Privilege.EXECUTE, Privilege.MANAGE); | ||
| case REGISTERED_MODEL -> | ||
| Set.of(Privilege.EXECUTE, Privilege.CREATE_MODEL_VERSION, Privilege.MANAGE); |
Collaborator
Author
There was a problem hiding this comment.
its ugly but the alternative is:
case REGISTERED_MODEL ->
Set.of(Privilege.EXECUTE, //
Privilege.CREATE_MODEL_VERSION, //
Privilege.MANAGE);
yili-db
approved these changes
Oct 30, 2026
Collaborator
|
This PR needs @tdas approval for |
Signed-off-by: Timothy Wang <[email protected]>
timothyw553
force-pushed
the
stack/permission-enums
branch
from
October 31, 2026 21:56
6f99227 to
9f6b2ba
Compare
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.
🥞 Stacked PR
Use this link to review incremental changes.
PR Checklist
docsis updatedDescription of changes
Add
BROWSE,MANAGE,WRITE VOLUME,CREATE MODEL VERSION, andREAD METADATAto the API and server enums. Validate where each permission can be granted. The child PRs add the authorization checks for each permission.Before
With authorization enabled, the owner of
main.public.salestries to grant an existing user metadata access:The API rejects the request because
READ METADATAis not a recognized privilege.After
The owner repeats the same request:
The API accepts and saves the grant. It also accepts
BROWSE,MANAGE,WRITE VOLUME, andCREATE MODEL VERSIONon their supported object types. For example,BROWSEis valid on a catalog or external location and is rejected on a table.The child PRs add the authorization checks that make these grants affect metadata reads, grant changes, and credential requests.
This is the shared parent for #2084, #2085, #2086, #2087, and #2088.
Validation: 21 focused enum and permission tests passed on JDK 17. API generation, Java formatting, and server Compile/Test Checkstyle passed.