Core, OpenApi: Add X-Iceberg-Client-Capabilities header#16394
Open
singhpk234 wants to merge 1 commit into
Open
Core, OpenApi: Add X-Iceberg-Client-Capabilities header#16394singhpk234 wants to merge 1 commit into
singhpk234 wants to merge 1 commit into
Conversation
Introduces a new HTTP header that lets REST clients advertise their supported capabilities to the catalog server on every request. * New ClientCapability enum (vended-credentials, remote-signing, scan-planning) as the single source of truth for supported capabilities, with javadoc describing the protocol each capability implies. * HTTPClient sets X-Iceberg-Client-Capabilities statically in build() alongside X-Client-Version and X-Client-Git-Commit-Short, so the header is included on every request and overrides any user-supplied header.* property. * OpenAPI client-capabilities parameter component documents the defined values without an enum constraint, allowing new capabilities to be added without schema changes. The header is optional; servers must not fail if it is absent.
eb2cb6f to
b453c26
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.
Summary
Introduces a new
X-Iceberg-Client-CapabilitiesHTTP header that lets REST clientsadvertise the capabilities they support to the catalog server. The header is
informational, sent on every catalog request, and is intended as a forward-compatibility
mechanism — not a security mechanism.
This was brought up at the Read Restrictions community sync on May 12, 2026
(recording); a dev list thread is being raised
in parallel for broader discussion.
Motivation
Iceberg's REST protocol keeps evolving — server-side scan planning, vended
credentials, remote signing, and the in-flight fine-grained access control
proposal (#13879) are all features that catalogs may return but older clients
can't handle. Today there's no standard way for a client to declare "I
understand X" to the server. This PR introduces a single, generic mechanism
for the client to declare its capability set up front.
The header pattern mirrors
X-Client-VersionandX-Client-Git-Commit-Short(already added on every request via
HTTPClient.baseHeaders) — it is a stableSDK-attribute hint, not a per-request preference.
Design notes
Forward-compat hint, not security. The header is informational — clients
can trivially spoof its value, so servers MUST NOT base trust or
authorization decisions on it. Trust establishment (mTLS, OAuth, etc.) is
out of scope. The parameter description in the spec calls this out
explicitly so it can't be missed.
enum:constraint on the schema. Mirrors the existingX-Iceberg-Access-Delegationparameter. Adding a new capability is aone-line spec edit. Generated clients can validate values; servers get a
machine-readable closed list of recognized tokens.
Independent of
X-Iceberg-Access-Delegation. Despite token overlap(
vended-credentials,remote-signingappear in both), the headers carrydifferent semantics:
data-accessis a per-request preference ("I wantthis for this call");
client-capabilitiesis a static SDK attribute("I am built to handle this").
Excluded from
/v1/oauth/tokens. OAuth token endpoints may be servedby external IdPs (Okta, Auth0, etc.) where Iceberg-specific headers are
noise. Mirrors how
X-Iceberg-Access-Delegationis handled.SDK overrides user config. The Java SDK's static value overrides any
user-configured
header.X-Iceberg-Client-Capabilitiesproperty — samepattern as the existing
X-Client-Version/X-Client-Git-Commit-Shortheaders. Pinned by an explicit test.
Future work
read-restrictionsto the enum once [SPEC] Add finer grained read restrictions as part of loadTable #13879 (FGAC) lands. The framingin that PR's review (catalogs MUST NOT return read-restrictions to
clients that don't advertise the capability) depends on this header being
available.
the same capability set.
Changes from the prior draft: