[Feature Request] Support OAuth2 client credentials as an auth mode for Connection
メンテナーはふだん 1 日以内に返信
まだ誰も着手していません。
評価
- 難易度
- 5/5
- 見積もり時間
- 1週間以上
- 初心者へのやさしさ
- 38/100
- issue の種類
- 機能追加
- 明瞭さ
- おおむね明確
- 活発さ
- 活発
- 技術スタック
- go
調査の方向性
Start with api/v1alpha1/connection_types.go and the Connection and ClusterConnection connection-building paths, then read the existing API-key Secret rotation handling. Check how worker pods receive connection credentials and how their SDK clients are configured; the issue leaves worker support as an open design choice. Done means OAuth2 client credentials can be configured, exchanged and refreshed for the supported connection paths, with validation and tests covering Secret changes.
索引モデルが issue の本文から書いたものです。
説明
Is your feature request related to a problem? Please describe.
Connection / ClusterConnection currently support only static credentials: mutualTLSSecretRef (client cert/key) or apiKeySecretRef (bearer token), which are mutually exclusive (see api/v1alpha1/connection_types.go, AuthMode: TLS, API_KEY, NO_CREDENTIALS).
There is no way to authenticate with the OAuth2 client credentials grant (client ID + client secret exchanged for a short-lived access token at a token endpoint). This is a common setup for Temporal clusters (self-hosted, or behind an authenticating gateway/IdP such as Keycloak, Auth0, Okta, Entra ID) whose authorizer expects a JWT.
Today, users in that situation have no supported way to use the controller, because:
- The controller's own Temporal client cannot fetch/refresh OAuth2 tokens.
- Worker pods only receive the static credentials from the
Connection(API key viaTEMPORAL_API_KEY, or a mounted mTLS cert), so they can't obtain tokens either. - Pasting a token into
apiKeySecretRefdoesn't work, since access tokens expire and nothing refreshes them.
Describe the solution you'd like
Add a new auth mode (e.g. oauth2ClientCredentials) to ConnectionSpec, alongside mutualTLSSecretRef / apiKeySecretRef, and mutually exclusive with them (extend the existing CEL validation). Sketch:
apiVersion: temporal.io/v1alpha1
kind: Connection
metadata:
name: my-temporal
spec:
hostPort: "temporal.example.com:7233"
oauth2ClientCredentials:
tokenURL: https://idp.example.com/oauth2/token
scopes: ["temporal"]
audience: temporal-api # optional, for IdPs that need it
clientSecretRef: # Secret with client_id + client_secret keys
name: temporal-oauth2-client
Behavior:
- Controller connection: build the Temporal client with a token source based on
golang.org/x/oauth2/clientcredentials(already an indirect dependency), wrapped inclient.NewAPIKeyDynamicCredentials(or equivalent) so tokens refresh automatically, and invalidate/reload when the referenced Secret changes (the pool already handles API-key Secret rotation). - Worker pods: how the credentials reach workers needs a decision. Options: inject
client_id/client_secret/tokenURL/scopes as env vars so the worker's SDK client can build its own token source (e.g. viaenvconfig), or document that only the controller connection is supported initially.
This should compose with the separate controller/worker credentials ask in #578 so the controller can use OAuth2 client credentials while workers use something with narrower access. It also relates to the other proposed auth modes (#515 Kubernetes service account tokens, #449 file-based API keys, #654 mTLS + bearer).
Describe alternatives you've considered
- Placing an authenticating gateway/sidecar in front of Temporal and pointing
hostPortat it. This only covers the controller's connection and adds operational overhead; worker pods would still need their own handling. - Using a static API key / mTLS, which isn't possible when the cluster's authorizer requires IdP-issued JWTs.
Additional context
Current behavior verified against the code and docs (docs/configuration.md, docs/cluster-connection.md): no OAuth2 handling exists in the controller, and there are no existing issues for it.
- 主要言語
- Go
- スター
- 204
- フォーク
- 88
- 平均マージ
- 1日 2時間
- マージ済み PR(30日)
- 10
環境構築
- Dockerfile または Docker Compose ファイルあり
- プルリクエストのテンプレートなし
- コントリビューションガイドなし
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
temporalio/temporal-worker-controller のほかの issue
-
難易度 5/5 1週間以上 初心者へのやさしさ 18/100
temporalio/temporal-worker-controller#705 · コメント 2 件 ·
メンテナーはふだん 1 日以内に返信
-
難易度 5/5 1週間以上 初心者へのやさしさ 35/100
temporalio/temporal-worker-controller#699 · コメント 1 件 ·
メンテナーはふだん 1 日以内に返信
-
[Feature Request] Make the rollback-detection window configurable対応中かも @blaketsk が 5 日前に担当しました。 オープン
難易度 5/5 1週間以上 初心者へのやさしさ 45/100
temporalio/temporal-worker-controller#698 ·
メンテナーはふだん 1 日以内に返信
-
[Bug] Build id mismatch between controller and self-hosted server対応中かも @kriyanshii が 3 日前に担当しました。 オープンbug
難易度 4/5 3〜5日 初心者へのやさしさ 48/100
temporalio/temporal-worker-controller#693 · コメント 1 件 ·
メンテナーはふだん 1 日以内に返信
-
[Feature Request] Allow customizing the names of controller injected environment variables再び着手できるかも @rahulsjha が 14 日前に担当しましたが、オープン中のプルリクエストはありません。 オープンenhancement
難易度 3/5 1〜2日 初心者へのやさしさ 65/100
temporalio/temporal-worker-controller#692 · コメント 2 件 · リアクション 1 件 ·
メンテナーはふだん 1 日以内に返信
temporalio/temporal-worker-controller の issue をすべて見る
似ている issue
-
bug effort:s impact:med raised-by:desk risk:low
難易度 2/5 1〜3時間 初心者へのやさしさ 75/100
medici-finance/assay#8342 · コメント 1 件 ·
メンテナーはふだん 1 日以内に返信
-
bug sweep
難易度 2/5 1〜3時間 初心者へのやさしさ 76/100
bketelsen/truenas-mcp#120 ·
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100
nwverse/persona#22164 · コメント 1 件 ·
メンテナーはふだん 1 日以内に返信
-
enhancement good first issue
難易度 2/5 1〜3時間 初心者へのやさしさ 90/100
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100
sresarehumantoo/cc-artex#559 ·