Skip to content

HIVE-28998: Support Iceberg REST Catalog without authentication #5870

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Jun 24, 2025

Conversation

okumin
Copy link
Contributor

@okumin okumin commented Jun 14, 2025

What changes were proposed in this pull request?

This PR would add a new authentication mode, NONE, to the Iceberg REST Catalog API. The currently supported SIMPLE and JWT are not central authentication. It is inherited from another Hive servlet. It appears that NONE and OAuth2 are widely used.

Why are the changes needed?

To acquire test users.

Does this PR introduce any user-facing change?

No. The feature has not been shipped.

How was this patch tested?

Unit and integration tests

@@ -1867,7 +1867,7 @@ public enum ConfVars {
" positive value will be used as-is."
),
ICEBERG_CATALOG_SERVLET_AUTH("metastore.iceberg.catalog.servlet.auth",
"hive.metastore.iceberg.catalog.servlet.auth", "jwt", new StringSetValidator("simple", "jwt"),
"hive.metastore.iceberg.catalog.servlet.auth", "jwt", new StringSetValidator("none", "simple", "jwt"),
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

can we update the HMS config in docker to NONE as well

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

OK. I am considering if we should support SIMPLE and JWT. They are likely inherited from hive.metastore.properties.servlet.auth.

Copy link
Member

@deniskuzZ deniskuzZ Jun 14, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

That comes from PROPERTIES_SERVLET_AUTH - another servlet that has 0 usages. I don't understand why we can't have 1 generic config

Copy link
Contributor Author

@okumin okumin Jun 15, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think we should separate one at least for Iceberg. OAuth2 is not used in Hive's endpoints, but the Iceberg community prefers it. Another table format might prefer SPNEGO or something else if we support it. Anyway, a set of auth methods relies on the product, the community, and the client implementation.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

hive.metastore.iceberg.catalog.servlet.auth config rename has caused confusion. It's not meant to be specific to Iceberg - it's intended for use by the HMS RestCatalog (aka UnityCatalog) serving federated metadata (including Hive external and ACID tables)."

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It was a very good discussion. This discussion involved the further development direction and positioning of HMS in the future.

First, I think we should write a detailed proposal and discuss it clearly in the community email. Because I feel that many people are not clear about the positioning of the HMS rest catalog, which may cause various misunderstandings.

Returning to the current issue, I basically agree with Denys' statement that HMS(Rest) in the future will be similar to the Unity Catalog, capable of serving as an Iceberg rest catalog server (its primary function), and also able to register other catalogs (such as Hive tables from other HMS).

Copy link
Contributor Author

@okumin okumin Jun 20, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@deniskuzZ @zhangbutao Thanks. I also think we should discuss the excellent vision on the mailing list. I want to support it. However, one point remains unclear to me.
Unity Catalog provides two types of endpoints: One is Unity REST API(/api/2.1/unity-catalog) and the other is Iceberg REST API(/api/2.1/unity-catalog/iceberg-rest). Unity REST API is likely to authenticate a user with Personal Access Token. Iceberg REST API is likely to authenticate a user with OAuth or PAT. I understand we want the equivalent of the Unity REST; Let's call it HMS v2 REST.
I don't understand why we can use the consistent auth across the endpoints. HMS v2 REST clients will be able to use SIMPLE(i.e., a client sends a user name via x-actor-username header) if we implement the client so. However, as a reality, most Iceberg REST clients probably do not support it. I think Trino has no method to use SIMPLE and JWT.
If I were saying something strange, I would follow the recommendation now.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'll try to create a draft with the proposal, so we can collaborate more effectively.
You might be right and we should consider the possibility of supporting multiple endpoints, each with its own authentication. I haven't thought much about it.
FYI, we are using JWT downstream to enable Snowflake integration with HMS Iceberg RestCatalog.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is a good discussion, but I started thinking it does not need to be a blocker to make the current Iceberg REST API minimally viable. I separated the debate in the following ticket.
https://issues.apache.org/jira/browse/HIVE-29038

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, 100%. That's beyond the scope of this PR

@okumin okumin force-pushed the HIVE-28998-rest-none branch from 6986d13 to 9258483 Compare June 14, 2025 16:28
@okumin okumin changed the title [WIP] HIVE-28998: Support Iceberg REST Catalog without authentication HIVE-28998: Support Iceberg REST Catalog without authentication Jun 14, 2025
@okumin okumin marked this pull request as ready for review June 14, 2025 16:32
@deniskuzZ
Copy link
Member

deniskuzZ commented Jun 23, 2025

hi @okumin, could you please rebase, or if you are busy, i can help. we need this in 4.1

@okumin
Copy link
Contributor Author

okumin commented Jun 23, 2025

I probably think the consensus is that this is not a blocker, but I try to rebase this pr promptly.

Somehow, with a constructor, `mvn test` didn't run it
@okumin
Copy link
Contributor Author

okumin commented Jun 23, 2025

@deniskuzZ I rebased it

Copy link

Copy link
Member

@deniskuzZ deniskuzZ left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

+1, pending tests

@deniskuzZ deniskuzZ merged commit e7f1c23 into apache:master Jun 24, 2025
6 checks passed
@okumin okumin deleted the HIVE-28998-rest-none branch June 24, 2025 12:01
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.

4 participants