Skip to content

HIVE-29769: Authorize a stage-create on Iceberg REST API - #6641

Open
okumin wants to merge 3 commits into
apache:masterfrom
okumin:HIVE-29769-stage-create
Open

HIVE-29769: Authorize a stage-create on Iceberg REST API#6641
okumin wants to merge 3 commits into
apache:masterfrom
okumin:HIVE-29769-stage-create

Conversation

@okumin

@okumin okumin commented Jul 27, 2026

Copy link
Copy Markdown
Contributor

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.

image

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.

@sonarqubecloud

Copy link
Copy Markdown

@okumin

okumin commented Jul 29, 2026

Copy link
Copy Markdown
Contributor Author

@saihemanth-cloudera, could you please take a look? I think you recently worked on this area and might be knowledgeable.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants