[Feature Request] Support OAuth2 client credentials as an auth mode for Connection
Los mantenedores suelen responder en 1 día
Nadie ha tomado este issue todavía.
Evaluación
- Dificultad
- 5/5
- Tiempo estimado
- Más de una semana
- Aptitud para principiantes
- 38/100
- Tipo de issue
- Nueva funcionalidad
- Claridad
- Bastante claro
- Estado de actividad
- Activo
- Stack tecnológico
- go
Línea de trabajo
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.
Escrito por el modelo de indexación a partir del texto del issue.
Descripción
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.
- Lenguaje dominante
- Go
- Estrellas
- 204
- Forks
- 88
- Merge medio
- 1 d 2 h
- PR fusionados (30 d)
- 10
Preparar el entorno
- Incluye un Dockerfile o un archivo de Docker Compose
- Sin plantilla de pull request
- Sin guía de contribución
Primeros pasos
- Lee el issue completo y luego la guía de contribución del proyecto.
- Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
- Haz un fork del repositorio y trabaja en una rama.
- Abre un pull request que haga referencia al número del issue.
Más de temporalio/temporal-worker-controller
-
Dificultad 5/5 Más de una semana Aptitud para principiantes 18/100
temporalio/temporal-worker-controller#705 · 2 comentarios ·
Los mantenedores suelen responder en 1 día
-
Dificultad 5/5 Más de una semana Aptitud para principiantes 35/100
temporalio/temporal-worker-controller#699 · 1 comentario ·
Los mantenedores suelen responder en 1 día
-
[Feature Request] Make the rollback-detection window configurablePosiblemente ocupada @blaketsk la tomó hace 5 días. Abierto
Dificultad 5/5 Más de una semana Aptitud para principiantes 45/100
temporalio/temporal-worker-controller#698 ·
Los mantenedores suelen responder en 1 día
-
[Bug] Build id mismatch between controller and self-hosted serverPosiblemente ocupada @kriyanshii la tomó hace 3 días. Abiertobug
Dificultad 4/5 3-5 días Aptitud para principiantes 48/100
temporalio/temporal-worker-controller#693 · 1 comentario ·
Los mantenedores suelen responder en 1 día
-
[Feature Request] Allow customizing the names of controller injected environment variablesQuizá libre de nuevo @rahulsjha la tomó hace 14 días y no hay ningún pull request abierto. Abiertoenhancement
Dificultad 3/5 1-2 días Aptitud para principiantes 65/100
temporalio/temporal-worker-controller#692 · 2 comentarios · 1 reacción ·
Los mantenedores suelen responder en 1 día
Todos los issues de temporalio/temporal-worker-controller
Issues similares
-
bug effort:s impact:med raised-by:desk risk:low
Dificultad 2/5 1-3 horas Aptitud para principiantes 75/100
medici-finance/assay#8342 · 1 comentario ·
Los mantenedores suelen responder en 1 día
-
bug sweep
Dificultad 2/5 1-3 horas Aptitud para principiantes 76/100
bketelsen/truenas-mcp#120 ·
Los mantenedores suelen responder en 1 día
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 78/100
nwverse/persona#22164 · 1 comentario ·
Los mantenedores suelen responder en 1 día
-
enhancement good first issue
Dificultad 2/5 1-3 horas Aptitud para principiantes 90/100
Los mantenedores suelen responder en 1 día
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 78/100
sresarehumantoo/cc-artex#559 ·