Support Kubernetes Service Account Tokens as an auth mode for Connection (controller + worker pods)
Los mantenedores suelen responder en 1 día
@kriyanshii ya está trabajando en esto.
Desde el 12/10/2026.
Evaluación
- Dificultad
- 5/5
- Tiempo estimado
- Más de una semana
- Aptitud para principiantes
- 48/100
- Tipo de issue
- Nueva funcionalidad
- Claridad
- Bastante claro
- Estado de actividad
- Activo
- Stack tecnológico
- go, kubernetes
- Área
- authentication, backend
Línea de trabajo
Comienza con ConnectionSpec y clientpool.go, especialmente con la ruta existente apiKeySecretRef que usa sdkclient.NewAPIKeyDynamicCredentials. Sigue los puntos de entrada de generación de plantillas de pods del controlador y de los workers para entender dónde se configuran los volúmenes de cuentas de servicio proyectados, los montajes y las variables de entorno. Se considera terminado cuando la autenticación del controlador usa un token proyectado y los pods de worker generados reciben configuraciones de TokenRequest configurables sin credenciales estáticas.
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.
Today Connection supports exactly two mutually-exclusive auth modes: mutualTLSSecretRef
and apiKeySecretRef. Both require a long-lived, static Kubernetes Secret — a client cert/key
pair for mTLS, or a bearer token for API keys. For self-hosted Temporal running on Kubernetes,
this means:
- The controller itself holds a static credential to make control-plane calls (register worker
deployment versions, check drainage, etc.). - Worker pods get that same static credential injected as an env var at pod creation time, with
no rotation until the pod restarts.
For teams already running Workload Identity / IRSA / OIDC-federated auth elsewhere in their
Kubernetes platform (no static keys, short-lived tokens, automatic rotation), this is a step
backward — it reintroduces exactly the kind of long-lived Secret that Workload Identity patterns
are meant to eliminate. It also means every rotation of the underlying cert/key requires updating
a Secret and waiting for the controller/pods to notice, rather than tokens refreshing themselves
transparently.
This isn't hypothetical — worker-side JWT auth against Temporal keeps coming up in the community:
- https://community.temporal.io/t/how-use-authorization-mechanism-in-worker/3613
- https://community.temporal.io/t/extending-the-custom-authorisation-jwt-to-the-system-worker/3408
Describe the solution you'd like
Add a third auth mode, e.g. serviceAccountToken, to ConnectionSpec, alongside the existing
mutualTLSSecretRef / apiKeySecretRef. This would rely on projected Kubernetes SA tokens
(TokenRequest API) rather than a static Secret, and splits cleanly into two independent pieces:
1. Controller's own connection (control plane)
The controller already runs as a pod with its own ServiceAccount. Instead of reading a static
Secret, it would read its own pod's projected SA token (refreshed automatically by kubelet) and
use it as a bearer token via sdkclient.NewAPIKeyDynamicCredentials, the same mechanism already
used for the apiKeySecretRef path in clientpool.go. This is a self-contained change — no new
pod-injection logic needed, since the controller's own pod spec is under the cluster operator's
control already.
2. Worker pods (data plane)
When Connection.spec.authMode: ServiceAccountToken is set, the controller would inject into
every worker pod template it generates:
- a projected volume with a
serviceAccountTokensource (configurableaudience,
expirationSeconds) - a volumeMount at a well-known path
- an env var pointing at that path (e.g.
TEMPORAL_API_KEY_FILE) instead of the current
TEMPORAL_API_KEY=<value>injection
Example spec:
apiVersion: temporal.io/v1alpha1
kind: Connection
metadata:
name: my-temporal-connection
spec:
hostPort: temporal-frontend.temporal-system:7233
authMode: ServiceAccountToken
serviceAccountToken:
audience: temporal
expirationSeconds: 3600
Worker pods would need no manual volume/env config — just a serviceAccountName on the pod
template, same as today.
Additional context
- This mode would only be meaningful for self-hosted Temporal — it requires the server to be
configured with a JWT ClaimMapper validating tokens against the cluster's OIDC issuer/JWKS.
Temporal Cloud's auth model doesn't support this today, so this would not replace
apiKeySecretRefas the recommended mode there. - The controller can guarantee "a fresh token is on disk," but whether the worker process
actually re-reads that file per-connection (vs. caching it once at startup) is up to the
worker's own SDK client construction — e.g. Go SDK'sNewAPIKeyDynamicCredentialscallback
pattern. - For multi-cluster setups (workers on EKS/AKS/GKE all pointing at one Temporal cluster), the
server-side ClaimMapper would need to trust multiple clusters' OIDC issuers — worth surfacing
in docs rather than assuming a single-issuer setup.
- Lenguaje dominante
- Go
- Estrellas
- 198
- Forks
- 84
- Merge medio
- 2 d 19 h
- PR fusionados (30 d)
- 34
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
-
[Bug] Helm chart: metrics.enabled=false still adds kube-rbac-proxyPosiblemente ocupada @cujarrett la tomó hoy. Abierto
Dificultad 2/5 Menos de una hora Aptitud para principiantes 20/100
temporalio/temporal-worker-controller#689 ·
Los mantenedores suelen responder en 1 día
-
[Bug] Helm chart: prometheus.enabled always failsPosiblemente ocupada @cujarrett la tomó hoy. Abierto
Dificultad 3/5 1-2 días Aptitud para principiantes 35/100
temporalio/temporal-worker-controller#688 ·
Los mantenedores suelen responder en 1 día
-
[Feature Request] Configure temporal-worker-controller to use hostNetworkPosiblemente ocupada @josh-ferrell la tomó hace 5 días. Abiertoenhancement
Dificultad 4/5 3-5 días Aptitud para principiantes 35/100
temporalio/temporal-worker-controller#680 ·
Los mantenedores suelen responder en 1 día
-
[Feature Request] Helm chart: support topologySpreadConstraints on the controller DeploymentPosiblemente ocupada @akolacz la tomó hace 13 días. Abiertohelm
temporalio/temporal-worker-controller#658 · 1 reacción · 1 asignado ·
Los mantenedores suelen responder en 1 día
-
rbac
Dificultad 4/5 3-5 días Aptitud para principiantes 48/100
temporalio/temporal-worker-controller#654 ·
Los mantenedores suelen responder en 1 día
Todos los issues de temporalio/temporal-worker-controller
Issues similares
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 62/100
Los mantenedores suelen responder en 2 días
-
needs-triage
Dificultad 2/5 1-3 horas Aptitud para principiantes 62/100
cli/cli#14895 · 1 comentario ·
Los mantenedores suelen responder en 1 día
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 85/100
kagent-dev/kagent#3462 ·
Los mantenedores suelen responder en 1 día
-
netrc credential source accepts a password with an embedded CR/LF that every other source rejectsAbiertoagent-butler-finding bug
Dificultad 2/5 1-3 horas Aptitud para principiantes 76/100
jordansmall/spindrift#6268 ·
Los mantenedores suelen responder en 1 día
-
bug
Dificultad 2/5 1-3 horas Aptitud para principiantes 62/100
Los mantenedores suelen responder en 7 días