Iceberg REST Catalog Overview #3 — OAuth Authentication
Alex Merced
Co-Author of “Apache Iceberg: The Definitive Guide” | Head of DevRel at Dremio | LinkedIn Learning Instructor | Tech Content Creator
Security is critical to any modern data platform, and Apache Iceberg is continuously evolving to enhance its authentication and authorization mechanisms. As part of this evolution, the OAuth2 token exchange endpoint (/v1/oauth/tokens) has been deprecated and is set for removal in future versions.
In this post, we will explore:
What Was the Purpose of /v1/oauth/tokens?
The /v1/oauth/tokens endpoint was designed to facilitate authentication by issuing OAuth2 access tokens using one of the following flows:
For example, an Iceberg catalog client could authenticate by:
This approach provided centralized authentication but introduced security concerns, leading to deprecation.
Why Is It Being Deprecated?
The OAuth2 token endpoint is deprecated as of Iceberg (Java) 1.6.0 and will be removed entirely in Iceberg 2.0. The primary reasons for this decision include:
What Should You Do Instead?
Instead of relying on /v1/oauth/tokens, clients should:
? Use an external OAuth2 provider — Set the oauth2-server-uri configuration to specify the correct OAuth token endpoint managed by a dedicated identity provider.
? Authenticate before making API calls — Clients should obtain an access token before interacting with the Iceberg catalog, rather than requesting one from the catalog itself.
? Pass the access token via the Authorization header — Iceberg REST API requests should include the token in the request headers:
GET /v1/config HTTP/1.1
Host: iceberg.catalog.com
Authorization: Bearer <your-access-token>
? Use secure storage for client credentials — Avoid hardcoding client IDs and secrets. Use environment variables, secrets managers, or OAuth libraries that handle credential exchange securely.
Key Takeaways
What’s Next?
In the next post, we will explore how Iceberg handles namespace management, including how to create, list, and modify namespaces using the REST API. Stay tuned.
Co-Author of “Apache Iceberg: The Definitive Guide” | Head of DevRel at Dremio | LinkedIn Learning Instructor | Tech Content Creator
3 天前For those looking for more details on the auth manager API -> https://github.com/apache/iceberg/pull/12197