Skip to content

feat(rest): request vended storage credentials - #12

Closed
smaheshwar-pltr wants to merge 1 commit into
mainfrom
rest-access-delegation-header
Closed

smaheshwar-pltr wants to merge 1 commit into
mainfrom
rest-access-delegation-header

Conversation

@smaheshwar-pltr

@smaheshwar-pltr smaheshwar-pltr commented Jun 27, 2026 •

Copy link
Copy Markdown
Owner

What

Send X-Iceberg-Access-Delegation: vended-credentials by default on REST requests. An explicitly configured access-delegation header still wins, including when its name uses different casing.

Why

A REST server only vends storage credentials when the client requests delegation. iceberg-cpp already parses and applies those credentials, so the default request completes that flow.

Validation

Added coverage for the default header, prefix stripping, and case-insensitive overrides. The full GitHub Actions matrix passed.

AI assistance: Codex was used to rebase and review the existing change against current main. I reviewed the resulting diff and validation.

/// request, asking the server to delegate storage access for loaded tables
/// (use "vended-credentials" to request vended storage credentials). Unset by
/// default; an explicit "header." override of the same header takes precedence.
inline static Entry<std::string> kAccessDelegation{"access-delegation", ""};

Copy link
Copy Markdown
Owner Author

Choose a reason for hiding this comment

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

I'm confused by this. I'd have thought this PR would just involved setting vended-credentials everywhere. Especially because, like PyIceberg and iceberg-rust, that's the only delegation mode iceberg-cpp even supports. What's the reason for this stuff I'm seeing here?

@smaheshwar-pltr
smaheshwar-pltr force-pushed the rest-access-delegation-header branch 2 times, most recently from d100f3b to 0f83157 Compare June 27, 2026 23:20
return StringUtils::ToUpper(header.first) == canonical;
});
if (!set_by_caller) {
headers.emplace(kHeaderAccessDelegation, kAccessDelegationVendedCredentials);

Copy link
Copy Markdown
Owner Author

Choose a reason for hiding this comment

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

Sending this by default mirrors PyIceberg, which sets the access-delegation header on the session for every request and only ever uses vended-credentials:

The Java REST client does not send this header; engines like Trino set it via a header.* catalog property.

@smaheshwar-pltr
smaheshwar-pltr force-pushed the rest-access-delegation-header branch from ec8741b to 3e3fed8 Compare September 6, 2026 22:05
@smaheshwar-pltr smaheshwar-pltr changed the title feat(rest): request storage access delegation via header feat(rest): request vended storage credentials Sep 6, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant