Client OAuth: support secretless auth via OAuth2 client assertion / Azure workload identity federation

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

维护者通常 1 天内回复

还没有人认领这个 Issue。

评估

难度
5/5
预计耗时
一周以上
新手友好度
42/100
Issue 类型
功能
描述清晰度
基本清楚
活跃度
冷清
技术栈
java, python, spark

调研方向

从 clients/java/src/main/java/io/unitycatalog/client/auth/AuthConfigs.java 和 OAuthTokenProvider 路径开始,然后跟踪 UCSingleCatalog 和 UCProxy 如何接收身份验证配置。比较 Java、Python 和配置驱动的客户端入口点,以确定 assertion-file 和 scope 设置必须流经哪里。完成的标准是:联合 assertion 可以为令牌请求重新读取,并且 OAuth 请求使用 client_assertion 而无需 client_secret。

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

描述

enhancement

The client libraries support only two ways to obtain a bearer token for the UC REST API: a static token, or an OAuth2 client-credentials grant that requires a client secret.

From clients/java/src/main/java/io/unitycatalog/client/auth/AuthConfigs.java, the auth TYPE is static (StaticTokenProvider), oauth (OAuthTokenProvider), or custom (FQCN of a TokenProvider), and the OAuth path exposes only oauth.uri, oauth.clientId, and oauth.clientSecret. There is no config key or code path for a client assertion, a federated-token file, or a grant-type selector.

As a result, a workload running under Azure Workload Identity (AKS) — or GCP Workload Identity, or any OIDC-federated runtime — cannot authenticate without a long-lived client secret. That reintroduces exactly the toil federation is meant to remove: storing the secret (e.g. in Key Vault), scheduling rotation, and handling expiry incidents. A config-driven consumer like UCSingleCatalog has no secretless option at all. It's also inconsistent with the storage side, which can already use Azure WorkloadIdentityCredential (see #975) — so the storage leg can be secretless while the catalog leg cannot.

Describe the solution you would like

First-class support for OAuth2 client authentication via a client assertion (JWT bearer, RFC 7523) sourced from a workload-identity federated token, so no client secret is stored or rotated.

New auth config keys, e.g.:

oauth.grantType=client_credentials
oauth.clientAssertionType=urn:ietf:params:oauth:client-assertion-type:jwt-bearer
oauth.clientAssertionFile= (re-read on each token request, since it rotates)
oauth.scope=/.default (pairs with #1632)
The provider then POSTs to oauth.uri with grant_type, client_id, scope, client_assertion_type, and client_assertion= — no client_secret.

Ideally this lands in the Java client (io.unitycatalog.client.auth), the Python client, and the config-driven Spark path (UCSingleCatalog / UCProxy) so it's usable declaratively — not only by shipping a hand-written provider jar.

Additional context

Alternatives considered: A custom TokenProvider (TYPE=custom) works today and is the current workaround, but every org must reimplement it, it can't be used from the config-only Spark/UCSingleCatalog path without a custom jar, and it duplicates logic the library should own. Keeping a client secret + automating rotation doesn't remove the secret, it just schedules the toil.

Related: #1200 (lists workload identity federation as a consideration) · #1064 / #1071 (client-credentials for the Spark connector) · #1632 (oauth.scope, prerequisite) · #1259 / #1269 (client abstraction + TokenProvider.initialize() / custom providers) · #975 (storage already uses Azure WorkloadIdentityCredential).

References: Entra Workload Identity Federation · AKS workload identity · Databricks OAuth / workload identity federation · RFC 7523

主要语言
Java
星标
3.6k
派生
706
平均合并
3 天 5 小时
30 天内合并 PR
135

环境准备

从这里开始

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

unitycatalog/unitycatalog 的其他 Issue

查看 unitycatalog/unitycatalog 的全部 Issue

相似的 Issue

更多 Java Issue

把新 issue 发到你的邮箱

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