[Feature] Access table data with the temporary credentials issued by the REST catalog

未关闭
#369 0 条评论 0 个 reaction 已指派 1 人 在 GitHub 查看

还没有人认领这个 Issue。

评估

难度
5/5
预计耗时
一周以上
新手友好度
30/100
Issue 类型
功能
描述清晰度
描述清楚
活跃度
活跃
技术栈
cpp
领域
api, database

调研方向

Start by tracing Catalog::GetTableFileSystem, ReadContextBuilder, ScanContextBuilder, WriteContextBuilder, and CredentialProviderFactory::Get to understand the existing catalog and file-system extension points. Done means data-token.enabled remains backward-compatible, table credentials refresh independently before expiry, the builder and provider APIs work, and static built-in file-system credentials remain unchanged.

由索引模型根据 Issue 内容生成。

描述

enhancement

Search before asking

  • I searched in the issues and found nothing similar.

Motivation

The C++ REST catalog can only read and write table data with the static credentials configured in the catalog options (fs.oss.accessKeyId and friends). A REST catalog that issues per-table temporary credentials (data tokens, e.g. DLF) has no way to have those credentials used for that table's data IO, and no way to keep them fresh before they expire. Callers that bring their own FileSystem also have no supported abstraction for sourcing credentials that expire.

Solution

Add data-token support to the REST catalog: when data-token.enabled=true, the catalog loads a table's temporary credentials and serves a refreshing FileSystem for that table through Catalog::GetTableFileSystem(identifier). ReadContextBuilder, ScanContextBuilder and WriteContextBuilder gain WithCatalog(catalog, identifier) so the table's schema and file system are resolved from the catalog in one call. The credentials are cached and reloaded before expiry by rebuilding the delegate file system keyed by the issued token, so a rotation of one table's credentials does not disturb the others.

Also add a generic CredentialProvider + CredentialProviderFactory extension point: a caller that brings its own FileSystem builds a provider with CredentialProviderFactory::Get and consults GetCredentials() at each access, then passes that file system in through Catalog::Create or a builder's WithFileSystem. The built-in file systems (oss, s3, local, jindo) keep signing with the static credentials of their own options.

Anything else?

data-token.enabled defaults to false, and the new API is additive, so the change is backward compatible.

Are you willing to submit a PR?

  • I'm willing to submit a PR!
主要语言
C++
星标
65
派生
29
平均合并
2 天 30 分钟
30 天内合并 PR
77

贡献指南

打开贡献指南

从这里开始

  1. 先读完整个 Issue,再读项目的贡献指南。
  2. 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
  3. Fork 仓库,在一个分支上完成修改。
  4. 提交 Pull Request,并在描述里引用这个 Issue 编号。

apache/paimon-cpp 的其他 Issue

查看 apache/paimon-cpp 的全部 Issue

相似的 Issue

更多 C++ Issue

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。