Unresolved vault reference error when using Secret Provider macros in Traefik Web Server Environment

Abierto
#6,032 1 comentario 0 reacciones 0 asignados Ver en GitHub

Los mantenedores suelen responder en 1 día

Nadie ha tomado este issue todavía.

Evaluación

Dificultad
4/5
Tiempo estimado
3-5 días
Aptitud para principiantes
54/100
Tipo de issue
Error
Claridad
Bastante claro
Estado de actividad
Activo
Stack tecnológico
docker, typescript
Área
backend, devops

Línea de trabajo

Start by tracing the settings.writeTraefikEnv endpoint and the web server settings controller, then compare their secret resolution flow with Application and Docker Compose deployments. The issue identifies the error and the expected behavior, but does not name source files or tests. Done means Traefik environment settings can use Vault references without returning HTTP 500.

Escrito por el modelo de indexación a partir del texto del issue.

Descripción

needs-triage🔍
To Reproduce
  1. Set up an external Secret Provider (e.g., HashiCorp Vault named vault) under Organization Settings.
  2. Store a secret key in the provider (e.g., secret/data/ionos with key IONOS_API_KEY).
  3. Navigate to Settings -> Web Server -> Traefik -> Environment.
  4. Add a variable using the provider interpolation syntax:
    IONOS_API_KEY=${{vault.vault.ionos:IONOS_API_KEY}}
  5. Click Save (or perform a POST /api/trpc/settings.writeTraefikEnv with payload {"json":{"env":"..."}}).
  6. Notice the operation fails with HTTP 500.
Current vs. Expected behavior

Current:
When configuring environment variables for Traefik (Settings -> Web Server -> Traefik -> Environment or via the tRPC API settings.writeTraefikEnv), attempting to use external Secret Provider macro interpolation syntax (such as HashiCorp Vault ${{vault..:}}) results in an unhandled HTTP 500 Internal Server Error.

The server crashes with the error: "Unresolved vault reference: call withResolvedVaultRefs() on the entity before preparing environment variables"

Expected:
Dokploy should either:

  • Dynamically resolve the Vault references via withResolvedVaultRefs() on the web server/Traefik entity before injecting them into the Traefik container environment (matching the behavior of Application and Docker Compose deployments),
    OR
  • Allow Traefik's environment to participate in the secret interpolation pipeline when reloading the proxy container.
Provide environment information
Operating System: 
- Ubuntu 24 LTS
- Dokploy Version v0.31.2
Which area(s) are affected? (Select all that apply)

Traefik, Local Development

Are you deploying the applications where Dokploy is installed or on a remote server?

Same server where Dokploy is installed

Additional context

Secret interpolation with ${{vault...}} works as expected inside standard Application and Docker Compose services because withResolvedVaultRefs() is called during the service deployment lifecycle. However, the settings.writeTraefikEnv endpoint and the web server settings controller appear to lack this call prior to validating/preparing the environment strings for the dokploy-traefik container.

Additional log Output:
{
"error": {
"json": {
"message": "Unresolved vault reference: call withResolvedVaultRefs() on the entity before preparing environment variables",
"code": -32603,
"data": {
"code": "INTERNAL_SERVER_ERROR",
"httpStatus": 500,
"path": "settings.writeTraefikEnv",
"zodError": null
}
}
}
}

Will you send a PR to fix it?

Maybe, need help

Lenguaje dominante
TypeScript
Estrellas
38.8k
Forks
3.2k
Merge medio
1 d 10 h
PR fusionados (30 d)
110

Preparar el entorno

Abrir en Codespaces

Inicia el contenedor de desarrollo del proyecto en tu navegador, con tu propia cuenta de GitHub.

Primeros pasos

  1. Lee el issue completo y luego la guía de contribución del proyecto.
  2. Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
  3. Haz un fork del repositorio y trabaja en una rama.
  4. Abre un pull request que haga referencia al número del issue.

Más de Dokploy/dokploy

Todos los issues de Dokploy/dokploy

Issues similares

Más issues de TypeScript

Recibe los nuevos issues en tu correo

Un resumen breve de issues de GitHub para principiantes.