HIVE-29769: Authorize a stage-create on Iceberg REST API - #6641
Open
okumin wants to merge 3 commits into
Open
Conversation
okumin
force-pushed
the
HIVE-29769-stage-create
branch
from
July 29, 2026 03:15
c6871de to
04e71a8
Compare
okumin
force-pushed
the
HIVE-29769-stage-create
branch
from
July 29, 2026 05:36
04e71a8 to
164f880
Compare
okumin
force-pushed
the
HIVE-29769-stage-create
branch
from
July 29, 2026 10:55
164f880 to
d89d4d8
Compare
|
Contributor
Author
|
@saihemanth-cloudera, could you please take a look? I think you recently worked on this area and might be knowledgeable. |
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.



What changes were proposed in this pull request?
Authorize a CREATE TABLE request with stage-create enabled.
https://issues.apache.org/jira/browse/HIVE-29769
Why are the changes needed?
Stage Create is a feature to retrieve table locations and other information without persisting the table in the Hive Metastore. It is used when an external client performs a CTAS-like operation.
Our Iceberg REST relies on HMS for authz. For a normal table creation, HMS eventually verifies that the end user has the CREATE TABLE permission. For a stage create, the Iceberg REST API returns a response without calling pre-event listeners. It could be dangerous in the future since a stage create allows an end user to specify an arbitrary file path as a table location.
Currently, this is not a vulnerability because an end user uses their own credentials. If they have broader access than they should, they can access the files directly anyway.
This is very related to the vulnerability of Apache Polaris that was recently reported.
https://polaris.apache.org/community/security-advisories/cve-2026-42809/
This PR would validate the specified location using Apache Ranger or another authz plugin.
Does this PR introduce any user-facing change?
If a user runs stage-create with a specified location, it might fail if they don't have the proper permissions.
How was this patch tested?
I added unit and integration tests.